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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.