HTML-Problem - Druckversion +- Speedcube.de Forum (https://forum.speedcube.de) +-- Forum: Sonstiges (https://forum.speedcube.de/forumdisplay.php?fid=14) +--- Forum: Off-Topic (https://forum.speedcube.de/forumdisplay.php?fid=16) +--- Thema: HTML-Problem (/showthread.php?tid=1096) |
HTML-Problem - Nerogar - 13.07.2010 Hi, also, ich brauche mal hilfe in sachen HTML. ich wollte mir eine eigene Startseite basteln, in der ich dann verschiedene Links +Google suche habe. also, die Google Suche und die Links sind drinn, jetzt wollte ich aber auch noch eine Youtube suche mit einbauen, also vom gleichen Eingabefeld aus, aber mit einem anderen Knopf. ich hab die idee von diesem video. also, der code ist auch von der google startseite, aber halt verändert der Knopf soll an der eingefärbten stelle sein, und einfach die url: "http://www.youtube.com/results?search_query=" + Suchbegriff aufrufen. aber wie geht das????????? hier mal der code: Code: (Click to View)
<!DOCTYPE HTML> <html onmousemove="google&&google.fade&&google.fade(event)"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Google</title> <script>window.google={kEI:"q2w7TK_3J4Oh-AaouNG3AQ",kEXPI:"17259,17291,24483,25233,25335,25438,25504,25507,25529",kCSI:{e:"17259,17291,24483,25233,25335,25438,25504,25507,25529",ei:"q2w7TK_3J4Oh-AaouNG3AQ",expi:"17259,17291,24483,25233,25335,25438,25504,25507,25529"},ml:function(){},pageState:"#",kHL:"de",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/gen_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;e.li=f+1},lc:[],li:0,j:{en:1,l:function(){},e:function(){},b:location.hash&&location.hash!="#",bv:3,pl:[],mc:0,sc:0.5},Toolbelt:{}};(function(){for(var d=0,c;c=["ad","bc","p","pa","zd","ac","pc","pah","ph","sa","xx","zc","zz"][d++];)(function(a){google.j[a]=function(){google.j.pl.push([a,arguments])}})©})(); window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.gtbExternal&&window.gtbExternal.pageT();}catch(u){}window.google.jsrt_kill=1; </script> <style id="gstyle"> body{margin:0} #gog{padding:3px 8px 0} td{line-height:.8em;} .gac_m td{line-height:17px;} form{margin-bottom:20px;} body,td,a,p,.h{font-family:arial,sans-serif} .h{color:#36c;font-size:20px} .q{color:#00c} .ts td{padding:0} .ts{border-collapse:collapse} em{font-weight:bold;font-style:normal} .lst{width:496px} .tiah{width:458px} input{font-family:inherit} #fctr,#ghead,#pmocntr,#sbl ,#tba,#tbe,.fade{opacity:0;} #fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{background:#fff;} a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important} #gog{background:#fff;} #gbar,#guser{font-size:13px;padding-top:1px !important} #gbar{float:left;height:22px} #guser{padding-bottom:7px !important;text-align:right} .gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px} .gbh{height:0;position:absolute;top:24px;width:100%} #gbs,.gbm{background:#fff;left:0;position:absolute;text-align:left;visibility:hidden;z-index:1000} .gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001} .gb1{margin-right:.5em} .gb1,.gb3{zoom:1} .gb2{display:block;padding:.2em .5em;} .g b2,.gb3{text-decoration:none;border-bottom:none} a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important} a.gb2:hover{background:#36c;color:#fff !important} body{background:#fff;color:black} input{-moz-box-sizing:content-box} a{color:#11c;text-decoration:none} a:hover,a:active{text-decoration:underline} .fl a{color:#4272db}a:visited{color:#551a8b} a.gb1,a.gb4{text-decoration:underline} a.gb3:hover{text-decoration:none} #ghead a.gb2:hover{color:#fff!important} .ds{display:-moz-inline-box} .ds{border-bottom:solid 1px #e7e7e7;border-right:solid 1px #e7e7e7;display:inline-block;margin:3px 0 4px;margin-left:4px} .sblc{padding-top:5px} .sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px;} .lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px;display:block} .lsb{background:url(/images/srpr/nav_logo13.png) bottom;font:15px arial,sans-serif;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;vertical-align:top} .lsb:active{background:#ccc} .lst:focus{outline:none} .ftl,#fll a{margi n:0 12px} #addlang a{padding:0 3px} .gac_v div{display:none} .gac_v .gac_v2,.gac_bt{display:block!important} </style> <noscript> <style>#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:1;}</style> </noscript> <script>var _gjwl=location;function _gjuc(){var b=_gjwl.href.indexOf("#");if(b>=0){var a=_gjwl.href.substring(b+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)}; google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};var e=0;if(!window.google)window.google={};window.google.crm={};window.google.cri=0;window.clk=function(f,g,h,l,m,b,n){if(document.images){e++;var a=encodeURIComponent||escape,c=new Image,i=window.google.cri++;window.google.crm[i]=c;c.onerror=(c.onload=(c.onabort=function(){delete window.google.crm[i]}));if(b&&b.substring(0,6)!="&sig2=")b="&sig2="+b;c.src=["/url?sa=T","","&cd=",a(m),"&ved=",a(n),f?"&url="+a(f.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","q2w7TK_3J4Oh-AaouNG3AQ",b,"&nclks=",e].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> <style type="text/css"> .gac_od{background:white;margin:0;z-index:99;border-top:0;border-left:0;border-right:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;padding:0!important;position:absolute} .gac_id{background:white;margin:0;z-index:99;border-top:1px solid #a2bff0;border-left:1px solid #a2bff0;border-right:1px solid #558be3;border-bottom:1px solid #558be3;display:block;position:relative} .gac_m{background:white;margin:0;z-index:99;border:0;cursor:default;display:block;font-size:17px;line-height:117%;padding:0;position:relative} .gac_wd{background:#999;height:1px;position:absolute;right:-1px;top:0;width:1px;z-index:100} .gac_m td{line-height:22px} .gac_n{padding-top:1px;padding-bottom:1px} .gac_b td.gac_c{background:#d5e2ff} .gac_b{background:#d5e2ff} .gac_a td.gac_f{background:#fff8dd} .gac_p{padding:1px 4px 2px 3px} .gac_u{padding:0 0 1px 0;line-height:117%;text-align:left} .gac_t{width:100%;text-align:left;font-size:17px} .gac_za{position:absolute;bottom:0;right:0;text-align:right;font-size:12px;padding-right:5px} .gac_bt{width:510p x;text-align:center;padding:8px 0 7px;position:relative} .gac_sb{font-size:15px;height:28px;margin:0.2em} .gac_z{white-space:nowrap;color:#c00} .gac_s{height:3px;font-size:1px} .gac_c{white-space:nowrap;overflow:hidden;text-align:left;padding-left:7px;padding-right:3px} .gac_e{text-align:right;padding:0 3px} .gac_d{font-size:11px} .gac_h{color:green} .gac_j{display:block} .gac_l{line-height:18px} .gac_x{display:block;line-height:16px} .gac_y{font-size:13px} .gac_i{color:#666} .gac_w img{width:40px;height:40px} .gac_w{width:1px} .gac_r{color:red} .gac_v{padding-bottom:5px} </style> </head> <body alink="#ff0000" bgcolor="#ffffff" link="#0000cc" text="#000000" vlink="#551a8b"> <textarea id="csi" style="display: none;">1</textarea> <script>if(google.j.b)document.body.style.visibility='hidden';</script> <iframe name="wgjf" style="display: none;" src="" onload="google.j.l()" onerror="google.j.e()"></iframe> <textarea id="wgjc" style="display: none;"></textarea> <textarea id="csi" style="display: none;"></textarea> <textarea id="hcache" style="display: none;"></textarea> <span id="main"> <div style="opacity: 1;" id="ghead"> <div id="gog"> <div id="gbar"> <nobr> <b class="gb1">Web</b> <a href="http://www.google.de/imghp?hl=de&tab=wi" onclick="gbar.qs(this)" class="gb1">Bilder</a> <a href="http://video.google.de/?hl=de&tab=wv" onclick="gbar.qs(this)" class="gb1">Videos</a> <a href="http://maps.google.de/maps?hl=de&tab=wl" onclick="gbar.qs(this)" class="gb1">Maps</a> </nobr> </div> <div id="guser" width="100%"> <span id="gbn" class="gbi"> </span> <span id="gbf" class="gbf"> </span> <a href="http://www.speedcube.de/forum" class="gb4">Speedcube.de</a> | <a href="http://www.youtube.de" class="gb4">Youtube.de</a> | <a href="http://upload.youtube.com/my_videos_upload" class="gb4">Video hochladen</a> </div> </div> <div class="gbh"> </div> <br><br><br><br><br> </div> </div> <center> <span id="body"> <center> <br id="lgpd" clear="all"> <div id="lga"> <div style="padding: 28px 0pt 3px;"> <img src="Data/logo.png"> </div> <br> </div> <form action="http://www.google.de/search" name="f" onsubmit="google.fade=null"> <table cellpadding="0" cellspacing="0"> <tbody> <tr valign="top"> <td width="25%"> </td> <td align="center" nowrap="nowrap"> <input name="hl" value="de" type="hidden"> <input name="source" value="hp" type="hidden"> <div class="ds" style="height: 32px; margin: 4px 0pt;"> <input autocomplete="off" onblur="google&&google.fade&&google.fade()" maxlength="2048" name="q" class="lst" title="Google-Suche" size="57" style="background: none repeat scroll 0% 0% rgb(255, 255, 255); border-width: 1px; border-style: solid; border-color: rgb(204, 204, 204) rgb(153, 153, 153) rgb(153, 153, 153) rgb(204, 204, 204); color: rgb(0, 0, 0); font: 18px arial,sans-serif bold; height: 25px; margin: 0pt; padding: 5px 8px 0pt 6px; vertical-align: top;"><br> </div> <br style="line-height: 0pt;"> <span class="ds"> <span class="lsbb"> <input name="btnG" value="Google-Suche" class="lsb" onclick="this.checked=1" type="submit"> </span> </span> <span class="ds"> <span class="lsbb"> <input name="btnI" value="Auf gut Glück!" class="lsb" onclick="this.checked=1" type="submit"> </span> </span> <button value="Youtube-Suche" style="padding: 5px 5pt 5px;"> </button> </td> <td style="opacity: 1;" class="sblc" id="sbl" align="left" nowrap="nowrap" width="25%"> <a href="http://www.google.de/advanced_search?hl=de">Erweiterte Suche</a> </td> </tr> </tbody> </table> <input value="f" name="aq" type="hidden"> <input value="" name="aqi" type="hidden"> <input value="" name="aql" type="hidden"> <input value="" name="oq" type="hidden"> <input value="" name="gs_rfai" type="hidden"> </form> <div style="font-size: 83%; min-height: 3.5em;"> <br> </div> <div id="res"> </div> </center> </span> <script> function _gjp() {!(location.hash && _gjuc()) && setTimeout(_gjp, 500);}google.j[1]={cc:[],co:['ghead','body','footer','xjsi'],pc:[],nb:0,css:document.getElementById('gstyle').innerHTML,main:' <div id=ghead> </div> <span id=body> </span> <span id=footer> </span> <span id=xjsi> </span> '}; </script> <script> function wgjp(){var xjs=document.createElement('script');xjs.src='/Data/e829ce67de7d79fd.js';(document.getElementById('xjsd') || document.body).appendChild(xjs)}; </script> <div id="xjsd"> <script src="Data/UpbXrANbSoA.js"> </script> <script src="Data/e829ce67de7d79fd.htm"> </script> </div> <div id="xjsi"> <script> if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");a.src="/Data/UpbXrANbSoA.js";(document.getElementById("xjsd")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0); google.xjs=1};google.neegg=1;google.y.first.push(function(){google.ac.i(document.f,document.f.q,'','','',{o:1,sw:1});(function(){ var h,i,j=1,k=google.time(),l=[];google.rein.push(function(){j=1;k=google.time()});google.dstr.push(function(){google.fade=null});function m(a,f){var b=[];for(var c=0,e;e=a[c++];){var d=document.getElementById(e);d&&b.push(d)}for(var c=0,g;g=f[c++];)b=b.concat(n(g[0],g[1]));for(var c=0;b[c];c++)b[c]=[b[c],"opacity",0,1,0,""];return b}function n(a,f){var b=[],c=new RegExp("(^|\\s)"+f+"($|\\s)");for(var e=0,d,g=document.getElementsByTagName(a);d= g[e++];)c.test(d.className)&&b.push(d);return b}google.fade=function(a){if(google.fx&&j){a=a||window.event;var f=1,b=google.time()-k;if(a&&a.type=="mousemove"){var c=a.clientX,e=a.clientY;f=(h||i)&&(h!=c||i!=e)&&b>600;h=c;i=e}if(f){j=0;google.fx.animate(600,m(["fctr","ghead","pmocntr","sbl","tba","tbe"],[["span","fade"],["div","fade"],["div","gbh"]]));for(var d=0;d<l.length;++d)if(typeof l[d]=="function")l[d]()}}};google.addFadeNotifier=function(a){l.push(a);if(!j)a()}; })(); ;(function(){ function e(){var a=null;if(window.ActiveXObject){a=new ActiveXObject("Msxml2.XMLHTTP");if(!a)a=new ActiveXObject("Microsoft.XMLHTTP")}else if(window.XMLHttpRequest)a=new XMLHttpRequest;return a}function f(a){if(window.execScript)window.execScript(a,"JavaScript");else if(window.eval){var b=null;window.eval("var _et_ = 1;");if(typeof window._et_!="undefined"){delete window._et_;b=true}else b=false;if(b)window.eval(a);else{var d=window.document,c=d.createElement("script");c.type="text/javascript";c.defer= false;c.appendChild(d.createTextNode(a));d.body.appendChild©;d.body.removeChild©}}}function g(a){var b=a;if(b&&b.length>0&&b.substring(0,5)=="throw")b=b.substring(27);f(b)}function h(a){if(a.readyState==4&&(a.status==200||a.status==304))try{g(a.responseText)}catch(b){}}function i(){if(window.google&&!window.google.cp){window.google.cp={};window.google.cp.o={l:"/intl/en_com/images/srpr/logo1w.png",h:false,a:"Google",u:"",d:false}; var a=e();if(a){a.open("GET","/ig/cp/get?hl=de&gl=de",true);a.onreadystatechange=function(){h(a)};a.send(null)}}}i(); })(); ;google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;} </script> </div> <script> (function(){ var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("load",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c);a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error", h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;google.kCSI.imn=b;google.kCSI.imp=e;google.report&&google.report(google.timers.load,google.kCSI)}if(window.addEventListener)window.addEventListener("load",l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime()); })(); </script> <div style="visibility: hidden; left: 266px; top: 241px; min-width: 512px;" class="gac_od"> <div class="gac_id"> <table class="gac_m" cellpadding="0" cellspacing="0"> </table> </div> </div> <style type="text/css"> #cpErrorMsg { margin-right: 5px; }#cpFooter { cursor: default; position: relative; margin: 0px 8px; }#cpNavContainer { position: absolute; bottom: 0; height: 20px; }#cpNavLinkIframe { height: 17px; overflow: hidden; }#cpNavTextWrapper { position: relative }#cpNavTextWrapper a:link { text-decoration: none }#cpNavTextWrapper a:hover {text-decoration: underline } </style> </body> </html> RE: HTML-Problem - Von Birne - 14.07.2010 hast dus mal mit ner var versucht? das eingabefeld dann einfach per POST übertragen und ungefähr sowas: Code: (Click to View)
<?php if(isset($_POST[a])) { header(Location:"http://www.youtube.com/results?search_query=".$_POST[a]."/"); } ?> ich meine, das war der autolink, bin mir aber nicht sicher, obs so klappt RE: HTML-Problem - Nerogar - 14.07.2010 ich hab halt keine anung von php/javascript. die seite ist hauptsächlich von der google startseite. ich versuchs mal aso, ich ekomm das irgendwie nicht hin, dass das mit dem eingabefeld geht. ich hab mal das eingabefeld Gelb markiert, vielleicht kannst du das ja mal probieren und den code dann darauf anpassen. ich hab echt keine ahnung davon. |