Click to See Complete Forum and Search --> : Make Search Button Work [help post]


Matth3vv
04-13-2009, 04:18 PM
I have a project for my web class. It is a very basic class. My project is to simply change the main google page.

So I...

Saved the html
Opened it in dreamweaver (adobe)
Changed some things
Added my logo

However...

the buttons "google search" and "I'm feeling lucky" lead nowhere. This is probably something easily solved, but there is a lot of code. and I am hardly a html expert.

------


This is where I think the problem is

<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR vAlign=top>
<TD width="25%">&nbsp;</TD>
<TD noWrap align=middle><INPUT
title="Google Search" maxLength=2048 size=55 name=q
autocomplete="off"><BR><INPUT name=btnGhref=http://www.google.com/webhp?hl=en&amp;btnG type=submit value="Google Search"><INPUT type=submit value="I'm Not Really Feeling Lucky" name=btnI></TD>
<TD noWrap width="25%"><FONT size=-2>&nbsp;&nbsp;<A


This is the whole page-


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0022)http://www.google.com/ -->
<HTML><HEAD><TITLE>Google</TITLE>
<META http-equiv=content-type content="text/html; charset=UTF-8">
<SCRIPT>window.google={kEI:"AC3eSZ2FL4LjnQe4mImQDg",kEXPI:"17259,18169,20249,20253",kHL:"en"};
window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.gtbExternal&&window.gtbExternal.pageT()||window.external&&window.external.pageT}catch(b){}
window.google.jsrt_kill=1;
var _gjwl=location;function _gjuc(){var a=_gjwl.hash.substring(1);if(/(^|&)q=/.test(a)&&a.indexOf("#")==-1&&!/(^|&)cad=h($|&)/.test(a)){_gjwl.replace("search?"+a.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h");return 1}return 0}function _gjp(){!(window._gjwl.hash&&window._gjuc())&&setTimeout(_gjp,500)};
window._gjp && _gjp();</SCRIPT>

<STYLE>BODY {
FONT-FAMILY: arial,sans-serif
}
TD {
FONT-FAMILY: arial,sans-serif
}
A {
FONT-FAMILY: arial,sans-serif
}
P {
FONT-FAMILY: arial,sans-serif
}
.h {
FONT-FAMILY: arial,sans-serif
}
.h {
FONT-SIZE: 20px; COLOR: #36c
}
.q {
COLOR: #00c
}
.ts TD {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ts {
BORDER-COLLAPSE: collapse
}
#gbar {
PADDING-LEFT: 2px; HEIGHT: 22px
}
.gbh {
BORDER-TOP: #c9d7f1 1px solid; FONT-SIZE: 1px
}
.gbd {
BORDER-TOP: #c9d7f1 1px solid; FONT-SIZE: 1px
}
.gbh {
WIDTH: 100%; POSITION: absolute; TOP: 24px; HEIGHT: 0px
}
#gbi {
Z-INDEX: 1000; BACKGROUND: #fff; LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 24px
}
#gbs {
Z-INDEX: 1000; BACKGROUND: #fff; LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 24px
}
#gbi {
BORDER-RIGHT: #36c 1px solid; BORDER-TOP: #c9d7f1 1px solid; Z-INDEX: 1001; BORDER-LEFT: #a2bae7 1px solid; BORDER-BOTTOM: #36c 1px solid
}
#guser {
PADDING-BOTTOM: 7px! important
}
#gbar {
FONT-SIZE: 13px; PADDING-TOP: 1px! important
}
#guser {
FONT-SIZE: 13px; PADDING-TOP: 1px! important
}

@media All
{
.gb1 {
VERTICAL-ALIGN: top; MARGIN-RIGHT: 0.73em; HEIGHT: 22px
}
.gb3 {
VERTICAL-ALIGN: top; MARGIN-RIGHT: 0.73em; HEIGHT: 22px
}
#gbar {
FLOAT: left
}
}
.gb2 {
PADDING-RIGHT: 0.5em; DISPLAY: block; PADDING-LEFT: 0.5em; PADDING-BOTTOM: 0.2em; PADDING-TOP: 0.2em
}
A.gb1 {
COLOR: #00c! important
}
A.gb2 {
COLOR: #00c! important
}
A.gb3 {
COLOR: #00c! important
}
.gb2 {
TEXT-DECORATION: none
}
.gb3 {
TEXT-DECORATION: none
}
A.gb2:hover {
BACKGROUND: #36c; COLOR: #fff! important
}
</STYLE>

<SCRIPT>google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};window.clk=function(b,c,d,e,f,g,h){if(document.images){var a=encodeURIComponent||escape;(new Image).src=["/url?sa=T",c?"&oi="+a(c):"",d?"&cad="+a(d):"","&ct=",a(e),"&cd=",a(f),b?"&url="+a(b.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","AC3eSZ2FL4LjnQe4mImQDg",g].join("")}return true};
window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o[i]=e[i];google.x(o,function(){gbar.tg(o)})}};</SCRIPT>

<META content="MSHTML 6.00.2900.3492" name=GENERATOR></HEAD>
<BODY text=#000000 vLink=#551a8b aLink=#ff0000 link=#0000cc bgColor=#ffffff
topMargin=3
onload="document.f.q.focus();if(document.images)new Image().src='/images/nav_logo4.png'"
marginheight="3"><TEXTAREA id=csi style="DISPLAY: none"></TEXTAREA>
<DIV id=gbar><NOBR><B class=gb1>Series of tubes</B> <A class=gb1 onclick=gbar.qs(this)
href="http://images.google.com/imghp?hl=en&amp;tab=wi">Capture ya soul</A> <A class=gb1
onclick=gbar.qs(this)
href="http://maps.google.com/maps?hl=en&amp;tab=wl">Where you going son</A> <A class=gb1
onclick=gbar.qs(this)
href="http://news.google.com/nwshp?hl=en&amp;tab=wn">The World </A> <A class=gb1
onclick=gbar.qs(this) href="http://video.google.com/?hl=en&amp;tab=wv">Moving Pictures</A></A>
<DIV id=gbi><A class=gb2 onclick=gbar.qs(this)
onclick=gbar.qs(this)
href="http://groups.google.com/grphp?hl=en&amp;tab=wg">Groups</A> <A class=gb2
onclick=gbar.qs(this)
href="http://books.google.com/bkshp?hl=en&amp;tab=wp">Books</A> <A class=gb2
onclick=gbar.qs(this)
href="http://scholar.google.com/schhp?hl=en&amp;tab=ws">Scholar</A> <A class=gb2
onclick=gbar.qs(this)
href="http://www.google.com/finance?hl=en&amp;tab=we">Finance</A> <A class=gb2
onclick=gbar.qs(this)
href="http://blogsearch.google.com/?hl=en&amp;tab=wb">Blogs</A>
<DIV class=gb2>
<DIV class=gbd></DIV></DIV><A class=gb2 onclick=gbar.qs(this)
href="http://www.youtube.com/?hl=en&amp;tab=w1">YouTube</A> <A class=gb2
href="http://www.google.com/calendar/render?hl=en&amp;tab=wc">Calendar</A> <A
class=gb2 onclick=gbar.qs(this)
href="http://picasaweb.google.com/home?hl=en&amp;tab=wq">Photos</A> <A class=gb2
href="http://docs.google.com/?hl=en&amp;tab=wo">Documents</A> <A class=gb2
href="http://www.google.com/reader/view/?hl=en&amp;tab=wy">Reader</A> <A
class=gb2 href="http://sites.google.com/?hl=en&amp;tab=w3">Sites</A>
<DIV class=gb2>
<DIV class=gbd></DIV></DIV><A class=gb2
href="http://www.google.com/intl/en/options/">even more »</A>
</DIV></NOBR></DIV>
<DIV class=gbh style="LEFT: 0px"></DIV>
<DIV class=gbh style="RIGHT: 0px"></DIV>
<DIV id=guser
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 84%; PADDING-BOTTOM: 4px; PADDING-TOP: 0px"
align=right width="100%"><NOBR><A
href="http://www.google.com/url?sa=p&amp;pref=ig&amp;pval=3&amp;q=http://www.google.com/ig%3Fhl%3Den%26source%3Diglk&amp;usg=AFQjCNFA18XPfgb7dKnXfKz7x7g1GDH1tg">meGoogle</A>
| <A
href="https://www.google.com/accounts/Login?continue=http://www.google.com/&amp;hl=en">Give me your password</A></NOBR></DIV>
<CENTER><BR id=lgpd clear=all>
<img src="The Better Google.JPG" width="740" height="94" alt="Better Google"><BR><BR>
<FORM name=f action=/search>
<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR vAlign=top>
<TD width="25%">&nbsp;</TD>
<TD noWrap align=middle><INPUT
title="Google Search" maxLength=2048 size=55 name=q
autocomplete="off"><BR><INPUT name=btnGhref=http://www.google.com/webhp?hl=en&amp;btnG type=submit value="Google Search"><INPUT type=submit value="I'm Not Really Feeling Lucky" name=btnI></TD>
<TD noWrap width="25%"><FONT size=-2>&nbsp;&nbsp;<A
href="http://www.google.com/advanced_search?hl=en">Advanced
Search</A><BR>&nbsp;&nbsp;<A
href="http://www.google.com/preferences?hl=en">Preferences</A><BR>&nbsp;&nbsp;<A
href="http://www.google.com/language_tools?hl=en">Language
Tools</A></FONT></TD></TR></TBODY></TABLE></FORM><BR><BR></CENTER>
<SCRIPT>if(google.y)google.y.first=[];google.dstr=[];google.rein=[];window.setTimeout(function(){var xjs=document.createElement('script');xjs.src='/extern_js/f/CgJlbhICdXMrMAo4DSwrMA44BSwrMBY4CSwrMBc4ASwrMBg4AywrMCU4yYgBLCswJjgELCswJzgALA/Q_LXFKdy02E.js';document.body.appendChild(xjs)},0);google.y.first.push(function(){google.ac.i(docume nt.f,document.f.q,'','')})</SCRIPT>

<SCRIPT>(function(){
function a(){google.timers.load.t.ol=(new Date).getTime();google.report&&google.report(google.timers.load,{ei:google.kEI,e:google.kEXPI})}if(window.addEventListener)window.a ddEventListener("load",a,false);else if(window.attachEvent)window.attachEvent("onload",a);google.timers.load.t.prt=(new Date).getTime();
})();
</SCRIPT>
</FONT></BODY></HTML>

Coyotelab
04-13-2009, 11:58 PM
Form Action is set to <FORM name=f action=/search>
where /search is a local folder for Google server, you need to change that to:
<form action="http://www.google.com/search" name=f>

Matth3vv
04-15-2009, 03:24 PM
Thank you.

BTW- the "i'm feeling lucky" leads to the top search result. Is there a way to lead to a search result down a couple of pages?

Matth3vv
04-17-2009, 03:20 PM
The "I'm feeling lucky" button uses the same code (or similar) as the google search button. Can I make it lead nowhere?

Charles
04-18-2009, 06:00 AM
Move it to its own FORM element. But these are questions for the Dreamweaver forum if you are using that thing. This is the HTML forum and it is for people who are using or would like to learn HTML.