Jump to content


Photo

iFrame to Table intergration Problem


  • Please log in to reply
1 reply to this topic

#1 dewbie

dewbie
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 March 2006 - 10:52 AM

Hey, im working on a large site with multiple pages and updates to parts of each page daily, so its only practical to have the bits that need updating as iFrames (so I only have to update 1 html page, instead of 20).

The site is designed using tables. There is a standard Navigation bar, and what im trying to achieve is when you click (for example) "Roster" on the navbar, then one of the tables on that page (for example tableID "RosterTable" will display the iFrame "roster.htm" in the table "RosterTable".

I thought it would be a case of changing the button property for "target" to something like "RosterTable" (the id of the table) and the sourse being some sort of <iframe> code... but it doesnt work.

Is it possible to do this? If so.. how!

I apreciate any help on this matter

[a href=\"http://www.dewbie.plus.com/kk/\" target=\"_blank\"]Here[/a] is the web site so you can visualise what im trying to do.

#2 Gast

Gast
  • Members
  • PipPipPip
  • Advanced Member
  • 131 posts
  • LocationSouth East England

Posted 23 March 2006 - 10:43 AM

If it is a button (as in an input button):

<input type="button" value="Roster" onclick="document.getElementById('iframeId').src='roster.htm'" />

Where 'iframeId' is the ID of the iframe you want to change.
OS and Internet Specs:
Windows XP (with SP2), 1680x1050, PHP 4, MySQL 3, Internet Explorer 6 &7 /FireFox 2.0/Opera 9.2

Tutorials:
Simple Introduction to AJAX and XMLHttpRequest
Creating Live Data with AJAX Making a Google Suggest like application




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users