Spudhead
08-16-2002, 11:29 AM
I've noticed some anomalous behaviour when testing on IE 5.0 and IE 6.0, concerning escaped values.
This involves some ASP, but it's a client-side Javascript problem, so bear with me :)
The following line calls a javascript function using variables pulled from a database via ASP:
<a href="javascript:doFunction('<%=escape(myDatabaseValue)%>')">click me</a>
my javascript function currently simply pops an alert box with the value it was passed.
If ASP writes the (escaped) string "My%20Value" to the page - so that view source in the browser reveals:
<a href="javascript:doFunction('<My%20Value')">click me</a>
In IE 6, the function will alert exactly that.
In IE 5.0, the function will alert: My Value
I'm only posting it for a bit of a rant, and in case anyone else was having / has seen the same thing. It's easy enough to work around, just another example of... Micro$haft, I guess... :rolleyes:
This involves some ASP, but it's a client-side Javascript problem, so bear with me :)
The following line calls a javascript function using variables pulled from a database via ASP:
<a href="javascript:doFunction('<%=escape(myDatabaseValue)%>')">click me</a>
my javascript function currently simply pops an alert box with the value it was passed.
If ASP writes the (escaped) string "My%20Value" to the page - so that view source in the browser reveals:
<a href="javascript:doFunction('<My%20Value')">click me</a>
In IE 6, the function will alert exactly that.
In IE 5.0, the function will alert: My Value
I'm only posting it for a bit of a rant, and in case anyone else was having / has seen the same thing. It's easy enough to work around, just another example of... Micro$haft, I guess... :rolleyes: