Hi Guys,
I'm a total newbie trying to make a simple series of click buttons to load up different pages for a target frame on the low side of a page. Right now I'm still struggling with just the buttons. So far the HTML ideas I've tried have let me down so I've turned to Java and just found this script (I'll use Google as the example URL here):
[HTML]<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function goToURL() { window.location = "http://www.google.com "; }
// End -->
</script>
</HEAD>
<BODY>
<form>
<input type=button value="Go to Google" onClick="goToURL()">
</form>
</BODY>[/HTML]
... It works if I only want to redirect to a single page (ie. www.google.com by itself), but what I can't seem to do is modify that code so that I can create an second additional button (say to go to yahoo). I tried to modify it like this, but got nowhere:
function goToURL(1) { window.location = "http://www.google.com "; }
function goToURL(2) { window.location = "http://www.yahoo.com "; }
... Because my computer doesn't recognize "goToURL(1)" only "goToURL()"
I'd also like to know how I can modify a target URL...
(a) to load in a different frame below.
(b) to include a search string, like this one say for youtube:
"http://www.youtube.com/results?search_query=" + searchString;
... Any help greatly appreciated!
Thanks,
Parkpost