|
-
Mar 31st, 2004, 05:30 PM
#1
Thread Starter
Addicted Member
Button value on form
I have code that is connecting to a database and loading a recordset. The recordset is loaded depending on the button that is clicked. So I say
<%
if document.form.value="Add" then
load recordet(add)
else
load recordet(edit)
end if
%>
I keep getting an error that says that document property can not be found. Is there anyway to reference the button??
-
Mar 31st, 2004, 06:59 PM
#2
save this as any asp file and try it.
VB Code:
<%
dim btn
bttn= Request.form("ButtonClicked")
if bttn="Add" then
response.write "you pressed add button<br>"
elseif bttn="Edit" then
response.write "you pressed edit button<br>"
end if
%>
<head>
<script>
function SetClick(v)
{
document.form1.buttonclicked.value=v;
document.form1.submit();
}
</script>
</head>
Click one of the Button !
<form name=form1 action="" method=post>
<input type=hidden name=buttonclicked>
<input type=button name=Add value=Add onclick="javascript:SetClick('Add');">
<input type=button name=Edit value=Edit onclick="javascript:SetClick('Edit');">
</form>
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Apr 1st, 2004, 09:49 AM
#3
Thread Starter
Addicted Member
Thanks! It worked!
-
Apr 1st, 2004, 05:01 PM
#4
Thread Starter
Addicted Member
Close form
I have a link on the form and when the user clicks on a link the pop up comes up and asks a few questions then when they press submit I want the popup to close and the parent form to be filled with the values they entered.
How do I close the popup window and then load thoses values into the parent form?
-
Apr 2nd, 2004, 08:26 AM
#5
Thread Starter
Addicted Member
Help Menu
Anyone created a help menu for an asp page?
-
Apr 2nd, 2004, 10:06 AM
#6
Thread Starter
Addicted Member
Sum of text boxes
I have 4 text boxes in a colmn and a total box at the end. The total box will be the sum of the values in textboxes 1-4. How do I get the total box to sum when alues are added or changed in any of the four boxes?
-
Apr 2nd, 2004, 03:27 PM
#7
Re: Sum of text boxes
Originally posted by realgoldn
I have 4 text boxes in a colmn and a total box at the end. The total box will be the sum of the values in textboxes 1-4. How do I get the total box to sum when alues are added or changed in any of the four boxes?
I guess i have answered your question in your other thread.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|