javascript - 2 different js file in same html -


what want achieve call external .js file .aspx, first thing generate tooltip function in master page, go .aspx call external .js file, doesnt work. in .aspx, cant alert homepage.js, 1 can tell me mistake?

master page

<script type="text/javascript" > function showtooltip() { //do based on data passing in 

}

homepage.aspx

<script type="text/javascript" src="http://[servername]/scripts/homepage.js"></script> 

homepage.js

<script type="text/javascript" > alert("homepage.js");    var datamenu = {     lbl1: "fruit",     lbl2: "auto mobile" } </script> 

make sure document ready before script called.

$(function(){   alert("homepage.js"); });    var datamenu = {     lbl1: "fruit",     lbl2: "auto mobile"   } 

make sure path file correct , looks have os path in src..give relative path


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -