Please help Java Script behaves strange

Discussion in 'JavaScript' started by newbie191, Dec 5, 2009.

  1. #1
    Hi

    Please have a look at this page Click Here In this page there is a form based on java script which says choose one of 387 working proxies. I know this is java script because this came from this script.

    <script language='JavaScript' src='http://hotproxylist.info/proxylist.js'></script>
    Code (markup):
    My problem is that the links in this form are not clickable as they should be.
    This is a matter of great concern to me because adsense code is also based on java script and if something is going wrong with my site the adsense code might also not be clickable. Can anybody tell me what's happening????
     
    newbie191, Dec 5, 2009 IP
  2. lp1051

    lp1051 Well-Known Member

    Messages:
    163
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Hi,
    the select list doesn't refer correctly to the parent form. More exactly this line:
    document.write('<select name=url size=11 style="width: 200px;" onclick="document.form.submit();">');
    Code (markup):
    should be instead
    document.write('<select name=url size=11 style="width: 200px;" onclick="this.form.submit();">');
    Code (markup):
    If you have access to the source code (http://hotproxylist.info/proxylist.js) change it there, otherwise contact them and ask to change it. If it's not possible then you would need to change the onclick event after the proxy list is loaded...
     
    lp1051, Dec 5, 2009 IP
  3. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #3
    And by the way, the code had better be written in this format:

     
    myst_dg, Dec 5, 2009 IP