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

    Using omMouseOver to auto display targeted text of a 2nd page inside a separate frame

    Hello, i was wondering if it was possible to use javascript to expand the 'onMouseOver' property.

    What i would like to do is be able to use the 'onMouse Over' property of a link to automatically jump to a specified targeted paragraph of text contained on another html file (display it of course)...BUT can it be done when i want the display to be shown in another frame located outside of the main 'onMouseOver' property activation.

    If this can be achieved could this be then used to do multiple targeted paragraphs (of course only using one 'onMouseOver' property link at a time).

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    from what you describe, it is just "linking" to an anchor in another page in another frame...

    //function that does what you want..

    function whatever(whichAnchor){
    document.FrameName.location.href="somepage.html#"+whichAnchor;
    }

    if the 'sompage.html' is different..you can always pass everything into the function....ala..
    javascript:whatever('apage.html#blue')

    let me know.

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    autolinking targeted section of another page inside a frame

    Hi there BrightNail,

    Well just to let u know it does work but with a few small kinks...

    I have added the code you gave me (with my test variables):

    <script language="javascript">
    function autolink(alink){
    document.top.location.href="top.html#"+alink;
    } </script>

    and where the onMouseOver effect is to take place the code looks like this:

    <a href=logo-menu.html onclick="dblact()" onMouseOver="autolink('firstscroll');return true">

    Now the problem is that your code

    document.FrameName.location.href="***.html#"+****;

    is not doing anything except giving me an error msg stating:

    " 'document.top.location' is null or not an object"

    When i replace your code with "parent.top.location.href" it works (slightly), it breaks all frames and displays the 'firstscroll' section of 'top.html' in a clean browser window (by me having to click 'back' to view & retest the onMouseOver area again).

    I would like it to do just that BUT inside a frame of its own (aka no breaking frames), whilst still displaying the main onMouseOver area.

    If you can't follow what I'm trying to do - let me know your private email (if this is allowed) and i'll get "test" document ready for you to view on the web.


  •  

    Posting Permissions

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