04-04-2009, 05:03 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
|
passing a java variable to php
Hello dear colleagues from the TalkPHP forum,
I often use the "alert" java function in the middle of PHP programs in order to display variables on screen as shown below.
PHP Code:
echo("<script>window.alert('var= ".$var."')</script>");
Now I wanted to use the "confirm" javascript function inside of a "for" cycle, so that if I click the OK the cycle should keep going on otherwise if I would click on the cancel there would be an exit from the "for" cycle (like the php break; function).
PHP Code:
echo("<script>window.confirm('var= ".$var."')</script>");
Can someone tell me how I can achieve this ?
Thanks in advance to all the help,
pipesportugal
|
|
|
|