Article View: pl.comp.lang.javascript
Article #39962Re: Pomozecie ?? :)
From: Łukasz Kajda
Date: Wed, 17 May 2006 15:52
Date: Wed, 17 May 2006 15:52
29 lines
1658 bytes
1658 bytes
Użytkownik "m@rio" <mariusz_NO_SPAM_@wp.pl> napisał w wiadomości
news:e4fb4d$60l$1@news.onet.pl...
> Witam
>
> Jako zupełnie zielony wziąłem się za napisanie prostej funkcji.
Niestety coś
> nie wychodzi. Może wskaże mi co robie nie tak. Poniższa funkcja,
której
> zadaniem jest jedynie zwrócenie z wartości podanej w parametrze
Location,
> ciągu umieszczonego pomiędzy "(#", "#)".
function GetID(Location)
{
var openBracket = Location.indexOf("(#", 0);
var closeBracket = Location.indexOf("#)", 0);
if ((openBracket!=-1) && (closeBracket!=-1))
return Location.substr(openBracket + 2, closeBracket -
openBracket - 2);
else
return null;
}
--
Łukasz Kajda
Gdańsk
e-mail: lukkajda@wp.pl
Technical Details
Message-ID:
<e4fgsb$94c$1@news.task.gda.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.task.gda.pl!not-for-mailReferences:
<e4fb4d$60l$1@news.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!news.task.gda.pl!not-for-mail From: Łukasz Kajda <lukkajda@wp.pl> Newsgroups: pl.comp.lang.javascript Subject: Re: Pomozecie ?? :) Date: Wed, 17 May 2006 17:52:53 +0200 Organization: CI TASK http://www.task.gda.pl/ Lines: 31 Message-ID: <e4fgsb$94c$1@news.task.gda.pl> References: <e4fb4d$60l$1@news.onet.pl> NNTP-Posting-Host: fw.ien.gda.pl Mime-Version: 1.0 X-Trace: news.task.gda.pl 1147881163 9356 153.19.0.37 (17 May 2006 15:52:43 GMT) X-Complaints-To: abuse@news.task.gda.pl NNTP-Posting-Date: Wed, 17 May 2006 15:52:43 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit