Hello, I have an specific question. I run a website (www.CHETOS.es) and I am using a star rating system that was working well until I set up 2 JS scripts to scroll the window. You can see here: <SCRIPT LANGUAGE=JavaScript> Scrolling = 0; function ScrollWin() { while(Scrolling != 700) { this.scroll(1,Scrolling) Scrolling++; } } </SCRIPT> Code (markup): http://www.chetos.es/error/onload.php This website has <BODY onload="ScrollWin()"> And If you try to rate a Star (you can test whatever you want, it's a test DB) if will go to another website and say Parse error: syntax error, unexpected T_VARIABLE in /home/.latitia/jinroh/chetos.es/error/db.php on line 41 Code (markup): ----------------------------------------------------- If you enter http://www.chetos.es/error/noonload.php It has only <BODY> (no onload, but it's the same website, just that was changed) And you try to rate something, it works and it says Votado!, it you do the same (noonload.php) and write javascript:ScrollWin() (like if you did onload... it's the same). Then you try to rate, and it works!!!. Does anybody knows why?? I have tried with another JS script and it happens the same,so it's not because of the JS script particularly. Thanks for your help! Hope you know how to fix it. BTW, the ajax rating system is this http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/
Ok, I receveived this email, but I don't see an Reply here. I Forgot to say that I already tested that, Removing onload= and setting window.onload does the same problem
Oh, ok sorry. I thought it was a forum bug or something. Well, as I said, I have tried with <body onload> and window.onload with the same result
The only reason that I can think of why this won't work is that a variable conflicts with other's from the rating script. Give this a try. <script type="text/javascript"> Scrolled = 0; function ScrollDown() { while (Scrolled != 700) { window.scroll(1, ++Scrolled) } } window.onload = ScrollDown; </script> Code (javascript):
It doesn't work... Same problem PS: Oh! I did replace the files from the script, with the original ones (I changed a bit and translated to Spanish) and now it isn't telling that ERROR, it just Refresh the website, do the same (scroll) and the vote is counted!!! (but it's not ajaxian... ) Maybe something with the window.onload / body onload?? Why is it refreshing?? I can post here script files if you want to take a look. Test this in same URL, or directly here : http://www.CHETOS.es/error/ Thanks for helping, compatriot.
Still stucked here. So is there any possibility so I could make it without "onload"?? (Maybe is because that is refreshing?) http://www.chetos.es/error/ As I said before, now it "works" but REFRESHING the website... not as it should do (if I remove the onload or window.onload it works) without refreshing.
Nobody knows what can I do?? As I said, it """can""" be a problem of onload?? I can use anything instead onload?? What should I do? I don't know why is this happening :'(
Still having the problem, (Now it DOES vote, but it DOES Refresh so it's not AJAXian :/ ) It does refresh when the Scroller script is called, in body onload, or in a non-onload way (for example <script type="text/javascript"> ScrollDown(); </script> ) You can test it in http://www.CHETOS.es/error/ (as I said you can test all the times you want, it's a test DB) What can I do?? Why is it refreshing?? If you look in www.CHETOS.es and vote, it doesn't refresh! Thanks!
I know this is a super old script, but I am facing the same issue. Did you ever get this fixed? Thanks, Jereme