Prev: Authentic Designer Handbags EVOGUER.COM 15% OFF DISCOUNT!!!!
Next: Floating X for closing a container
From: Thomas 'PointedEars' Lahn on 28 Nov 2009 06:37 David Mark wrote: > menkaur wrote: >> <label><input id="getRecomendation" > > Validate your markup. ACK, but this line is not invalid. <http://validator.w3.org/> >> window.location = "foo.html"; > > window.location.href = "foo.html"; There is no inherent advantage in using `.location.href' over `.location'. In fact, by contrast the `href' property of Location instances is tainted, and so subject to the SOP (that does not matter here). PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: Thomas 'PointedEars' Lahn on 28 Nov 2009 06:41 Asen Bozhilov wrote: > Unfortunately, I don't see any documentation about that behavior of > window.location to read what exactly happens in internal setter of > window.location. <http://docs.sun.com/source/816-6408-10/window.htm#1202507> <http://docs.sun.com/source/816-6408-10/location.htm#1193137> > In your case, you should need to prevent default action of submit > button. No, the `submit' event of the form should be cancelled instead. Or a submit button should not be used in the first place, or scripting should not be used in the first place. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: Asen Bozhilov on 28 Nov 2009 07:02 Thomas 'PointedEars' Lahn wrote: > <http://docs.sun.com/source/816-6408-10/window.htm#1202507> > <http://docs.sun.com/source/816-6408-10/location.htm#1193137> Thanks for the links. They contains much more information from MDC, but again i don't see any explanations about, how internal setter of window.location works. > No, the `submit' event of the form should be cancelled instead. Yes, yes, yes. Apologize for my terminology here. Nice to see, your correction again. Sometimes you are make ironical comment, but when you corrected my, i learn properly terminology. Thanks.
From: Thomas 'PointedEars' Lahn on 28 Nov 2009 07:29 Asen Bozhilov wrote: > Thomas 'PointedEars' Lahn wrote: >> <http://docs.sun.com/source/816-6408-10/window.htm#1202507> >> <http://docs.sun.com/source/816-6408-10/location.htm#1193137> > > Thanks for the links. They contains much more information from MDC, > but again i don't see any explanations about, how internal setter of > window.location works. ,-<http://docs.sun.com/source/816-6408-10/location.htm> | | Description | [...] | If you assign a string to the location property of an object, JavaScript | creates a location object and assigns that string to its href property. See also <http://docs.sun.com/source/816-6408-10/location.htm#1193550>: | Description | | [...] | Omitting a property name from the location object is equivalent to | specifying location.href. [...] RTSL of the respective DOM implementation, if available, for details. >> No, the `submit' event of the form should be cancelled instead. > Yes, yes, yes. Apologize for my terminology here. > > Nice to see, your correction again. Sometimes you are make ironical > comment, but when you corrected my, i learn properly terminology. It is not merely a matter of terminology here, though. Preventing the default action of (or cancelling) the `click' event of the submit button means, in a nutshell: <input type="submit" ... onclick="return false"> Cancelling (or preventing the default action of) the `submit' event of the form means, in a nutshell <form ... onsubmit="return false"> The former approach is known to be error-prone and harder to maintain. > Thanks. You are welcome. PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16
First
|
Prev
|
Pages: 1 2 Prev: Authentic Designer Handbags EVOGUER.COM 15% OFF DISCOUNT!!!! Next: Floating X for closing a container |