Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the value of an input element
Message
De
10/06/2003 11:51:55
 
 
À
10/06/2003 11:45:22
Philip Jones
Cornwall County Council
Truro, Royaume Uni
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00798429
Message ID:
00798434
Vues:
27
>Hi,
>I've got a form with a load of checkboxes on it and I want to submit a value which will depend on the selections made in the checkboxes.
>I've written a javascript function to change the value of a hidden input box. The value of that input box will be submitted.
>
>Trouble is it's always undefined.
>In my javascript function I've got
>document.nameofdocument.nameofinputbox.value=="3"
>If I do
>alert(document.nameofdocument.nameofinputbox.value) from within the function it gives a message saying 3.
>
>But when I submit the form the value is undefined.
>
>Has anyone got any idea what is going wrong here please?

The deal with checkboxes is always logical. So, assigning a value won't work. So, basically, if you wish to plug in true, you need to do something like document.nameofdocument.nameofinputbox.checked=true.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform