[thelist] RE: Javascript - New Window + Search Function - Still not
Tim Kuhn
TKuhn at thecreek.com
Mon Oct 10 10:43:49 CDT 2005
You had some syntax errors in your script, such as mismatched {}.
Compare this version with what you had and you will see what I mean.
<script language="JavaScript" type="text/javascript">
//<![CDATA[
<!--
function startSearch()
{
searchString = document.searchForm.searchText.value;
if(searchString!= "")
{
searchEngine =
document.searchForm.whichEngine.selectedIndex + 1;
finalSearchString = "";
}
if(searchEngine == 1)
{
finalSearchString =
"http://www.altavista.com/cgi-bin/query?pg=q&what=web&q=" +
searchString;
}
//Several other "if's" here...
if(searchEngine == 18)
{
finalSearchString =
"http://de.search.yahoo.com/search/de?p=" + searchString;
}
location.href = finalSearchString;
}
//-->
//]]>
</script>
------------------------------------------------------------------------
---------------
Hi.
Thanks very much for the reply. Unfortunately I can't seem to get this
to work right (told you I was a dummy at this). I keep getting "syntax
error" or "object expected", which probably means something small is
missing or out of place.
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
------------------------------
_______________________________________________
Help: http://lists.evolt.org/mailman/listinfo/thelist
Archives: http://lists.evolt.org
End of thelist Digest, Vol 32, Issue 14
***************************************
More information about the thelist
mailing list