You are here: Problem of duplicate function names: When 2 same type of JS loaded in 1 Page « HTML « IT news, forums, messages
Problem of duplicate function names: When 2 same type of JS loaded in 1 Page

Posted by hemant.singh on 04/23/06 07:17

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация