Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Deactivating Return

Reply
Thread Tools

Deactivating Return

 
 
Daniel Pomrehn
Guest
Posts: n/a
 
      11-25-2003
Hello,

on the website www.oliver.clarehn-baeren.de/index.php it is necessary that
the Return Key isn't used to send the form. The user must click on the "Ja"
Button. In other ways the PHP Script does'nt work probably. Can anyone tell,
how I can deactivate the return key?

Thank you
Daniel Pomrehn


 
Reply With Quote
 
 
 
 
Jay
Guest
Posts: n/a
 
      11-25-2003

"Daniel Pomrehn" <(E-Mail Removed)> wrote in message
news:bq095s$1tcpa0$(E-Mail Removed)-berlin.de...
> Hello,
>
> on the website www.oliver.clarehn-baeren.de/index.php it is necessary that
> the Return Key isn't used to send the form. The user must click on the

"Ja"
> Button. In other ways the PHP Script does'nt work probably. Can anyone

tell,
> how I can deactivate the return key?


How do you expect someone who doesn't/can't use a mouse to submit your
form???

- J


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      11-25-2003
"Daniel Pomrehn" <(E-Mail Removed)> wrote:

>on the website www.oliver.clarehn-baeren.de/index.php it is necessary that
>the Return Key isn't used to send the form. The user must click on the "Ja"
>Button. In other ways the PHP Script does'nt work probably. Can anyone tell,
>how I can deactivate the return key?


If that's true then there's something wrong with the PHP script. Fix
that, don't try to cripple the browser.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Kris
Guest
Posts: n/a
 
      11-25-2003
In article <bq095s$1tcpa0$(E-Mail Removed)-berlin.de>,
"Daniel Pomrehn" <(E-Mail Removed)> wrote:

>
> on the website www.oliver.clarehn-baeren.de/index.php it is necessary that
> the Return Key isn't used to send the form. The user must click on the "Ja"
> Button. In other ways the PHP Script does'nt work probably. Can anyone tell,
> how I can deactivate the return key?


Fix your server side script. Form submission is enough, there is no need
for checking whether the "ja" button was pressed. You don't need to
break the return key and attempt to take away a core function of the
browser.

<?
if($name)
{
//form was submitted
}
?>

--
Kris
http://www.velocityreviews.com/forums/(E-Mail Removed)erlands (nl)
 
Reply With Quote
 
Disco Octopus
Guest
Posts: n/a
 
      11-26-2003
Daniel Pomrehn wrote:
> Hello,
>
> on the website www.oliver.clarehn-baeren.de/index.php it is necessary
> that the Return Key isn't used to send the form. The user must click
> on the "Ja" Button. In other ways the PHP Script does'nt work
> probably. Can anyone tell, how I can deactivate the return key?
>
> Thank you
> Daniel Pomrehn


Dont know why you would..... but any way, this may work for you....


Firstly, you need ne understand that the first <input> in a <form> that is a
'submit' type, will be the one that 'catches' the return key when on a field
(<input type of text>).
What you may be able to do, is to paint yourself another input submit
earlier in the form (before the original button), giving it a different
name, and when submitted, simply do not do what the other button would
normally do.

like this.....


<form action="script.php">
<input name=mytextfield" type="text">
<input name="dummybutton" type="submit" value="">
<input name="realbutton" type="submit" value="the real one">
</form>

.... in the above example, the button named "dummybutton" will catch the
'return' key because it is painted first in the <form>

....now, you have the option to either put a javascript in the button to say
something like "onclick, **** off", or you could have something in your
script .php file that says something like if (isset($dummybutton){ echo
"**** off";}



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XP deactivating wireless processor =?Utf-8?B?SmFzb24=?= Wireless Networking 1 03-04-2006 02:08 PM
Deactivating Keys Christopher Rivituso Computer Information 3 09-01-2005 02:56 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM
How do I return a return-code from main? wl Java 2 03-05-2004 05:15 PM
Return a return value from Perl to Javascript PvdK Perl 0 07-24-2003 09:20 AM



Advertisments