Jump to content

load iframe on submit


CanMan2004

Recommended Posts

Hi all

I have a page with 2 iframes on it, one of them holds a form, another one is blank.

The iframe with the form has a file browse input box on it, the code is

<input name="image" type="file" class="txt" id="image">

I want to make it so that when the user has selected a image from the file input box, it loads a page into the other iframe, so its basically breaking out of the form iframe and loading the blank iframe with a specified filename.

Is that possible?

Thanks in advance

Dave
Link to comment
https://forums.phpfreaks.com/topic/21533-load-iframe-on-submit/
Share on other sites

index.php code
[code=php:0]
<IFRAME SRC='menu.php' scrolling='auto' FRAMEBORDER=0 width=20% height=90% align=left name=frame2>
<IFRAME SRC='index1.php' scrolling='auto' FRAMEBORDER=0 width=80% height=90% align=right name=main>
[/code]

menu.php code
[code=php:0]
<form method=POST name=form1 action=''>
<a href = 'index2.php' TARGET='main'>
<img src='home.gif' onclick='submit()'>
</form>
[/code]


When the button in Frame2 is selected it reloads with a new page in main iframe index2.php
Link to comment
https://forums.phpfreaks.com/topic/21533-load-iframe-on-submit/#findComment-96122
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.