| Author |
Message |
cw10
Joined: 29 Apr 2005 Posts: 4 Location: Chicago
|
| Posted: Sat Apr 30, 2005 - 12:09 pm Post subject: Search Input Problem |
|
|
| My googlesearch widet only lets me search one word. Any ideas on how to fix this problem? I am not a great coder. |
|
| |
|
| |
xevve
Joined: 30 Apr 2005 Posts: 5
|
| Posted: Sat Apr 30, 2005 - 3:15 pm Post subject: |
|
|
| If you want to search with multiple words you have to convert all the spaces into "+" instead. You can easily do this with the replace() function. So, say you want to replace all the spaces in a string to "+", you can do it by typing something like string.replace(' ', '+') |
|
| |
|
| |
avnit
Joined: 25 Apr 2005 Posts: 23
|
| Posted: Sat Apr 30, 2005 - 3:21 pm Post subject: |
|
|
| Can we see the code? I don't really know what you mean by dosn't "let" you put more than one word. |
|
| |
|
| |
cw10
Joined: 29 Apr 2005 Posts: 4 Location: Chicago
|
| Posted: Sat Apr 30, 2005 - 6:24 pm Post subject: Code For Widget |
|
|
This is the code:
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#dictionPane {width: 419px; height: 107px; background-image: url('default.png');}
#searchForm {position: relative; left: 185px; top: 42px; width: 200px; height: 62px;}
#searchInput{width:200px; margin:0px 0 0 0px;}
</style>
</head>
<body>
<div id="dictionPane">
<form id="searchForm" action="javascript:widget.openURL('http://www.google.com/search?client=safari&rls=en-us&q=' + searchInput.value + '&ie=UTF-8&oe=UTF-8'); searchInput.value=''">
<input id="searchInput" type="search" autosave="searchHistory" results="7" />
</form>
</div>
</body>
</html> |
|
|
| |
|
| |