Jump to content


Photo

load iframe on submit


  • Please log in to reply
1 reply to this topic

#1 CanMan2004

CanMan2004
  • Members
  • PipPipPip
  • Advanced Member
  • 254 posts

Posted 21 September 2006 - 01:55 PM

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

#2 jvrothjr

jvrothjr
  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 21 September 2006 - 03:03 PM

index.php code
<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>

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


When the button in Frame2 is selected it reloads with a new page in main iframe index2.php
If you understand everything you know nothing!

http://rcchjr.awardspace.com/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users