Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Submit a form automatically - no submit button required
Message
 
À
27/03/2001 13:58:26
Linda Hartig
Illinois Dept of Professional Regulation
Springfield, Illinois, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00489100
Message ID:
00489113
Vues:
18
Linda;

Seems like the examples I have seen all use an explicit means to submit a form. That is the user must select a Submit button. You could “play” with methods like OnChange, etc. to see how they behave but you have to have a business rule as to how the form will be submitted. The user will have to be trained in all likelihood regardless of which way you go.

After you find a method you are sure that is reliable you can use code like this:

Sub txtNew_OnChange()
frmTest..Submit()
location.href = "Response.asp?”
End Sub

This presumes a text box at the end of the form has a call to a method to fire the submit.

You may have to check to be sure if required data has been filled out so use something like this at the object level:

Sub txtData_OnBlur()
if len(frmTest.txtData.value) = 0 then
alert ("Caller Name is required")
frmTest.txtDataName.Focus
end if
End Sub

The same type of code should reside in the txtNew_OnChange() method, but would be at the form level. Just be sure all required data has been filled out before you allow anything to happen – like going to a response (save) form.

This could be tricky but you may be able to do it, and you could use vb script or java script. Still, I like Submit buttons.

Good luck.

Tom
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform