Javascript Hyperlink Function is Called Twice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kai97
    New Member
    • Sep 2008
    • 4

    Javascript Hyperlink Function is Called Twice

    I am using <a href="javascrip t:someFunction( 'someValue','so meValue2')"> Click here </a>

    But when i clicked on it, it actually call the "someFuncti on" function twice.
    This only happen to Mozilla Browser. IE only called once.

    Kindly advise what is wrong with this method?
    10,000 Thank you!!

    Regard,
    Jason
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #2
    Hi Kai, I tried this code in IE as well as Mozilla I am getting that someFunction() called only once. can u please tell in which version of mozilla u got the call twice

    Regards
    Ramanan Kalirajan

    Comment

    • kai97
      New Member
      • Sep 2008
      • 4

      #3
      Originally posted by RamananKaliraja n
      Hi Kai, I tried this code in IE as well as Mozilla I am getting that someFunction() called only once. can u please tell in which version of mozilla u got the call twice

      Regards
      Ramanan Kalirajan
      Hi Ramanan,

      Thanks for your prompt reply!

      I tried both v2 and v3 of mozilla browser and both the same.
      I had google-ing about this problem and realised that it happened to others too.
      [removed link]
      However, i cannot find a link which provide a workable solution.
      Sorry, I am still new in web application deverlopment.
      Hope to hear from you again soon!
      Thank you.

      Regards
      Kai
      Last edited by acoder; Sep 3 '08, 10:25 AM. Reason: Removed link

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Post the code for someFunction. As a general rule, you should put JavaScript in onclick and put a real URL in the href attribute.

        Comment

        • kai97
          New Member
          • Sep 2008
          • 4

          #5
          Originally posted by acoder
          Post the code for someFunction. As a general rule, you should put JavaScript in onclick and put a real URL in the href attribute.

          Hi Acoder,

          Thanks for the help, i am a very new developer for my current company.
          Thus, i don't have the right to review any of my company's codes to anyone.
          I am very sorry for that... however, with the help of my senior developer, we found out that the problem is not lie in the javascript but the <frame> tag.
          It called itself again when we have something like <frame src="">.
          We have tried to put <frame src="#"> or <frame src="dummy.htm" > but none of the solution works. We will try again with other methods.
          Thanks again for everyone who have help up. :)

          Regards,
          Jason

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            What does someFunction() do? Can you not just post the relevant part of the code?

            Comment

            Working...