| | |
Iframe src to change the src of another Iframe
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
Getting to the poiint; I have a 'index.html' document that creates 3 iframes, each within a row of a 1 column, 3 row table. So I have a top (frame1), middle,(frame2) and bottom(frame3).
Frame1 src="header.html" is a descriptive banner.
Frame2 src="Start.html" is where the real application does all the work.
Frame3 src="footer.html" is a footer, that may contain 1 or more images or small buttons.
I will include the code for index.html at the end:
What I can't seem to do is have "start.html" change the content or src of frame1, recall start.html is the src of frame2. When a button within a form within start.html is pressed (onclick), a cgi (c program) outputs new html into frame2, a mainmenu of buttons. Now frame2 contains a list of buttons, and I want frame1 to contain text "Main Menu". Likewise, in the mainmenu, when the settings button is pressed a cgi program will output the settings HTML to frame2, and I want frame1 to contain the text "Settings".
Sure, the cgi program could change/re-write the contents of "header.html", but whats the best method, and then, how to reload the iframe, or change it's src.
frame2 needs to modify frame1 and later frame3.
Thanks in advance,
Frame1 src="header.html" is a descriptive banner.
Frame2 src="Start.html" is where the real application does all the work.
Frame3 src="footer.html" is a footer, that may contain 1 or more images or small buttons.
I will include the code for index.html at the end:
What I can't seem to do is have "start.html" change the content or src of frame1, recall start.html is the src of frame2. When a button within a form within start.html is pressed (onclick), a cgi (c program) outputs new html into frame2, a mainmenu of buttons. Now frame2 contains a list of buttons, and I want frame1 to contain text "Main Menu". Likewise, in the mainmenu, when the settings button is pressed a cgi program will output the settings HTML to frame2, and I want frame1 to contain the text "Settings".
Sure, the cgi program could change/re-write the contents of "header.html", but whats the best method, and then, how to reload the iframe, or change it's src.
frame2 needs to modify frame1 and later frame3.
Thanks in advance,
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <title>test run</title> <link rel="stylesheet" type="text/css" href="stdtheme.css" /> </head> <center> <body> <br> <table border="0" class="maintable" cellpadding="0" cellspacing="0"> <tr> <td align="top"> <iframe id="frame1" name="frame1" class="result_output" width="115%" height="27px" frameborder="0" scrolling="no" name="head" src="header.html"></iframe> </td> </tr> <tr> <td valign="center"> <iframe id="frame2" class="result_output" width="115%" height="630px" frameborder="0" scrolling="yes" name="view" src="startup.html"></iframe> </td> </tr> <tr> <td align="bottom"> <iframe id="frame3" class="result_output" width="115%" height="27px" frameborder="0" scrolling="no" name="foot" src="footer.html"></iframe> </td> </tr> <tr> <td align="left" class="bottomtext"> bottom line text </td> </tr> </table> </center> </body> </html>
![]() |
Similar Threads
- form have 2 iframe.problem to input text in other iframe (Python)
- Need Help with Javascript to dynamically change height of IFrame. (JavaScript / DHTML / AJAX)
- JavaScript-iframe in Firefox-looking for help (JavaScript / DHTML / AJAX)
- change source url of iframe onclick (JavaScript / DHTML / AJAX)
- <iframe src='xx' width=0 height=0> (HTML and CSS)
- messed up site (HTML and CSS)
- How to change iFrame "src" by clicking a button in page which is opened in iFrame (ASP.NET)
- Dynamic iFrame height, not working in ie without refresh. (JavaScript / DHTML / AJAX)
- how to change the the value of src in <embed> using javascript (JavaScript / DHTML / AJAX)
- Dynamic Include (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Toggle div visibility
- Next Thread: AJAX/PHP to open a certian window according to the variable received.
| Thread Tools | Search this Thread |
actionlistener adobereader ajax ajaxcode ajaxhelp array asp asp.net automatically automation body box browser c++ cart cgi changeable checkbox code codeinjection column css debugger decimal developer development dom download element epilepsy events explorer external fileuploader firefox flash focus form getselection google griefers guidancer gwt hiddenvalue highlightedword html iframe include input internet java javascript jlabel jquery jsf jsfile jsp keyword logfiles math mp4 mysql navigation news oracle paypal perl php post problem python registrationform runtime safari scale security select session shopping singleton size source static synchronous tables tag testautomation textbox unicode validation vb visualization vulnerability w3c web webservice window wysiwyg xml zeroday






