Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] calling js function from php
- From: asureshkumar_1983 at yahoo.co.in (suresh kumar)
- Subject: [Javascript] calling js function from php
- Date: Mon May 29 10:38:17 2006
i am facing some problems in my project.
1) i want to call a javascript function from php. this is my code.
<script type="text/javascript">
function confirmask()
{
var con=confirm("you are trying to cancel a mirrored display location.Do u want to continue");
if(con==true){
return 1;
}
else if(con==false){
return 0;
}
}
</script>
<?
$res=confirmask();
if($res==1){
$deletelocationresult=mysql_query(" update users set Status='0' where SponsorID='$editlocationid'");
if(mysql_affected_rows($deletelocationresult)):
print "<script type=\"text/javascript\">
alert(\"mirrored display location is deleted successfully\");
location.replace(\"displaylocationprofile.php\");
</script>";
exit();
endif;
}
else {
print "<script type=\"text/javascript\">
location.replace(\"displaylocationprofile.php\");
</script>";
exit();
} ?>
2) how can i assign a javascript variable to php
---------------------------------
How should a woman equip herself to travel safe even when she's unescorted? Share your knowledge with real people on Yahoo! India Answers
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20060529/32f8e1f3/attachment.html
- Follow-Ups:
- [Javascript] calling js function from php
- From: João Cândido de Souza Neto
- [Javascript] calling js function from php
- From: joel.goldstick@xxxxxxxxxxxxxxxxxxxxx
- [Javascript] calling js function from php
- From: Steven Chipman
- [Javascript] calling js function from php
- Prev by Date: [Javascript] Is integer?
- Next by Date: [Javascript] calling js function from php
- Previous by thread: [Javascript] Is integer?
- Next by thread: [Javascript] calling js function from php
- Index(es):