🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JS w PHP

#50635
From: gerwazy_kr
Date: Sun, 13 Mar 2011 13:58
16 lines
1311 bytes
Witam.

Mam kod php a w nim:

$text = 'Przykladowy tekst do wyswietlenia';

następnie mam:

    echo "\t<script type='text/javascript' >\n\twindow.alert('BLABLABLA');
history.go(-1);
\n\t</script>\n";

W jaki sposób mam to zapisać aby window.alert wyświetlił mi tekst, który mam 
zdefiniowany w $text tzn. jak wstawic do JS $text

Będę wdzięczny za podpowiedzi. 
Technical Details
Message-ID: <iliii3$89b$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "gerwazy_kr" <gerwazy_kr@gazeta.pl>
Newsgroups: pl.comp.lang.javascript
Subject: JS w PHP
Date: Sun, 13 Mar 2011 14:58:24 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 17
Message-ID: <iliii3$89b$1@inews.gazeta.pl>
NNTP-Posting-Host: 89-74-150-119.dynamic.chello.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1300024707 8491 89.74.150.119 (13 Mar 2011 13:58:27 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Sun, 13 Mar 2011 13:58:27 +0000 (UTC)
Importance: Normal
X-Antivirus-Status: Clean
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109
X-Priority: 3
X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109
X-User: gerwazy_kr
X-Antivirus: avast! (VPS 110312-1, 2011-03-12), Outbound message
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit