SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    israel
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question getting main document links from sidebar?

    i am trying to gain access to the main document links list from within the sidebar document in firefox. but all i see to be able to get is the links list for the sidebar document itself and that doesnt help me much.

    can anyone give me a clue as to what i should use?


  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Portsmouth UK
    Posts
    1,499
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    previous replys have gone missing

    PHP Code:

    <body onload="Lks();" >
    <
    script language="JavaScript" type="text/javascript">
    <!--
    function 
    Lks(){
     
    lks=top.*FrameNameofPageWithLinks*.document.getElementsByTagName('A');
     
    alert('Nu of Links:'+lks.length);

    }
    //-->
    </script>

  3. #3
    SitePoint Member
    Join Date
    Dec 2004
    Location
    israel
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey...

    i've tried but but it doesn't work.
    also i don't know what the frame name is. all i did was use the firefox feature "open as sidebar" on the link to my document.
    seeing as such i don't know what it calls the main frame.
    i have managed to make the links pressed on the sidebar open in the main window by changing the <body target='content' ... to content.
    so i tried using content as the frame name in your example but it didn't work.
    i know this can be done because i did this in IE. but what i did there doesn't work in firefox.

    any further advice??

    thanks...
    tom


Bookmarks

Posting Permissions

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