Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem with submit

Reply
Thread Tools

Problem with submit

 
 
majsen
Guest
Posts: n/a
 
      05-10-2004
Hi all,
i have a problem. The user will fill in som textboxes in a form with
a submit button. When the user click the button the form submits
and my asp script fires...
if not isempty(Request.Form("search")) then
....
....
end if

but if the user click the return tab the page just reload and the
abowe asp
script does not catch the event.

I tryh to use this script below without success...


<SCRIPT TYPE="text/javascript">
<!--
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
{

form1.search.submit();
return false;
}
else
return true;
}
//-->
</SCRIPT>

<form name="form1" method="post" action="./searchResult.asp">

<input name="omrade" type="text" id="omrade" size="18"
onKeyPress="return submitenter(this,event)">

<input type="submit" name="search" value=" S&ouml;k " >
</form>

How can i get it to work?
Regards Majsen
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      05-10-2004
majsen wrote on 10 mei 2004 in microsoft.public.inetserver.asp.general:

> if not isempty(Request.Form("search")) then
>


if Request.Form("search") <> "" then


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
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
STRUTS- <html:submit> does not submit on pressing Enter key Megha Vishwanath Java 2 10-02-2009 12:52 PM
Catching Submit Event even called by document.forms[0].submit() The Crow ASP .Net 2 09-27-2005 05:03 PM
javascript submit problem : form won't submit Joop Javascript 5 03-23-2005 07:48 PM
Preventing Multiple submit (Disabling Submit Button Post Click) Solution Mark ASP .Net 1 12-13-2004 08:03 PM
Disable Submit Button on Post back and On Submit in ASP.net Ghafran Abbas ASP .Net 0 10-12-2004 06:11 PM



Advertisments