Mar 2, 2001 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 How do you check to see if a Javascript function exists within a page. Need to know if it's there before I call it!! Cheers
How do you check to see if a Javascript function exists within a page. Need to know if it's there before I call it!! Cheers
Mar 2, 2001 #2 Kirilla Programmer Joined Jul 12, 2000 Messages 101 Location HU Hi. An example: <html> <Script Language="JavaScript"> function newWin() { var strm="mmde\"fggrgr"; alert(strm); } </Script> <body> kekfergregreg <input type=button value="KKKK" onclick="newWin()"> <input type=button value="check" onclick="javascript : try { isTrue() }catch(Exception){alert('Not valid!'); }"> </body> </html> The check button call an invalid method. regards, Kirilla Upvote 0 Downvote
Hi. An example: <html> <Script Language="JavaScript"> function newWin() { var strm="mmde\"fggrgr"; alert(strm); } </Script> <body> kekfergregreg <input type=button value="KKKK" onclick="newWin()"> <input type=button value="check" onclick="javascript : try { isTrue() }catch(Exception){alert('Not valid!'); }"> </body> </html> The check button call an invalid method. regards, Kirilla
Mar 2, 2001 1 #3 luciddream Programmer Joined Nov 8, 2000 Messages 712 Location US this works for me: function func() { alert('bob'); } if(typeof(func) != "undefined" { func(); } luciddream@subdimension.com Upvote 0 Downvote
this works for me: function func() { alert('bob'); } if(typeof(func) != "undefined" { func(); } luciddream@subdimension.com