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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mouseover change different page ?????

    howdy :-D


    ok.. here's what i want to know...

    i have an HTML page with and IFRAME
    could i have an image map on the page thats located in the IFrame and when the mouseover is activated could it change something in the parent html page ?

    someone please let me know what you think of this

    tanx for your time


  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Yes, you can

    Generally speaking, if I am not wrong, I remember that you can call any function (say, function_name() ) written in parent simply using onevent="parent.function_name()"
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Look, here a simple parent page:

    <html>
    <head>
    <script language="JavaScript">
    function function_name(){
    alert('message from parent');
    }
    </script>
    </head>

    <body>
    <iframe src="iframe.html"></iframe>
    </body>
    </html>

    ...and here's the content of the page "iframe.html"

    <html>
    <head>
    </head>
    <body>
    <input type="button" name="Button" value="Button" onclick="parent.function_name()">
    </body>
    </html>

    Now when click on the button from iframe you call the alert() written in the parent page
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    lost2, please read our rules before posting in the future. You cross posted the same question in multiple forums.

    See here:
    http://www.codingforums.com/rules.htm
    http://www.codingforums.com/postguide.htm
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.


  •  

    Posting Permissions

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