Re: [PHP] Submit hitting enter problem
It is a client side browser issue. Which browser are you testing within??? -Original Message- From: rija <[EMAIL PROTECTED]> To: php <[EMAIL PROTECTED]> Date: Sunday, November 10, 2002 9:49 PM Subject: [PHP] Submit hitting enter problem What am I missing? My form does not submit when I hit enter in the text box. I do something approximately like this : ... // Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
On Monday 11 November 2002 17:59, Richard Allsebrook wrote: > One point nobody seems to have raised about why its important to quote > attribute values ... > > $Value="foo bar"; > echo ""; > ?> > > will produce the following code in the browser > > > > and renders in the browser (testing in ie6) as a text box containing only > the word foo > > (The browser sets the value to foo and things bar is an unknown attribute > so correctly ignores it) > > quoting the attribute value fixes it > > $Value="foo bar"; > echo " > ?> > > produces > > The OP is aware of this and has pointed it out :) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Start every day off with a smile and get it over with. -- W.C. Fields */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
One point nobody seems to have raised about why its important to quote attribute values ... "; ?> will produce the following code in the browser and renders in the browser (testing in ie6) as a text box containing only the word foo (The browser sets the value to foo and things bar is an unknown attribute so correctly ignores it) quoting the attribute value fixes it ?> produces "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:20021233.17744.php-general@;gremlins.com.hk... > On Monday 11 November 2002 10:44, rija wrote: > > What am I missing? > > > > My form does not submit when I hit enter in the text box. > > I do something approximately like this : > > > > > > > > > > ... > > > > > > What happens when ENTER is pressed depends on what browser you're using. > Different browsers exhibit different behaviours, eg the old versions of > Netscape (v4 and before) does not submit on ENTER. Also, put quotes around > your attribute values eg: > > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > The more I know men the more I like my horse. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
Hello, "Charles Wiltgen" <[EMAIL PROTECTED]> wrote: > David Rice wrote... > > > It's not "mandatory" to put quotes around attributes, but it would be wise to > > use this style="recommended" method of representing attributes, if for no > > reason="other" than to get used to a habit="good". > > It is mandatory for XHTML, I believe. > It is. Without the quotes, the validator would complain. I came across this some time ago: http://www.w3.org/TR/xhtml1/#h-4.4 - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
David Rice wrote... > It's not "mandatory" to put quotes around attributes, but it would be wise to > use this style="recommended" method of representing attributes, if for no > reason="other" than to get used to a habit="good". It is mandatory for XHTML, I believe. -- Charles Wiltgen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
On Monday 11 November 2002 14:04, rija wrote: > Really big thank to everybody, > > But, now, I know what happening, because I check form submit using > isset($_POST['submit']), so if user don't press submit button, > $_POST['submit'] stay null even the rest is already sent. Then my script > send me back to the first page. Like everybody had said "different browsers do different things on ENTER". Some browsers (eg Opera) will submit your form as if you had clicked on the submit button. Others (eg IE), like you've already found out for yourself, submits the form but does not send the submit button. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If in any problem you find yourself doing an immense amount of work, the answer can be obtained by simple inspection. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
On Monday 11 November 2002 13:36, rija wrote: > Sure ! > > But just simple question? > Is it necessary to put quotes around these attributes values? Let's put it this way, using quotes will not break any browser. Not using quotes /may/ make your page not work correctly on browsers which implement strict syntax checking. > Because I think quotes increase the site size, and using IE4, IE5, IE6, > NS4, OPERA, quotes don't change anything. Yes, but by how much? You'll probably shave much more off the byte count by optimising your graphics than scrimping on quotes. Assuming a 56K modem downloading at 4KB/s, you would have to remove over 4000 quotes to save 1 sec of download time. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* President Reagan has noted that there are too many economic pundits and forecasters and has decided on an excess prophets tax. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
Really big thank to everybody, But, now, I know what happening, because I check form submit using isset($_POST['submit']), so if user don't press submit button, $_POST['submit'] stay null even the rest is already sent. Then my script send me back to the first page. - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 4:28 PM Subject: Re: [PHP] Submit hitting enter problem > on 11/11/02 2:16 PM, rija ([EMAIL PROTECTED]) wrote: > > > Actually, I miss-read your question... do you WANT the form to be submitted > when hitting return/enter??? > > And you find that this is not happening when you are in a text field??? > > Correct? > > > This is a browser thing... I don't *think* there's anything in the standards > to say when hitting enter should/shouldn't work -- i think it's something > that each browser will do differently. > > There may be something you can do with javascript. > > > Perhaps check out: > http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html > > > Or find a similar form example on another site, and dig around thru the code > to have a look how they did it. > > > Justin > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
Hi Rija: No It's not "mandatory" to put quotes around attributes, but it would be wise to use this style="recommended" method of representing attributes, if for no reason="other" than to get used to a habit="good". coding="happiness" David On Monday, November 11, 2002, at 12:36 AM, rija wrote: Sure ! But just simple question? Is it necessary to put quotes around these attributes values? Because I think quotes increase the site size, and using IE4, IE5, IE6, NS4, OPERA, quotes don't change anything. Of course if I have somethings with space, for value's attribute, It is important to put quote because sometimes users enter space. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 3:33 PM Subject: Re: [PHP] Submit hitting enter problem What happens when ENTER is pressed depends on what browser you're using. Different browsers exhibit different behaviours, eg the old versions of Netscape (v4 and before) does not submit on ENTER. Also, put quotes around your attribute values eg: -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The more I know men the more I like my horse. */ -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
well, you are right they may work, but according to the sepcification qoutes should be added, you should follow it, because you don't know the hidden browsers out there which you didn't test, and IE, Opera, NS can't guarantee that they will support this behaviour in future releases _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
Sure ! But just simple question? Is it necessary to put quotes around these attributes values? Because I think quotes increase the site size, and using IE4, IE5, IE6, NS4, OPERA, quotes don't change anything. Of course if I have somethings with space, for value's attribute, It is important to put quote because sometimes users enter space. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 3:33 PM Subject: Re: [PHP] Submit hitting enter problem > What happens when ENTER is pressed depends on what browser you're using. > Different browsers exhibit different behaviours, eg the old versions of > Netscape (v4 and before) does not submit on ENTER. Also, put quotes around > your attribute values eg: > > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > The more I know men the more I like my horse. > */ > > > -- > 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] Submit hitting enter problem
A missing tag? Some browsers are picky, so you might want to also do what someone else suggested to you earlier, which is to put quotes around your attribute values. This is especially important to implement while HTML fades out and languages based on XML (XHTML in particular) fade into popularity. Good luck. > -Original Message- > From: rija [mailto:rija@;vatu.com] > Sent: Sunday, November 10, 2002 8:45 PM > To: php > Subject: [PHP] Submit hitting enter problem > > > What am I missing? > > My form does not submit when I hit enter in the text box. > I do something approximately like this : > > > > > ... > > > // > > Thanks in advance. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
On Monday 11 November 2002 10:44, rija wrote: > What am I missing? > > My form does not submit when I hit enter in the text box. > I do something approximately like this : > > > > > ... > > What happens when ENTER is pressed depends on what browser you're using. Different browsers exhibit different behaviours, eg the old versions of Netscape (v4 and before) does not submit on ENTER. Also, put quotes around your attribute values eg: -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The more I know men the more I like my horse. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit hitting enter problem
> Thanks for your quick answer, > > But it doesn't change anything. > change my text box into big text area- > > So I always have to click on submit button to submit the form. So? This doesn't have anything to do with PHP, it's dependant on the browser you are using. IE will do this for you sometimes, while most other browsers don't, I think. Please ask your question on a relevant list. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
on 11/11/02 2:16 PM, rija ([EMAIL PROTECTED]) wrote: > Thanks for your quick answer, > > But it doesn't change anything. > change my text box into big text area- > > So I always have to click on submit button to submit the form. Actually, I miss-read your question... do you WANT the form to be submitted when hitting return/enter??? And you find that this is not happening when you are in a text field??? Correct? This is a browser thing... I don't *think* there's anything in the standards to say when hitting enter should/shouldn't work -- i think it's something that each browser will do differently. There may be something you can do with javascript. Perhaps check out: http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html Or find a similar form example on another site, and dig around thru the code to have a look how they did it. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
Return key presses in a will usually be converted into a newline (\n). Making your browser submit the form when you press enter is an HTML/Browser issue. You probably should look at a javascript solution because this is a client side problem. Jason On Sun, 2002-11-10 at 21:16, rija wrote: > Thanks for your quick answer, > > But it doesn't change anything. > change my text box into big text area- > > So I always have to click on submit button to submit the form. > > > > - Original Message - > From: "Justin French" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> > Sent: Monday, November 11, 2002 3:45 PM > Subject: Re: [PHP] Submit hitting enter problem > > > > on 11/11/02 12:44 PM, rija ([EMAIL PROTECTED]) wrote: > > > > > > > > > I think you need to use a if you wish for the returns to be > > submitted. > > > > Cheers > > > > > > Justin French > > > > Creative Director > > http://Indent.com.au > > Web Developent & > > Graphic Design > > > > > > > > > > -- > 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] Submit hitting enter problem
Thanks for your quick answer, But it doesn't change anything. change my text box into big text area- So I always have to click on submit button to submit the form. - Original Message - From: "Justin French" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 3:45 PM Subject: Re: [PHP] Submit hitting enter problem > on 11/11/02 12:44 PM, rija ([EMAIL PROTECTED]) wrote: > > > > > I think you need to use a if you wish for the returns to be > submitted. > > Cheers > > > Justin French > > Creative Director > http://Indent.com.au > Web Developent & > Graphic Design > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit hitting enter problem
on 11/11/02 12:44 PM, rija ([EMAIL PROTECTED]) wrote: > I think you need to use a if you wish for the returns to be submitted. Cheers Justin French Creative Director http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php