Two simple website additions! but i'm stumped!

Soldato
Joined
10 Feb 2004
Posts
5,116
Location
Crewe, UK
Hey!

I have to add two pieces of code to an "Instant Store" website, within the little HTML sections that they provide!

The two things need are to allow a person to pick two options (radio buttons possibly, like red and cat) and depending on the answers route them to a certain page!

The other is to randomly pick a URL out of a list and forward the user onto that page!

I'm just a bit stumped on how to do it!

would anyone be able to help me out?

Thanks in Advance!

Rich
 
JustinW said:
You will probably need some JavaScript to do this? Are you able to write JavaScript?

Justin

'Fraid not, but I get that the first request I made is just a series of "IF" Statements, i've just never touched JavaScript before.

Rich
 
Alright!

I have got this far!

Code:
<html>
<body>

<script type="text/javascript">
if (radio_button.radio_young.checked and radio_button.radio_dry.checked)
{
function forward(){
location.href="YOUR YOUNG / DRY LINK HERE"
}
if (radio_button.radio_young.checked and radio_button.radio_normal.checked)
{
function forward(){
location.href="YOUR YOUNG / NORMAL LINK HERE"
}
if (radio_button.radio_young.checked and radio_button.radio_greasy.checked)
{
function forward(){
location.href="YOUR YOUNG / GREASY LINK HERE"
}
if (radio_button.radio_old.checked and radio_button.radio_dry.checked)
{
function forward(){
location.href="YOUR OLD / DRY LINK HERE"
}
if (radio_button.radio_old.checked and radio_button.radio_normal.checked)
{
function forward(){
location.href="YOUR OLD / NORMAL LINK HERE"
}
if (radio_button.radio_young.checked and radio_button.radio_dry.checked)
{
function forward(){
location.href="YOUR OLD / GREASY LINK HERE"
}
</script>
<form>
<input type="radio" value="Young" name="radio_young">Young
<br>
<input type="radio" value="Old" name="radio_old">Old
<br>
</form>
<form>
<input type="radio" value="Dry" name="radio_dry">Dry
<br>
<input type="radio" value="Normal" name="radio_normal">Normal
<br>
<input type="radio" value="Greasy" name="radio_greasy">Greasy
<br>
<input type="submit" value="Submit">
</form>

</body>
</html>

How do I get it to run when I click submit!!

I'm a bit stumped!

Rich
 
Back
Top Bottom