🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Przekazywanie zmiennych

#39267
From: maYk
Date: Wed, 29 Mar 2006 16:50
35 lines
1425 bytes
Witajcie,
  jestem poczatkujacym userem javascript i mam pewien problem.
Mam takowa funkcje:

function disp_confirm(nazwa)
{
var name=confirm("Are you sure you want to delete this document?")
if (name==true)
{
document.write(nazwa);
}
else
{
document.write(nazwa);
}


Chcialbym zmienna 'name' wciagnac do kodu php i zamiast powiedzmy 
pierwszego warunku if-a napisac cos takiego:
if (name==true)
{
<?$sql = "select * from tabela where t = name";?>
}

Prosze o porade.

pozdrawiam
Mike



-- 
http://www.earlybss.com

Patent pending. Car patent for sale. Early break signaling system.
Technical Details
Message-ID: <e0edtc$oc0$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: maYk <nospammaykkkdeletenote@gazeta.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Przekazywanie zmiennych
Date: Wed, 29 Mar 2006 11:50:49 -0500
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 35
Message-ID: <e0edtc$oc0$1@inews.gazeta.pl>
NNTP-Posting-Host: 185-194.customer.cloud9.net
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1143651052 24960 168.100.185.194 (29 Mar 2006 16:50:52 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Wed, 29 Mar 2006 16:50:52 +0000 (UTC)
X-User: maykkk
X-Antivirus: avast! (VPS 0613-1, 03/29/2006), Outbound message
X-Antivirus-Status: Clean
User-Agent: Thunderbird 1.5 (Windows/20051201)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit