Hi, i'm not sure if this is the right forum, but it looks the best to post this in.
I'm trying to make a widget that incorporates this code, but this is the first time i am using HTML/Javascript, i have knowledge of basic programming and i'm not use to the syntax of these two languages.
Here is my code:
Can someone fix it up, i want it to get data from the combo and textbox then insert it into a url, example: http:// [data from combobox here] .thecbl.net/ [data from textbox here] /, then go to that url.
Keep in mind i want this in a widget, if possible, so i can display it on my clan page.
I'm trying to make a widget that incorporates this code, but this is the first time i am using HTML/Javascript, i have knowledge of basic programming and i'm not use to the syntax of these two languages.
Here is my code:
- Code:
<html>
<head>
<script type="text/javascript">
function go()
{
var searchtype = document.cblsearch.searchtype;
var searchname = document.cblsearch.searchname;
var searchurl = "http://"+searchtype+".thecbl.net/"+searchname+".html";
searchtype = document.cblsearch.searchtype;
searchname = document.cblsearch.searchname;
searchurl = "http://"+searchtype+".thecbl.net/"+searchname+".html";
window.location="searchurl";
}
</script>
</head>
<body>
<FORM NAME="cblsearch">
<br>
<select name="searchtype" size="1">
<option value="player">Player</option>
<option value="clan">Clan</option>
</select>
 <input type="text" name="searchname" size="15">
</br>
<br><INPUT TYPE="button" VALUE="Search" onclick="go()"></br>
</FORM>
</body>
</html>
Can someone fix it up, i want it to get data from the combo and textbox then insert it into a url, example: http:// [data from combobox here] .thecbl.net/ [data from textbox here] /, then go to that url.
Keep in mind i want this in a widget, if possible, so i can display it on my clan page.