PDA

Click to See Complete Forum and Search --> : IIS+VB - Forms/Buttons etc.


Jan 25th, 2001, 10:59 AM
You're on earth and I'm not exactly sure what you're asking but maybe this will help.

A more complete HTML form would look something like:


<html>
<form method="post" ACTION="somescript.asp">
<input NAME="action" type=submit value="Button1">
<input NAME="action" type=submit value="Button2">
<input NAME="action" type=submit value="Button3">
</form>
</html>

Your FORM element needs to have an ACTION attribute that indicates what the form submits to. In this example it submits to an ASP. There lots of different things you can submit to but this IS an ASP forum. :)

You need to give your form elements a NAME attribute so that you can retrieve their VALUEs from the script you submit to.

In this example, I've called all the submit buttons 'action'. Inside an ASP script (or inside a webclass - I think - it's been a while) you would retrieve the values with something like:


vntSomeVariant = Request.Form("action")

In this case the value of Request.Form("name") would be 'Button1', 'Button2', or 'Button3' depending on what button you clicked.

Hope this helps,
Paul

coox
Jan 26th, 2001, 03:01 AM
Thanks mate, helps a lot! I'm just new to all this html styley thing, and finding it a bit wierd.

Can you explain what the form thing is for?

Jan 26th, 2001, 09:36 AM
I'm not sure exactly what you're wanting to know, but I'll give it a try. An HTML form allows you to solicit and receive data from a user. The trick with HTML forms is that you have to have something to receive and do something with the form data. HTML is great for displaying information including forms that allow data entry, but you can't actually truly process data with HTML - for that you need a script or application.

There are many languages that you can do form handling scripts or programs with. You can do them in Perl, VBScript (Active Server Pages), Visual Basic, C/C++, PHP just to name a few. You can receive data from HTML forms with VB webclasses too. I used to do some webclass programming but switched to ASPs when I learned how easy ASP scripting is.

If you like, I can post some examples of how an HTML for might interact with an ASP and I might even have a webclass example laying around somewhere.

Hope this helps,
Paul

PS - Sorry for the delayed reply...out internet connection is intermittent right now :(