problem in loading of javascript?
hi,
i am taken one master page and 4 child pages i am write a javascript function for childpages 1 and 2. and childpages 3 and 4 not contain any javascript code. i am providing linkbuttons in master page for navigate childpages.
i am write the javascript function name is charscheck() it check the characters of textbox. and this function name is write in body tag of master page. i.e., <body onload="charscheck();"> .
my problem is when i click linkbuttons of childpages 1 and 2 , its redirect to that page, its working. but i am click linkbuttons of childpages 3 and4 it display a script error i.e., "Microsoft JScript runtime error: Object expected" .
(it tells in that childpages 3 and 4 not contain the javascript function) . if i write javascript function for all pages then that time this error message is not displayed. but in our project javascript is use only childpages 1 and 2.
How to solve this problem. my aim is if i am going childpage 3 and 4 it directly redirects not to display javascript error message.how todo this,please give a solution.
Thanks.