🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Pytanie początkującego - parametry do funkcji

#50773
From: Paweł Piskorz
Date: Mon, 23 May 2011 08:45
46 lines
2248 bytes
On 2011-05-23 00:02, Tomasz Tybusz wrote:
> W dniu 2011-05-22 12:51, Paweł Piskorz pisze:
>> Nie o to escape'owanie mi chodziło :)
>> Wywal escape i też zadziała - tym razem prawidłowo wstawiłeś i
>> escapenąłeś cudzysłowy i apostrofy.
>>
>>
> Ale nadal nie działało,

To u mnie działa:
<div id="tutaj">
</div>
<script>
function fnFormatDetails ( )
{
var test = "2/2011/R";
var sOut = '<table cellpadding="5" cellspacing="0" border="0" 
style="padding-left:50px;">';
sOut += '<tr><td>Numer karty:</td><td>'+test+'</td></tr>';
sOut += '<tr><td>Działania korygujące:</td><td><input 
name="pokaz_dzialania" type="button" 
onClick="pokaz_dzialania_korygujace(\''+test+'\');" value="Pokaż 
działania korygujące" /><td></tr>';
sOut += '</table>';

return sOut;
}

function pokaz_dzialania_korygujace(nr_karty)
{
alert(nr_karty);
return true;
}

document.getElementById('tutaj').innerHTML += fnFormatDetails();
</script>

> gdyż string zawierał / To było problemem

/ w stringu problemem? Na pewno w tym miejscu Ci sprawiał problemy?


-- 
message[autor="PablO"]::after {
	content:"Pozdrawiam";
}
Technical Details
Message-ID: <ird6qq$g9u$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <ir5lr3$kgv$1@news.onet.pl> <ir64eh$k4a$1@inews.gazeta.pl> <ir672t$nkq$1@news.onet.pl> <ir917t$p8f$1@news.onet.pl> <iraprn$lh2$1@inews.gazeta.pl> <irc15e$a1n$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Paweł Piskorz <nie.ma.maila@psikre.nie?>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Pytanie początkującego - parametry do
 funkcji
Date: Mon, 23 May 2011 10:45:10 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 46
Message-ID: <ird6qq$g9u$1@inews.gazeta.pl>
References: <ir5lr3$kgv$1@news.onet.pl> <ir64eh$k4a$1@inews.gazeta.pl> <ir672t$nkq$1@news.onet.pl> <ir917t$p8f$1@news.onet.pl> <iraprn$lh2$1@inews.gazeta.pl> <irc15e$a1n$1@news.onet.pl>
NNTP-Posting-Host: 213-238-83-197.adsl.inetia.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1306140314 16702 213.238.83.197 (23 May 2011 08:45:14 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Mon, 23 May 2011 08:45:14 +0000 (UTC)
X-User: uhorek
In-Reply-To: <irc15e$a1n$1@news.onet.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 Hamster/2.1.0.11
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit