51 users online (0 members and 51 guests)  


  Results 1 to 4 of 4

Related

  1. Identical links on same page    Forum: Search Engine Optimization - SEO - Forum
    Replies: 3
  2. List of Directories that provide one-way links    Forum: Website Promotion Forum
    Replies: 5
  3. Different Colored Links On One Page?    Forum: CSS Forum
    Replies: 3
  4. Different Colored Links On One Page?    Forum: HTML Forum
    Replies: 3
  5. Replies: 1
  1. #1
    p_sganesh's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    2

    Question List Of Links In The Page

    Dear Friends,

    I am new to javascript and trying to get the list of all the links in the page.

    I have found the following code which does exactly what I wanted.

    http://javascript.internet.com/navigation/links-list.html

    However, the links of Google ads ("Ads by Goooooogle") is not getting displayed. I spent almost a day trying to get the links, using getElementByID, innerHTML, etc. but still unsuccessful.

    Any experts in javascript could crack it for me, I would be very grateful.

    Thank You,


  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi, welcome to the forums.

    As the google ads are generated themselves by javascript, they are not technically part of the document, which is why they are not showing up with this script.

    I'm not sure its a good idea to even try extracting their links, as the goooogle people are quite strict about what you can and can't do with their ads. Unless you have an extremely pressing need to also list your google ads in this list, I would leave well alone.

    To actually get this done, it would be very complicated. have a look at the source of the show_ads.js referenced in your page, I am not sure its going to be practical to grab them in any case.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    p_sganesh's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    2

    Lets Crack This Problem

    Hello Friends,

    When I right click and 'view source' when the mouse is over the ads, I am able to see the full html of the ads-window.

    If we can get hold of this text from within javascript, our job is half-done.

    In fact, I tried to go through show_ads.js....

    I removed the reference to show_ads.js and in the place copied the contents of the file show_ads.js...

    Then I wrote a simple function wr(x) which does this

    {
    document.write('begin' + x + 'end') ;
    }

    and replaced document.write() to wr() whereever it appears in show_ads.js

    But unfortunately, browser(IE6.0) says error in page and doesnt work..... (What I am trying to do is to display the generated script which gets the final html)

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I'm sorry, but what your attempting to do is against the google Useage Policy

    Source: https://www.google.com/adsense/policies

    Code Modification

    Any AdSense ad code or search box code must be pasted directly into Web pages without modification. AdSense participants are not allowed to alter the ad code for any reason, include changing the ad layout, behavior, or delivery of ads.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread