[SOLVED] Hot or Not type script

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

[SOLVED] Hot or Not type script

Post by voltrader »

I've created a hot-or-not type script where the variables are sent back to the page via the URL.

I use the following to reload the page once the user has clicked on a radio button from 0-5:

Code: Select all

onClick="javascript: window.location.href='?ref=$ref&k=10'">
Once the database has been updated, is there anyway I can get JS to modify the URL, but not reload the page? I want the variables erased, otherwise the user can simply refresh the page to vote for the same photo again.

This is my process:
1. load user data
1a. If coming from 3a, save GET data
2. pick out one at random to show
3. populate radio buttons with JS hrefs
3a. onClick of radio button, go back to 1

****

Figured it out... thanks
Post Reply