sfsDragons2280
09-10-2006, 05:42 PM
Hey everyone,
I'm trying to get a pop up to show an image based on what radio buttons the person has selected. I've been trying to do it myself but I'm really new to JavaScript and need help lol.
Here's the javascript:
function templates()
{
var template = checkout.template.value;
var colorscheme = checkout.colorscheme.value;
var page = 'images/' + template + colorscheme + '.jpg';
caseWindow = window.open(page,'blank',"width=700, height=700, resizable=yes, status=no, menubar=no, scrollbars=yes")
caseWindow.focus()
}
Here is the code I have the radio buttons:
First set of radio buttons have this:
<input type="radio" name="template" value="template1">
Second set have this:
<input type="radio" name="colorscheme" value="-01">
Here is the code I have for the trigger button:
<input type="button" value="View Template" onclick="templates()">
Basically I want to make it so that when someone selects one of the radio buttons with the name of templates and one of the radio buttons with the name of colorschemes and then they click the bottom button it brings up a new window with the image.
I would really appreciate any help.
Thanks
Alex
I'm trying to get a pop up to show an image based on what radio buttons the person has selected. I've been trying to do it myself but I'm really new to JavaScript and need help lol.
Here's the javascript:
function templates()
{
var template = checkout.template.value;
var colorscheme = checkout.colorscheme.value;
var page = 'images/' + template + colorscheme + '.jpg';
caseWindow = window.open(page,'blank',"width=700, height=700, resizable=yes, status=no, menubar=no, scrollbars=yes")
caseWindow.focus()
}
Here is the code I have the radio buttons:
First set of radio buttons have this:
<input type="radio" name="template" value="template1">
Second set have this:
<input type="radio" name="colorscheme" value="-01">
Here is the code I have for the trigger button:
<input type="button" value="View Template" onclick="templates()">
Basically I want to make it so that when someone selects one of the radio buttons with the name of templates and one of the radio buttons with the name of colorschemes and then they click the bottom button it brings up a new window with the image.
I would really appreciate any help.
Thanks
Alex