...

View Full Version : Multipule functions for a button



crazymarvin
11-09-2006, 07:15 PM
Hey, I have very little experience when it comes to JavaScript, but what I want to do is; use a single button to hide a layer and open a pop up. Iím able to do both with separate buttons.

Script I used in the head:

<script type="text/javascript">
<!--

<script language="JavaScript" type="text/JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 440,top = 312');");
}
// End -->
</script>

Script I used in the layer:

<input type="button" onclick="javascript:popUp('feedback.htm')" value="Yes">


<input type="button" onClick="toggleBox('Layer1',0);" value="Yes">

I want to make a "Yes" button that does both those functions, Iíve looked on the internet and Iíve been unable to find any help. So if anyone can help me, it would be great.

Thanks

GJay
11-09-2006, 07:26 PM
you can separate commands with ;s, something like:


<button onclick="foo();bar();">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum