Re: [PHP] Formatting input text?
On Saturday 16 March 2002 23:44, Andre Dubuc wrote: > I wonder whether this is possible? > > I would like to format a text input so that the first letter of the input > (as the user is typing it in) would automatically be converted to Uppercase > (capitals). Furthermore, if it is possible, I would like to pre-format the > date "input type=text" so that only numbers or dashes could be entered. I > really enjoyted this capablity in Paradox PAL language. > > Does anything exist that would allow me to do this in PHP? > > An example: > > Code > Surname > > > Screen (and into database) > Surname: black >> would be converted as they type to >> Surname: Black > > Any suggestions or advice would be greatly appreciated. Wrong place! PHP is a server-side language. What you need requires client-side -- Javascript or Java. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* People who go to conferences are the ones who shouldn't. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting input text?
As Oliver says, it is possible in PHP, but then you have to do it, AFTER the form is submitted... Just do some regular expressions on your data before displaying / storing it... Edward - Original Message - From: "Andre Dubuc" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, March 16, 2002 7:49 PM Subject: Re: [PHP] Formatting input text? > Hi Edward, > > If I wanted to avoid Javascript, could I still accomplish this in PHP? > > Regards, Andre > > > On Saturday 16 March 2002 13:33, you wrote: > > Just use javascript... (be careful, what works with IE, doesn't > > automatically work with Netscape)... > > > > Greets, > > > > Edward > > > > - Original Message - > > From: "Andre Dubuc" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, March 16, 2002 4:44 PM > > Subject: [PHP] Formatting input text? > > > > > I wonder whether this is possible? > > > > > > I would like to format a text input so that the first letter of the input > > > > (as > > > > > the user is typing it in) would automatically be converted to Uppercase > > > (capitals). Furthermore, if it is possible, I would like to pre-format > > > the date "input type=text" so that only numbers or dashes could be > > > entered. I really enjoyted this capablity in Paradox PAL language. > > > > > > Does anything exist that would allow me to do this in PHP? > > > > > > An example: > > > > > > Code > > > Surname > > > > > > > > > Screen (and into database) > > > Surname: black >> would be converted as they type to >> Surname: Black > > > > > > Any suggestions or advice would be greatly appreciated. > > > Tia, > > > Andre > > > > > > > > > -- > > > Please pray the Holy Rosary to end the holocaust of abortion. > > > Remember in your prayers the suffering souls in Purgatory. > > > > > > May God bless you abundantly in His love! > > > > > > For a free Cenacle Scriptural Rosary Booklet -- > > > > http://www.webhart.net/csrb/ > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > Please pray the Holy Rosary to end the holocaust of abortion. > Remember in your prayers the suffering souls in Purgatory. > > May God bless you abundantly in His love! > > For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting input text?
At 16.03.2002 10:44, you wrote: > >I wonder whether this is possible? > >I would like to format a text input so that the first letter of the input (as >the user is typing it in) would automatically be converted to Uppercase >(capitals). Furthermore, if it is possible, I would like to pre-format the >date "input type=text" so that only numbers or dashes could be entered. I >really enjoyted this capablity in Paradox PAL language. > >Does anything exist that would allow me to do this in PHP? > >An example: > >Code >Surname > > >Screen (and into database) >Surname: black >> would be converted as they type to >> Surname: Black > >Any suggestions or advice would be greatly appreciated. Suggestion: a.)try this in JavaScript on the client side, you have to check if the valid chars/numbers are entered otherwise the page will be not send. b.) check the form, whem the page arrives on the server, and if the vals are not correct, send the page back to be corrected by the user. HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting input text?
Hi Edward, If I wanted to avoid Javascript, could I still accomplish this in PHP? Regards, Andre On Saturday 16 March 2002 13:33, you wrote: > Just use javascript... (be careful, what works with IE, doesn't > automatically work with Netscape)... > > Greets, > > Edward > > - Original Message - > From: "Andre Dubuc" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, March 16, 2002 4:44 PM > Subject: [PHP] Formatting input text? > > > I wonder whether this is possible? > > > > I would like to format a text input so that the first letter of the input > > (as > > > the user is typing it in) would automatically be converted to Uppercase > > (capitals). Furthermore, if it is possible, I would like to pre-format > > the date "input type=text" so that only numbers or dashes could be > > entered. I really enjoyted this capablity in Paradox PAL language. > > > > Does anything exist that would allow me to do this in PHP? > > > > An example: > > > > Code > > Surname > > > > > > Screen (and into database) > > Surname: black >> would be converted as they type to >> Surname: Black > > > > Any suggestions or advice would be greatly appreciated. > > Tia, > > Andre > > > > > > -- > > Please pray the Holy Rosary to end the holocaust of abortion. > > Remember in your prayers the suffering souls in Purgatory. > > > > May God bless you abundantly in His love! > > > > For a free Cenacle Scriptural Rosary Booklet -- > > http://www.webhart.net/csrb/ > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the suffering souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting input text?
Just use javascript... (be careful, what works with IE, doesn't automatically work with Netscape)... Greets, Edward - Original Message - From: "Andre Dubuc" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 16, 2002 4:44 PM Subject: [PHP] Formatting input text? > I wonder whether this is possible? > > I would like to format a text input so that the first letter of the input (as > the user is typing it in) would automatically be converted to Uppercase > (capitals). Furthermore, if it is possible, I would like to pre-format the > date "input type=text" so that only numbers or dashes could be entered. I > really enjoyted this capablity in Paradox PAL language. > > Does anything exist that would allow me to do this in PHP? > > An example: > > Code > Surname > > > Screen (and into database) > Surname: black >> would be converted as they type to >> Surname: Black > > Any suggestions or advice would be greatly appreciated. > Tia, > Andre > > > -- > Please pray the Holy Rosary to end the holocaust of abortion. > Remember in your prayers the suffering souls in Purgatory. > > May God bless you abundantly in His love! > > For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php