Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Mon, 31 Mar 2008 07:57:10 -0700 (PDT),    group: microsoft.public.inetsdk.programming.html_objmodel        back       


Need MS documentation for cancelBubble() behavior in IE7   
We have an application that displays an error message if an entry in a
field is invalid and does not allow the user to exit the field.  It
has a bunch of code to test a regular expression, followed by:

var myReg = new RegExp(Expr)
	if (!myReg.test(Str) && Str != '' && Expr != ' ')
		{
		alert(Msg);
		if (WarningMsg == -1){
			window.event.cancelBubble = true;
			event.returnValue=false;
		}

In IE6, this prevents the user from leaving the field until a valid
value is entered, but this does not work in IE7.  I'm told that this
is by design, but I need either a workaround or a Microsoft web page
to document why it won't.

Can anyone help?
date: Mon, 31 Mar 2008 07:57:10 -0700 (PDT)   author:   brilliantatbreakfast

Re: Need MS documentation for cancelBubble() behavior in IE7   
"brilliantatbreakfast"  wrote in message
news:6e87fa1d-c1d7-49a8-9ee4-8d0140c08761@x41g2000hsb.googlegroups.com...
> We have an application that displays an error message if an entry in a
> field is invalid and does not allow the user to exit the field.  It
> has a bunch of code to test a regular expression, followed by:
>
> var myReg = new RegExp(Expr)
> if (!myReg.test(Str) && Str != '' && Expr != ' ')
> {
> alert(Msg);
> if (WarningMsg == -1){
> window.event.cancelBubble = true;
> event.returnValue=false;
> }
>
> In IE6, this prevents the user from leaving the field until a valid
> value is entered, but this does not work in IE7.  I'm told that this
> is by design, but I need either a workaround or a Microsoft web page
> to document why it won't.
>
> Can anyone help?

Popping up message boxes and/or preventing navigation around the form is a
fairly hostile way to treat the user anyway.  I would suggest that you
design out this requirement.

Place an indicator next to the invalid field which carries a title that'll
appear as tool tip then the user hovers the mouse pointer over it.  Leave
the submit button disabled until the set of fields are valid.


-- 
Anthony Jones - MVP ASP/ASP.NET
date: Wed, 2 Apr 2008 20:58:01 +0100   author:   Anthony Jones

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us