Hi All,
I had a issue with converting an inline js function to external file , I know it is pretty dumb question, But would really appreciate if you guys can help me in solving it.
Steps - I cut the script function from a file and pasted in a newly created .js file.
and then i added a reference -
<script type="text/javascript" src="/test/js/my.js"></script>
My myscript contains a var shareMenu which is actully used in following.
External Script Contents - There is no script tag
var shareMenu = new Array();
shareMenu[0] = '<a target="_blank" href=.....>
I am using using my shareMenu var in page as -
<a href="##" rel="nofollow" onClick="return dropdownmenu(this, event, shareMenu, '150')" onMouseout="delayhidemenu()">
Whenever i debug - it gives me error - shareMenu undefined
To solve this i added a path in <a target ="/test/js/my.js".. > But it doesnt work as well. Is there any other way to use the external js var ?
Please suggest with some ideas.