i need to call customFormElements.js js function after aspx page is loaded, after submit button is clicked. can i do this and if yes how?
window.onload option is not good…
i need to call this file after i press submit button becouse aspx ajax library clear my js file logic and i need to reload it again.
what i am getting is that you want to call a javascript function after your page is loaded for this i think its better to use setTimeout function:
With JavaScript, it is possible to execute some code after a specified time-interval. This is called timing events.
It’s very easy to time events in JavaScript. The two key methods that are used are:
Note: The setTimeout() and clearTimeout() are both methods of the HTML DOM Window object.
The setTimeout() Method
Syntax
var t=setTimeout(“javascript statement”,milliseconds);
The setTimeout() method returns a value – In the statement above, the value is stored in a variable called t. If you want to cancel this setTimeout(), you can refer to it using the variable name.
The first parameter of setTimeout() is a string that contains a JavaScript statement. This statement could be a statement like “alert(‘5 seconds!’)” or a call to a function, like “alertMsg()”.
The second parameter indicates how many milliseconds from now you want to execute the first parameter.
so just create a javascript function in which use setTimeout to call your desired javascript funciton as set time seconds for that
and u can then call this javascript function on
you can see good example on below link:
http://dotnetacademy.blogspot.com/2010/09/timer-in-javascript.html
http://www.w3schools.com/js/js_timing.asp