Submit disabled form elements...
Submit disabled form elements...
am 15.11.2007 00:02:03 von SirG
Is there a way to submit a disabled text box?
I'm wanting to use a disabled text box to submit use picked date
information that is selected using a date picker script, but I do not
want the users to have the ability to modify the date outside of the
script.
Is this possible?
Re: Submit disabled form elements...
am 15.11.2007 00:12:16 von rf
"SirG" wrote in message
news:1195081323.421504.249160@v3g2000hsg.googlegroups.com...
> Is there a way to submit a disabled text box?
http://www.w3.org/TR/html401/interact/forms.html#adef-disabl ed
"Disabled controls cannot be successful". That is they are not sent to the
host.
Use a hidden field.
--
Richard.
Re: Submit disabled form elements...
am 15.11.2007 00:59:16 von jkorpela
Scripsit SirG:
> Is there a way to submit a disabled text box?
By definition, disabled means it won't be included in the form data, i.e.
won't be submitted. So why do make it disabled and then ask how to get it
submitted?
(There are ways to have it included it in form data via JavaScript, but they
more or less mean that it is taken away from the disabled state.)
> I'm wanting to use a disabled text box to submit use picked date
> information that is selected using a date picker script, but I do not
> want the users to have the ability to modify the date outside of the
> script.
I wonder what you are really doing. You cannot prevent users from modifying
the data, or submitting whatever data they want; you can just try to cope
with it and to discard malformed data.
As usual, a URL would...
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: Submit disabled form elements...
am 15.11.2007 17:19:36 von SirG
> I wonder what you are really doing.
I'm building an Intranet helpdesk site and the page I am currently
working on has a date picker control that populates a text box with
the date selected by the user. They need to be able to see the date
they pick but not modify it unless they use the script to change/
modify/clear the selected date.
Due to the fact that they need to be able to see the date chosen a
hidden text box won't work for this situation, but thanks for the
idea.
The reason I do not want the users to be able to modify the date
chosen is because I need this information is a specific format.
Unfortunatly, I'm not good with java or java frameworks although I am
looking into them for input validation.
Does that help clarify what I'm doing? Any suggestions for a work
around?
> As usual, a URL would...
Ahh yes, I would love to submit a url however, the only thing I ever
work on is the intranet... which means no outside facing pages.
*shrug*
Re: Submit disabled form elements...
am 15.11.2007 17:26:59 von SirG
> http://www.w3.org/TR/html401/interact/forms.html#adef-disabl ed
Thanks for the link. After reading through that I've decided to use
the readonly option instead of disabled as that does what I'm looking
for.
* Read-only elements receive focus but cannot be modified by the
user.
* Read-only elements are included in tabbing navigation.
* Read-only elements may be successful.
Thanks for the help!
Steve
Re: Submit disabled form elements...
am 15.11.2007 17:50:42 von lws4art
SirG wrote:
>> I wonder what you are really doing.
>
> I'm building an Intranet helpdesk site and the page I am currently
> working on has a date picker control that populates a text box with
> the date selected by the user. They need to be able to see the date
> they pick but not modify it unless they use the script to change/
> modify/clear the selected date.
Display the date as plain text but not in a form element for the user
and put the date in a hidden field for transmission, OR instead of the
hidden field, have the receiving script assign the date and time...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com