how I can use jscript file in asp 2.0
-
I want to use java script function in asp page"aspx" I have the code in html page but i want to run it in aspx page and i don't know about jscript file i didn't use it before can any body help me thx.:sigh:
let's work together
-
I want to use java script function in asp page"aspx" I have the code in html page but i want to run it in aspx page and i don't know about jscript file i didn't use it before can any body help me thx.:sigh:
let's work together
Hi Ahmed, aspx has really something to do with html. If you take a closer look at an aspx file, you will see the regular etc... tag. So, to include a javascript file and use functions therein, follow the example below: (1) Say we have a file called scripts.js containing a function "test()" that we want to use. (2) Place the tag "script language="javascript" src="scripts.js">" tag between the "" and "" tag (3) Next say i have a texbox and i want to execute function "test()" on leaving the textbox Code :
-
I want to use java script function in asp page"aspx" I have the code in html page but i want to run it in aspx page and i don't know about jscript file i didn't use it before can any body help me thx.:sigh:
let's work together
i don't understand your question carefully. but u can use from this code:
We Can Do Anything, If We Want It
-
I want to use java script function in asp page"aspx" I have the code in html page but i want to run it in aspx page and i don't know about jscript file i didn't use it before can any body help me thx.:sigh:
let's work together
if you want your code to run at the time of page load... use the following code... Page.RegisterStartupScript("MyDemo", "alert('hi there');"); /*use the function name on the place of alert()*/ and if you want ur JS code to fire on the occurance of a button onClick.... Button1.Attributes.Add("onclick", "sampleJSfunction()");
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”