🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: return false; pod IE

#39483
From: shpyo
Date: Mon, 17 Apr 2006 05:46
35 lines
2188 bytes
Użytkownik "B.Orzech" <mentor_bo@poczta.onet.pl> napisał w wiadomości 
news:1145229610.147707.278840@u72g2000cwu.googlegroups.com...
> sorry nie doczytalem twojego posta.....
> robisz link: <a href="abc.html" onclick="return
> changeItem(this)">abc.html</a>
> JS:
> function changeItem(obj){
>
> if(obj.href=="pasuje_mi_ten_adres"){
> //tzn obj to obiekt typu anchor
> itd...http://www.w3schools.com/htmldom/dom_obj_anchor.asp
>    return true;
> }else{
>    return false;
> }
>
> }

Hmm. To jest robione pod konkretnego linka.
Cały problem polega na tym, że chcę mieć link w normalnej postaci (dla 
robotów odwiedzających stronę jak i dla userów którzy mają wyłączoną 
obslługę JS lub jak napisał porneL: "Mam ochotę mordować za wszystkie AJAXy 
które padają przy próbie otworzenia linku w nowym tabie." :P).

Pod FF wszystko działa cacy, tylko IE się buntuje - teraz nawet nie chce 
wykonać funkcji i wyrzuca mi błąd (po kliknięciu na link), że oczekiwano 
obiektu :/.
link: http://blog.shpyo.net/

za pomoc dziękuję,
pozdr,
shpyo

ps. również wesołych świąt :)) 
Technical Details
Message-ID: <e1va7l$7cb$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <e1ugmq$fs2$1@nemesis.news.tpi.pl><op.s74ht5ohfux2e6@pornel.net> <1145229610.147707.278840@u72g2000cwu.googlegroups.com>

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!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "shpyo" <niechce@spamu.opps>
Newsgroups: pl.comp.lang.javascript
Subject: Re: return false; pod IE
Date: Mon, 17 Apr 2006 07:46:50 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 37
Message-ID: <e1va7l$7cb$1@nemesis.news.tpi.pl>
References: <e1ugmq$fs2$1@nemesis.news.tpi.pl><op.s74ht5ohfux2e6@pornel.net> <1145229610.147707.278840@u72g2000cwu.googlegroups.com>
NNTP-Posting-Host: hq60.internetdsl.tpnet.pl
X-Trace: nemesis.news.tpi.pl 1145252917 7563 80.53.94.60 (17 Apr 2006 05:48:37 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Mon, 17 Apr 2006 05:48:37 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit