Loading external pages internally.

D

Danny

Hey everybody, I am a complete newbie with Javascript but was
wondering if anybody could tell me how to load pages dynamicly within
a div?

Here is the site: http://regiesrule.info, i would like to have the
tabs on the top instead of opening up something inside the same html
document I would like to be able to load an external webpage in it.
Also if that is impossible then i would like to know why the current
setup does not work in IE7?

Thanks so much in advance,

Dannny
 
N

Neredbojias

Hey everybody, I am a complete newbie with Javascript but was
wondering if anybody could tell me how to load pages dynamicly within
a div?

Here is the site: http://regiesrule.info, i would like to have the
tabs on the top instead of opening up something inside the same html
document I would like to be able to load an external webpage in it.
Also if that is impossible then i would like to know why the current
setup does not work in IE7?

You can't load pages dynamically into a div, but do a search for "server-
side includes".
 
A

Andy Dingley

Hey everybody, I am a complete newbie with Javascript but was
wondering if anybody could tell me how to load pages dynamicly within
a div?

As a starter, don't load pages into a <div>, load them into an
<iframe>

There's a technique called AJAX that is increasingly popular. It loads
XML content into a JavaScript object (program code, not HTML) and then
lets you manipulate it. You could then save such content (or part of
it) into a <div>.

However AJAX only works with XML, not with HTML. The XmlHttpRequest
and similar objects only load well-formed XML (which might be XHTML)
and not non-XML HTML. If you're working with this, then you still
need to use an <iframe> (which can be invisible) as a dynamic load
container and then you can manipulate its contents. This could
include writing that content into a <div>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top