IE7 and onclick events
Reason
This is simply because of how IE decides to “remember” visited links (the one you call in the AJAX function), and it simply don’t run your onclick event more than perhaps once per click.
I solved this by adding something I’d like to call a no-cache-seed to the url that will be unique for every click, forcing the browser to handle every event as a new URL. Then it worked perfectly.
The following javascript snippet will create a variable with the number of seconds since January 1, 1970. Needless to say it will always be different unless you demand reaction times under 1 millisecond which is unrealistic from a single user.
var currentTime = new Date();
var nocacheseed = currentTime.getTime();
Code in effect:
http://example.com/file.php?foo=1&bar=1&nocacheseed=
Reload the page to see how it is different every time.
Leave a Reply
Welcome to Thronic.com
Search this Site
Miscellaneous Links
Recent Articles
- Google-like search suggestion tool
- Linux Bash Color
- Resize a div layer with javascript
- Moving a div layer with javascript
- Web Galaxy » A sci-fi browser game
- Windows 7 on Asus Eee 900 PC
- IE and PHP sessions
- Wordpress 2.8.6 Spell Check Languages
- Reset MySQL Root Password
- Linux hosts file
- IdleGuard
- Column count in SQL
- String encryption in PHP
- Alphanumeric Captcha values in PHP
- Your own numeric Captcha in PHP
