Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    478
    Thanks
    3
    Thanked 0 Times in 0 Posts

    onchange refresh iframe

    i wish to refresh an iframe called 'imagespage'
    when someone changes the image option pull down menu.

    i have this line which i believe needs changing but do not know what is the correct format of the onchange part.

    <select name="imageoption" onchange="window.open(this,'imagespage')">


    this is my iframe which shows the correct image previously selected.
    but when they change the pull down menu it shows an error saying that the page can not be found.


    <iframe id="imagespage" name="imagespage" src="./imagepage.php"></iframe>

  • #2
    Regular Coder Stooshie's Avatar
    Join Date
    Mar 2008
    Location
    Dundee, Scotland
    Posts
    379
    Thanks
    9
    Thanked 39 Times in 39 Posts
    Try this:
    Code:
    <select name="imageoption" onchange="top.frames['framename'].location='pagename'">
    Also, is the imagepage in the same directory as the page that is calling the javascript?
    Regards, Stooshie
    O


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •