🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49783

Utrzymanie url z ramki w polu input

#49783
From: Czesiu
Date: Tue, 02 Feb 2010 15:35
42 lines
2179 bytes
Otóż mam taki skrypt:

var theframe=parent.okno;
function go(e) {
    var kod = (window.event) ? window.event.keyCode : e.which;
	 //wykryj wciśnięty klawisz
if(kod == 13){
  if(document.form1.www.value.indexOf("http://")){
	  theframe.window.location.href = "http://" +
document.form1.www.value;
	  }
	  else{
	  theframe.window.location.href = document.form1.www.value;
	  }
  }
}
function back(){
  theframe.history.back();
}
function forward(){
  theframe.history.forward();
}
function reload(){
  theframe.history.go(0);
}
function google(e){
var kod = (window.event) ? window.event.keyCode : e.which;
	 //wykryj wciśnięty klawisz
if(kod == 13){
  theframe.window.location.href = "http://www.google.pl/search?
hl=pl&q="+document.form1.serch.value+"&lr=";
  }
}
function clean(){
  document.form1.serch.value = "";
  obj = document.form1.serch;
  obj.style.color = "black";
}

i chciałbym ,aby w polu document.form1.www pokazywany był adres strony
z ramki theframe ,próbowałem wszystkiego co znam i nic proszę o pomoc.
Pozdrawiam!!
Technical Details
Message-ID: <c1362a0b-6f90-46ad-8ff8-53c556781260@o28g2000yqh.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!o28g2000yqh.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!goblin1!goblin.stu.neva.ru!postnews.google.com!o28g2000yqh.googlegroups.com!not-for-mail
From: Czesiu <tonyhouk@o2.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Utrzymanie url z ramki w polu input
Date: Tue, 2 Feb 2010 07:35:09 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <c1362a0b-6f90-46ad-8ff8-53c556781260@o28g2000yqh.googlegroups.com>
NNTP-Posting-Host: 95.49.180.199
Mime-Version: 1.0
X-Trace: posting.google.com 1265124909 23036 127.0.0.1 (2 Feb 2010 15:35:09 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 2 Feb 2010 15:35:09 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o28g2000yqh.googlegroups.com; posting-host=95.49.180.199;  posting-account=IyKkLgoAAAC26yZr7z3wLXEsdrmFk2qZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; pl) Presto/2.2.15  Version/10.10,gzip(gfe),gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit