Problem of duplicate function names: When 2 same type of JS loaded in 1 Page

Discussion in 'HTML' started by hemant.singh@gmail.com, Apr 23, 2006.

  1. Guest

    I am stuck with strange JS issue

    My product gives user to show some images(which track mouseover) on
    page by embedding script like
    <script src=http://domain.com/GetDynamicJS?domagic=1>
    </script>

    Now user is embedding more than of the above and when user mouse over's
    the image output of first1 than function getting called is script
    loaded in last ... thus error, as that script don't have the relevant
    data for it ...
    Any solution for ?
    Following possible solutions look feasible to me?
    1) Somehow I get a static variable and all the JS loaded from my domain
    will keep data in that static variable, how to implement it, im not
    sure :)
    2) This is crude, but how about I dynamically give method names of
    events in script such that there are no duplicate function names, but
    this will again bring lot of other complexity and might need usuage of
    eval which is evil and I'll look some option for not using it rather


    TIA
    , Apr 23, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marcelo Birnbach [MS]
    Replies:
    0
    Views:
    3,300
    Marcelo Birnbach [MS]
    Jun 28, 2003
  2. Udo Corban
    Replies:
    0
    Views:
    3,814
    Udo Corban
    Jan 23, 2004
  3. Lewis G. Pringle, Jr.
    Replies:
    0
    Views:
    588
    Lewis G. Pringle, Jr.
    Sep 30, 2003
  4. Replies:
    1
    Views:
    661
    Alessandro Zifiglio
    Jul 18, 2006
  5. Replies:
    2
    Views:
    131
    Thomas 'PointedEars' Lahn
    Apr 23, 2006
Loading...

Share This Page