javascript window status isn't working right
Moderator: General Moderators
javascript window status isn't working right
i have a script that gives a blurb about the person when you run over a link to them. however, the problem is on one server it only does the firs and last. on the other it's doing all but one. i can't find errors with the javascript and am unsure of why i am getting this behaviour.
demo site:
http://24.91.157.113/findyourdesire/des ... fn=desired
deployment site:
http://www.findyourdesire.com/desire.ph ... fn=desired
demo site:
http://24.91.157.113/findyourdesire/des ... fn=desired
deployment site:
http://www.findyourdesire.com/desire.ph ... fn=desired
It is not that the & character requires escaping in javascript, it is specifically that you had the HTML entity for the ' character. This entity is converted back to it's actuall character prior to the javascript code working. so something like.....
...is actually interpreted as.....
As you can see, the entity has been converted back to it's actual character, and as the single quote encapsulates the window status command you end up with an error.
Given that then this.....
...is actually interpreted as.....
With the single quote within the window status command correctly escape all is well.
Code: Select all
onmouseover="window.status='Let's see what happens';"Code: Select all
onmouseover="window.status='Let's see what happens';"Given that then this.....
Code: Select all
onmouseover="window.status='Let\'s see what happens';"Code: Select all
onmouseover="window.status='Let''s see what happens';"Also, make sure you return true when you change the status
Code: Select all
onmouseover="window.status='Let''s see what happens';return true;"Yep, I should have added that for completness, for what it's worth I also prefer to add the onmouseout command too which will clear the status bar when you move off the link....
Code: Select all
onmouseover="window.status='Let''s see what happens'; return true;" onmouseout="window.status=''; return true;"ok. i had that. if you go and check the page code for the index, the navigation bar. i had onmouseover and onmouseout set to switch the button for the finduser submit button, but there's a issue with that would never work. still not sure why... 
any help on finding a way to do that?
http://www.findyourdesire.com
any help on finding a way to do that?
http://www.findyourdesire.com