Click here to Skip to main content
15,899,825 members
Home / Discussions / Web Development
   

Web Development

 
QuestionWhat is the difference between the two? Pin
rgoyal28-Nov-04 18:02
rgoyal28-Nov-04 18:02 
AnswerRe: What is the difference between the two? Pin
JKroschel2-Dec-04 11:08
JKroschel2-Dec-04 11:08 
GeneralRe: What is the difference between the two? Pin
rgoyal2-Dec-04 18:09
rgoyal2-Dec-04 18:09 
GeneralForcing Page To Stay In ASP Pin
Bassam Abdul-Baki26-Nov-04 16:08
professionalBassam Abdul-Baki26-Nov-04 16:08 
GeneralRe: Forcing Page To Stay In ASP Pin
Sven Cipido29-Nov-04 22:54
Sven Cipido29-Nov-04 22:54 
GeneralRe: Forcing Page To Stay In ASP Pin
Bassam Abdul-Baki30-Nov-04 2:40
professionalBassam Abdul-Baki30-Nov-04 2:40 
GeneralUndo In Javascrip Pin
Hemant Mane26-Nov-04 3:19
Hemant Mane26-Nov-04 3:19 
GeneralProblem with ASP.NET Postback and Mac Enter/Return key Pin
Paul Ingles24-Nov-04 6:38
Paul Ingles24-Nov-04 6:38 
I'm trying to wire up support for both Enter and Return keys on Macs to postback an ASP.NET form when they keys are pressed within a text box.

At the moment, this is done through simulating a click on an ASP.NET button server control. This JavaScript function is called during the text box's onKeyPress event and looks as follows (with e being the event passed in):

function checkEnter(e, buttonId)
{
	var characterCode;

	if(e && e.which) {
		characterCode = e.which; //character code is contained in NN4's which property
	} else {
		characterCode = e.keyCode;
	}
	
	if(characterCode == 13 || characterCode == 3) {
		return clickButton(e, buttonId);
	} else {
		return true;
	}

}


The weird thing is, this works fine on PC keyboards (where it seems both the enter and return keys use the same key code), but on Macs only pressing return causes the form data to be posted back, pressing enter just causes the page to postback but without any data. Thinking about it, is this actually a limitation of the Mac itself, is this kind of behaviour normal?

Thanks as always,

--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"

MS Messenger: paul@oobaloo.co.uk
Download my PGP public key

GeneralRe: Problem with ASP.NET Postback and Mac Enter/Return key Pin
Paul Ingles24-Nov-04 23:54
Paul Ingles24-Nov-04 23:54 
General.net power tools Pin
colin mcadam24-Nov-04 5:14
colin mcadam24-Nov-04 5:14 
GeneralDon't work in Netvigator Pin
davilism24-Nov-04 0:23
davilism24-Nov-04 0:23 
GeneralRe: Don't work in Netvigator Pin
davilism24-Nov-04 0:25
davilism24-Nov-04 0:25 
QuestionDHTML to add a <BR> after a dynamically created html table? Pin
Bart-Man23-Nov-04 11:04
Bart-Man23-Nov-04 11:04 
AnswerRe: DHTML to add a <BR> after a dynamically created html table? Pin
Bart-Man29-Nov-04 4:22
Bart-Man29-Nov-04 4:22 
GeneralHelp in ASP Pin
Marwa Bahaa23-Nov-04 10:08
Marwa Bahaa23-Nov-04 10:08 
GeneralRe: Help in ASP Pin
sam683ir28-Nov-04 19:10
sam683ir28-Nov-04 19:10 
GeneralHandle IIS 5.0 Pin
pmasknguyen22-Nov-04 15:58
pmasknguyen22-Nov-04 15:58 
GeneralRe: Handle IIS 5.0 Pin
Gerald Schwab22-Nov-04 16:25
Gerald Schwab22-Nov-04 16:25 
GeneralRe: Handle IIS 5.0 Pin
Roger Wright23-Nov-04 3:28
professionalRoger Wright23-Nov-04 3:28 
GeneralASP development help Pin
Its due when22-Nov-04 11:23
Its due when22-Nov-04 11:23 
GeneralRe: ASP development help Pin
John Parker23-Nov-04 5:34
John Parker23-Nov-04 5:34 
Questionsize? Pin
rgoyal21-Nov-04 23:28
rgoyal21-Nov-04 23:28 
AnswerRe: size? Pin
john3parker22-Nov-04 5:16
john3parker22-Nov-04 5:16 
GeneralRe: size? Pin
Anonymous24-Nov-04 1:01
Anonymous24-Nov-04 1:01 
GeneralCalendar control, with scroll on year basis Pin
gP_t_gr821-Nov-04 19:28
gP_t_gr821-Nov-04 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.