HTML on Desktop

Discussion in 'Web Design & Coding' started by Piett, Aug 7, 2002.

  1. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    This is most likely something that madmatt will know how to fix:
    I'm trying to get this Google search to work on my desktop. It's all HTML (so far), but I am unhappy with it. Currently it works fine, just not like i want it to. After i search for something and the Google page opens up, the text that i entered in the text box remains. I know that Javascript is needed, but i'm not too sure how i should go about it. Anyone have any suggestions?

    Here's is the code:
    <body bgcolor="#004E98">
    <FORM method=GET action="http://www.google.com/search">
    <font face="Ariel">
    <font size="2" value style="color: #FFFFFF">Google: </font>
    <input TYPE="text" name="text" size="25" maxlength="255" value style="color: #FFFFFF; font-family: Ariel; font-size: 8pt; border: 1px solid #FFFFF; background-color: #004E98"><font size="2">
    </font>
    <input type="submit" name="btnG" VALUE="Search" style="font-family: Ariel; font-size: 10pt; color: #FFFFFF; height: 17; position: relative; border: 1px solid #FFFFF; padding-bottom: 1; background-color: #004E98" onclick"buttonPushed_onclick()"></font>
    <SCRIPT LANGUAGE=JavaScript>
    function buttonPushed_onclick()
    {
    text.value=""
    }
    </form>
    </table>
    </body>


    All help is appreciated.
     
  2. The Bishop

    The Bishop Guest

    I am interested in this too.
     
  3. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    </p><p><!-- Search Google -->
    <center>
    <FORM method=GET action="http://www.google.com/search">
    <a href="http://www.google.com/"><img src="http://www.google.com/logos/Logo_40wht.gif"
    border="0" alt="Google" align="absmiddle"></a>
    <TABLE bgcolor="#FFFFFF"><tr>
    <td> <A HREF="http://www.google.com/"> </A>
    <INPUT TYPE=text name=q size=25 maxlength=255 value="">
    <INPUT type=submit name=btnG VALUE="Google Search">
    </td></tr></TABLE>
    </FORM>
    </center>
    <!-- Search Google -->


    try that
     
  4. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    well, that certainly does work, but the search string still remains in the text box on my desktop. that is what i really want to get rid of, the remaining text.
     
  5. The Bishop

    The Bishop Guest

    interesting indeed.. time do do some home work

    don't you think fubar?
     
  6. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    so noone know's how to get the text to go away on the desktop? how about anyone that knows java script? that would me much appreciated.
     
  7. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    hrmm looks like i need to wait for matt to get back from his vacation to figure this one out.
     
  8. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    try adding the bold part
    Code:
    <input TYPE="text" name="text" size="25" maxlength="255" value style="color: #FFFFFF; font-family: Ariel; font-size: 8pt; border: 1px solid #FFFFF; background-color: #004E98" [b]onFocus="text.value=''"[/b]>
    That will reset the text everytime you click on the text input
     
  9. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    I did it for you
    Code:
    <body bgcolor="#004E98" onLoad="focus()">
    <FORM method=GET action="http://www.google.com/search" name="form1">
    <font face="Ariel">
    <font size="2" value style="color: #FFFFFF">Google: </font>
    <input TYPE="text" name="text1" size="25" maxlength="255" value style="color: #FFFFFF; font-family: Ariel; font-size: 8pt; border: 1px solid #FFFFF; background-color: #004E98" onFocus="text1.value=''"><font size="2">
    </font>
    <input type="submit" name="btnG" VALUE="Search" style="font-family: Ariel; font-size: 10pt; color: #FFFFFF; height: 17; position: relative; border: 1px solid #FFFFF; padding-bottom: 1; background-color: #004E98"></font>
    </form>
    </table>
    <script language="javascript">
    function focus() {
    document.form1.text1.focus()
    }
    </script>
    </body>
    
     
  10. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    So far sk8, your reply has been the most useul. (i mean no ill when i say that). it almost works, but it wont search google. it opens a new browser, goes to google, and you can see what you searched for in the addy bar (eg. www.goo......+i+searched+text) but there are no results, nor is there the "no results" text. it's just a lot of nothing. any ideas why it is doing that?
     
  11. Static 99

    Static 99 Guest

    maybe it works if you ad a ? after search:

    <FORM method=GET action="http://www.google.com/search?" name="form1">
     
  12. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    'fraid that doesn't work either. still get nothing as a result. hmm who knew that something simple like this would take this amount of thought :)

    silly little project causeing so much hassle
     
  13. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    google changed there format i think... im working on it give me a night
     
  14. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    sure thing.

    i'm not sure if they have changed their format, because i have the same code as i posted in the first post, except without the java script inside it, and it still searches google, but it doesn't remove the text inside of the text field.
     
  15. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    it cant be done... the best you can do is have the text be deleted then you click on the box... its because google uses a one character name on the box and if you change that it wont search and you can call to anything in JS that has a one character name
     
  16. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    actually i hae an idea..
     
  17. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    hmm i still cant get it to work sorry
     
  18. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    well crud...thanks for the effort anyways sk8. i appreciate it.

    i think that i will still ask matt though. he might have come across something that can take care of it, vb script perhaps. ah well, that will wait untill he get's back.
     
  19. MdSalih

    MdSalih The Boss

    Messages:
    1,730
    Location:
    Birmingham, UK
    hmm... i know how its done... just sliped my mind - i'll look around the web for it...

    what you could to is on submit reload page ?
    that would clear it for certain but just reload the page every time u use the google search...

    MdSalih

    P.S. off topic but could u stick up a print screen of yer desktop ? i like to compare mine with others + need new ideas of stuff to stick on it :p
     
  20. Piett

    Piett ...will circle this city

    Messages:
    528
    Location:
    Calgary, Alberta
    sure thing Md. i'm afraid that i haven't done anything with it in quite a while, been really busy wiht school, but i have 4 months off now, so i'm sure that i'll get on to doing something to it :)

    i do want to change my menu's to mouse over menus, as opposed to click ones, so i'll probably get that going in a weeks or so

    you can get the pic here