TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-04-2009, 05:03 PM   #1 (permalink)
The Contributor
 
pipesportugal's Avatar
 
Join Date: May 2008
Location: Oporto-Portugal
Posts: 32
Thanks: 11
pipesportugal is on a distinguished road
Default 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
pipesportugal is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
Should I drop PHP for Java? webosb General 11 04-05-2009 06:58 AM
Tripwire Class (Much like the Java "final" keyword for PHP) Wildhoney Tips & Tricks 6 06-02-2008 07:42 PM
Passing multiple arguments to a function via one variable. delayedinsanity Advanced PHP Programming 10 05-07-2008 05:04 AM
Make Your Own PHP Flash Player Which You Can Pass a File Variable with Preview!!!! thegrayman Tips & Tricks 2 12-12-2007 12:44 AM


All times are GMT. The time now is 10:09 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design