Buttons

I have 2 buttons on a page. Pressing either button will perform different things on the same page. I need a way to differentiate which button was pressed to do do some functions within the same page.
[201 byte] By [mac_hua] at [2007-11-17 13:15:17]
# 1 Re: Buttons
<Head>
...
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub button1_onclick
'your code here
End Sub-->
</SCRIPT>

OR

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function button1_onclick() {

'your code here
}

//-->
</SCRIPT>
</HEAD>

thanx/good luck,
adam
forty7 at 2007-11-9 11:38:28 >
# 2 Re: Buttons
I'll try this, thanks.
mac_hua at 2007-11-9 11:39:29 >
# 3 Re: Buttons
Try this

In ur asp file..

<% request.form("button1") "" then
call fun1()

request.form("button2") "" then
call fun2()
.
.

html...

form action="one.asp" method="post"..

(action should be the same file name"

input type=submit name=button1

input type=submit name=button2
form

html

<%
function fun1()
.
.

<% function fun2()
.
.
pmmbala at 2007-11-9 11:40:39 >
# 4 Re: Buttons
Try this

In ur asp file..

<% request.form("button1") "" then
call fun1()

request.form("button2") "" then
call fun2()
.
.

html...

form action="one.asp" method="post"..

(action should be the same file name"

input type=submit name=button1

input type=submit name=button2
form

html

<%
function fun1()
.
.

<% function fun2()
.
.
pmmbala_old at 2007-11-9 11:41:34 >
# 5 Re: Buttons
your post got all screwed up. make sure to escape < with &lt

thanx/good luck,
adam
forty7 at 2007-11-9 11:42:33 >