Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-30-2011, 03:07 AM   PM User | #1
seminaljim
New Coder

 
Join Date: Oct 2011
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
seminaljim is an unknown quantity at this point
Updating Parts of a Web Page

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.
seminaljim is offline   Reply With Quote
Old 10-30-2011, 05:43 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
This might help
Code:
<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>
sunfighter is offline   Reply With Quote
Users who have thanked sunfighter for this post:
seminaljim (10-30-2011)
Old 10-30-2011, 09:07 PM   PM User | #3
seminaljim
New Coder

 
Join Date: Oct 2011
Posts: 13
Thanks: 6
Thanked 0 Times in 0 Posts
seminaljim is an unknown quantity at this point
OK, cool... thanks... how to i dynamically change it thought, can i bind an event to it so that the iframe chages its contents?
seminaljim is offline   Reply With Quote
Old 10-30-2011, 09:25 PM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
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:

Code:
<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>
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Tags
dynamic, html, layout, page design, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:31 AM.


Advertisement
Log in to turn off these ads.