indsættelse af %20 i stedet for space
jeg har lavet dette script:problemet er at det ikke virker hvis jeg skrive flere ord i søgefeltet, så hvordan laver jeg et script der konverterer alle mellemrum til %20 ????
<HTML>
<HEAD>
<TITLE>[Ingen titel]</TITLE>
<META NAME="Generator" CONTENT="Stone's WebWriter 2">
<SCRIPT LANGUAGE="JavaScript">
function search() {
searchWin=window.open("", "searchWin2", "resizable,scrollbars,width=400,height=300");
searchWin.document.write('<HTML>\n'+
'<HEAD>\n'+
' <TITLE> Searching for: "' + document.forms.searchform.query.value + ' "... </TITLE>\n'+
'</HEAD>\n'+
'<FRAMESET FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" ROWS="50,*" COLS="100%">\n'+
' <FRAME SRC="search-urls.html" NAME="bannerad" SCROLLING="NO" MARGINHEIGHT="0" MARGINWIDTH="0" NORESIZE>\n'+
' <FRAME SRC="' + document.forms.searchform.engine.options[document.forms.searchform.engine.selectedIndex].value + document.forms.searchform.query.value + '" NAME="ramme1" SCROLLING="NO" MARGINHEIGHT="0" MARGINWIDTH="0" NORESIZE>\n'+
'</FRAMESET>\n'+
'</HTML>\n' );
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black" LINK="Blue" VLINK="#660066" ALINK="Red">
<FORM NAME="searchform">
<INPUT TYPE="TEXT" NAME="query" SIZE="40">
<SELECT NAME="engine">
<OPTION VALUE="http://soeg.jubii.dk/res.asp?startnummer=1&soegeord=">Jubii</OPTION>
</SELECT>
<INPUT TYPE="BUTTON" ONCLICK="search()" VALUE="Search">
</FORM>
</BODY>
</HTML>