This was way to easy. I’m going to use this quick cash to buy the parts I need to turn my RC heli into an auto piloted Drone. Here’s what’s up. I was browsing online on and saw someone how wanted to have some custom code made, that’s mostly what I’m always doing.
Here’s what he wanted.
I need a script that I can be added to a website that redirects users to a different URL based on how many stars that they choose, then click submit.
For example, if they select 4-5 stars, then they go to www.page1.com
And if they select 1-3 stars, then then they go to www.page2.com
I need to be able to:
1. Make the above page URLs whatever I want to (Just tell me in the code where to change it)
2. Be able to edit how many stars, go where.For example, maybe just 5 stars will go to page1.com and 1-4 starts to page2.com. This needs to be changeable in the code somehow.
Note that there will only ever be 2 pages to go to, and 5 stars.
This is a very quick bit of coding for the right person. I suppose an hour or so.
I have attached a basic image that should help you understand a bit. So once the visitor selects the number of stars and clicks submit, the redirect happens.
Here’s the code I sent him.
//change the links below
link1 = ‘http://thinkvaughn.com/tools/box-shadow.html‘;
link2 = ‘http://thinkvaughn.com/tools/border-radius.html‘;
//ranges are inclusive set the low and high range values for each linke
lowRangeLink1 = 1;
highRangeLink1 = 3;
highRangeLink2 = 5;
if(stars >= lowRangeLink1 && stars <= highRangeLink1)
window.location = link1;
if(stars >= lowRangeLink2 && stars <= highRangeLink2)
window.location = link2;
Here’s a quick video I made showing how easy this is.