Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Search Input Problem

Author Message
cw10



Joined: 29 Apr 2005
Posts: 4
Location: Chicago

Posted: Sat Apr 30, 2005 - 12:09 pm    Post subject: Search Input Problem Reply with quote

My googlesearch widet only lets me search one word. Any ideas on how to fix this problem? I am not a great coder.
View user's profile Send private message Send e-mail Visit poster's website Widgets
xevve



Joined: 30 Apr 2005
Posts: 5

Posted: Sat Apr 30, 2005 - 3:15 pm    Post subject: Reply with quote

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(' ', '+')
View user's profile Send private message Widgets
avnit



Joined: 25 Apr 2005
Posts: 23

Posted: Sat Apr 30, 2005 - 3:21 pm    Post subject: Reply with quote

Can we see the code? I don't really know what you mean by dosn't "let" you put more than one word.
View user's profile Send private message Send e-mail Visit poster's website Widgets
cw10



Joined: 29 Apr 2005
Posts: 4
Location: Chicago

Posted: Sat Apr 30, 2005 - 6:24 pm    Post subject: Code For Widget Reply with quote

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>
View user's profile Send private message Send e-mail Visit poster's website Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group