...

View Full Version : Updating Parts of a Web Page



seminaljim
10-30-2011, 04:07 AM
OK, I have a web page like this...


================
| DIV Header |
================
===== ===========
|Menu|| CONTENT |
===== ===========


Is there a way of only updating the content part, without refreashing the page.
IE, if I select a menu item, the content part will change, so that i could have a php file called contents that shows different modules depending on what menu item is selected?

I hope yous understand what i mean... Im sooo new to this.

sunfighter
10-30-2011, 06:43 PM
This might help
<html>
<body>

<iframe src="test.html" width="600px;" height="300px;" style="float:right;">
<p>Your browser does not support iframes.</p>
</iframe>

</body>
</html>

</body>
</html>

seminaljim
10-30-2011, 10:07 PM
OK, cool... thanks... how to i dynamically change it thought, can i bind an event to it so that the iframe chages its contents?

sunfighter
10-30-2011, 10:25 PM
Thought you were going to do this with the menu section?

And a warning = It is up to the browser as to wither iframes works. I use FF and have it so everything opens in a new tab and I think most people do this. So it may be better to use AJAX to do this.
But here is the iframe way:


<html>
<body>

<a href="http://www.yahoo.com" target="here">YAHOO</a>

<iframe src="test_2.html" width="600px;" height="300px;" name="here" style="float:right;">
<p>Your browser does not support iframes.</p>
</iframe>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum