PDA

View Full Version : I don't know if this would be done with JavaScript?



blunerve
01-26-2007, 12:18 AM
Hello, I'm having a problem finding any information on this and I'm not sure if JavaScript would help, or if I would have to use something else.

I need to cloak/mask/hide the URL in the address bar. There are only a few pages on this particular site because we decided to use a separate site for this game. If you win the game, you're directed to www.game.com/win.html, you fill out a form that is sent to an email address, so on. What I need is to be able to hide these URLs (mainly win.html and sorry.html) so no one else can copy the the site and go back to get more prizes, or send it to someone else. I heard there was a JavaScript way to do it, but cannot find any way to do it. Every forum I read has people saying to use frames. I can't use frames with this game. The thing is, the actual game is on a completely different site, and I can't put a link to a frame page in there because it would just go to win.html and not populate the actual frames page - just the content. I've tried it this way and can't get it to work properly. I could redirect index.html to win.html, but I need to be able to use index.html.

Does anyone have any suggestions, code, or tricks? PLEASE help!!!

Thanks!

mburt
01-26-2007, 12:34 AM
I need to cloak/mask/hide the URL in the address bar.
Yes. There's more methods than actually copying it from the address bar. In FireFox, Right-Click > View Page Properties and you have the address, the referrer, you even have the last time it was modified. If you need to do this, it must be done a different way, because not showing the URL is inconveniencing the user, and should be dealt with a different way. Not only will it be annoying, it will mess up further navigation for your site. If someone were really intent on getting the URL, they would obviously look for different ways. For one, the example I gave above will work perfectly fine for aquiring such a URL, even if the url were hidden from the user.
If your method for "winning" is processed through the URL, you must try to work around that too. Sorry for telling you the news, but this way for processing data won't work reliably.

blunerve
01-26-2007, 01:06 AM
Well thank you. We'll have to think of something else. Thanks for all your help.

djr33
01-26-2007, 09:31 AM
That's silly. People can get around it very quickly.

The better strategy is to use something like PHP (or even javascript) to store a cookie (or something along those lines) so that win.html will say "You didn't win yet. Go back." if they didn't go there at the right time.