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
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Layer gotoURL target question

    First of all I don't know any java or much html. I just use frontpage 2003.

    SO my question is, is it possible to have a layer that onmouseslick goes to url "x" can i choose the target frame and how would i go about doing that.

    Here is the HTML of a test.. The Blue signifies the layer link that i want the target information, and the red is the targeted Frame

    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <!-- #BeginEditable "doctitle" -->
    <title>New Page 1</title>
    <!-- #EndEditable -->
    <script language="JavaScript">
    <!--
    function FP_goToURL(url) {//v1.0
     window.location=url;
    }
    // -->
    </script>
    </head>
    
    <body background="../My%20Documents/My%20Webs/Scenic002.jpg" style="background-attachment: fixed" text="#FFFFFF">
    
    <div style="position: absolute; left: 333px; top: 20px; width: 212px; height: 192px; z-index: 1" id="layer1" onclick="FP_goToURL(/*href*/'x')">
    &nbsp;</div>
    
    <p><iframe name="I1" src="page2.htm">
    Your browser does not support inline frames or is currently configured not to display inline frames.
    </iframe></p>
    
    </body>
    
    </html>

  • #2
    Regular Coder
    Join Date
    Nov 2004
    Location
    The land of chocolate
    Posts
    226
    Thanks
    1
    Thanked 16 Times in 16 Posts
    In your JavaScript function (not the same as Java, by the way ), try to change the line window.location=url; to window.I1.location=url;, and it should work.
    -Snow

    Susie, if you want to see your doll again, leave $100 in this envelope by the tree out front. Do NOT call the police. You CANNOT trace us. You CANNOT find us.

    Sincerely,
    - Calvin.


  •  

    Posting Permissions

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