- Impact
- 18
I don't know what is wrong here... there are no errors or anything, its just not showing up! 
this is the code kept in "searchbar.js":
and this is how it is called:
I can't see what is wrong, and if I substitute the src="http://... to something else then it shows up perfectly. I don't know what is wrong!
Can anyone help me!? please!! lol
Thanks for your help! :D
Tom
this is the code kept in "searchbar.js":
Code:
function checkform(form){
if(form["q"].value == ""){
alert("Please insert keyword(s) to search for");
form["q"].focus();
return false ;
}
return true;
}
function toProperCase(astring){
return astring.toLowerCase().replace(/\w+/g,function(s){return s.charAt(0).toUpperCase() + s.substr(1);})
}
function changemode(newmode){
document.getElementById("m").value=newmode.toLowerCase();
document.getElementById("web").className="standardmode";
document.getElementById("Local").className="standardmode";
document.getElementById("Images").className="standardmode";
document.getElementById("News").className="standardmode";
document.getElementById("Video").className="standardmode";
document.getElementById("Domains").className="standardmode";
document.getElementById(newmode).className="newmode";
if(newmode == "Local"){
document.getElementById("q").style.width="110px";
document.getElementById("localSearchBar").innerHTML=" <input name=\"location\" id=\"location\"style=\"width: 100px\" value=\"Location\" onFocus=\"if(this.value=='Location'){this.select();}\" title=\"e.g. NY or Zip Code\" />";
}
else{
document.getElementById("q").style.width="220px";
document.getElementById("localSearchBar").innerHTML="";
}
}
if(6_logo=='no'){
var sixsearch_logo = '';
}
else{
var sixsearch_logo = '<td rowspan="2" valign="middle"><a href="http://sixsearch.net"><img src="http://sixsearch.net/adverts/images/six.gif" style="border:0" alt="Search the Web with Six Search - www.sixsearch.net" /></a></td>';
}
if(6_search_the_web=='no'){
var sixsearch_stw = '';
}
else{
var sixsearch_stw = '<td rowspan="2" valign="middle"><a href="http://sixsearch.net"><img src="http://sixsearch.net/adverts/images/searchtheweb.gif" style="border:0" alt="Search the Web with Six Search - www.sixsearch.net" /></a></td>';
}
var sixsearch = '<style>.newmode{font-family: Verdana, Arial, sans-serif;font-size: 13px;color: #'+6_text_color+';font-weight: bold;text-decoration: none;cursor: default;display: inline;}.standardmode{font-family: Verdana, Arial, sans-serif;font-size: 13px;color: #'+6_text_color+';text-decoration: underline;font-weight: normal;cursor: hand;cursor: pointer;display: inline;}</style><form method="get" action="http://sixsearch.net/search.php" name="search" onsubmit="return checkform(this);" target="_blank"><table cellpadding="0" cellspacing="0" border="0" style="background: #'+6_bg_color+';color: #'+6_text_color+';"><tr>'+sixsearch_logo+''+sixsearch_stw+'<td style="color: #ffffff;font-size: 8px"><div onClick="changemode(\'web\')" class="newmode" id="web">Web</div> | <div onClick="changemode(\'Local\')" class="standardmode" id="Local">Local</div> | <div onClick="changemode(\'Images\')" class="standardmode" id="Images">Images</div> | <div onClick="changemode(\'News\')" class="standardmode" id="News">News</div> | <div onClick="changemode(\'Video\')" class="standardmode" id="Video">Video</div> | <div onClick="changemode(\'Domains\')" class="standardmode" id="Domains">Domains</div></td></tr><tr><td><input name="q" id="q" style="width: 220px;" /><div id="localSearchBar" style="display: inline;"></div><input type="hidden" name="m" id="m" value="web" /> <input type="submit" name="sixBtn" id="sixBtn" value="Search" /></td></tr></table></form>';
document.write(sixsearch);
and this is how it is called:
Code:
<script type="text/javascript">
6_bg_color = '811A20';
6_text_color = 'ffffff';
6_logo = 'yes';
6_search_the_web = 'yes';
</script>
<script type="text/javascript" src="http://sixsearch.net/adverts/searchbar.js"></script>
I can't see what is wrong, and if I substitute the src="http://... to something else then it shows up perfectly. I don't know what is wrong!
Thanks for your help! :D
Tom




