proseidon
proseidon

Reputation: 2305

What is an alternative for an iFrame?

My boss just asked me to re-create an old web part. It's basically image tiles that, upon being clicked, dynamically load another page into an iframe on that main page. Something like this:

images___________
  [][]|
  [][]|
  [][]|  iframe
      |
      |

She doesn't want me to use iFrames. However, the dynamic content must be stored in a separate page and have a separate URL. How can I take separate page content with a URL and load it into my main page without an iFrame?

Upvotes: 0

Views: 3548

Answers (3)

Dejan.S
Dejan.S

Reputation: 19128

You can use jquery.load(); to perform that. You can try it out and if you run into problems update your question with code and issue and I/somebody can help you.

The basic idea of load() looks like this

$('#result').load('ajax/test.html', function() {
  //here you can update a div on your page with content from the file/page
});

Upvotes: 2

CoursesWeb
CoursesWeb

Reputation: 4237

An alternative is the <object> tag, or loading the content with Ajax, then adding it into an html element.

Upvotes: 2

drasick
drasick

Reputation: 290

You can use Ajax and load the content in a div.

Upvotes: 3

Related Questions