Pressing ENTER does not invoke the only SUBMIT button.

N

Neo

I think the ENTER key worked this way (in the classic ASP days):

When the end user presss ENTER, IE will submit the page by 'simulating'
a click on the first submit button (or image).

On the server side, I will get Len(Request.Form("btnDoSave")) > 0 if
that first button is named btnDoSave.

But, from a version I am not sure, IE began to loose this feature. How
can I work around this?
 
N

Neo

Neo said:
I think the ENTER key worked this way (in the classic ASP days):

When the end user presss ENTER, IE will submit the page by 'simulating'
a click on the first submit button (or image).

On the server side, I will get Len(Request.Form("btnDoSave")) > 0 if
that first button is named btnDoSave.

But, from a version I am not sure, IE began to loose this feature. How
can I work around this?

More on this topic:

I tested the same ASPX page using Opera 7.50 beta 1 and Firefox 8.0
(Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040510
Firefox/0.8), the ENTER key works exactly the same as what I expected.

I have IE 6.0/SP1 with all latest hotfixes installed. IE even submits
the page if there is NO submit button/image!
 
B

bruce barker

its a known bug in IE (only 1 submit button and only input type=text), but I
don't expect a fix. there is work around:

string script = "<script>if (document.all) document.write('<input
type=hidden name=buttonName>'</script>",
RegisterStartupScript("submitHack",script);


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top