...

View Full Version : Using a one line function set to an onclick event.



ghostz00
08-30-2007, 02:14 AM
I figure this is possible somehow, my first thought was:



<input type="button" value="myBtn" onclick="javascript:function(){ myfunction1(); myfunction2(); }" />


That didn't work, but it didn't give me an error either ?????

Also do I need the "javascript:"?

Please critique away.

thanks in advance...

jgadbois
08-30-2007, 04:55 AM
Do you need the anonymous function?

I think you could just do...



<input type="button" value="myBtn" onclick="myfunction1(); myfunction2();" />

ghostz00
08-30-2007, 05:09 AM
.....thanks jgadbois....

that works perfectly...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum