Message box

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to do something like bringing up a message box in Java where after  
clicking OK the box disappears and processing continues.

How do I do this in PHP?

I want the processing after the message box to be conditional upon what was  
used to bring up the particular message box.  (I have been handling  
something like this so far by having inline messages and reposting the  


Re: Message box

Quoted text here. Click to load it

A thought occurred to me on how to solve this right after I posted.

I will have a header to a page which is the message box with a target of  
"_blank".  In the original page it will not be followed by exit() but will  
have another header to either repost or go somewhere else.  That one will  
have an exit() after it.  This might work, but how can I then lock the  
original page until the message one disappears?

I will try this.


Re: Message box

Shelly wrote:
Quoted text here. Click to load it

Hmm.. What do you mean by bringing up a message box? If I understand  
correctly, you are talking about Java applets, but those run on the  
client side so, the system takes care of message processing. PHP script  
runs on the server side, there is no way to bring up a message box on  
the client machine from within PHP script.

If you want to do something, then ask something of user, and proceed  
depending on what the response was, one way to do that would be to have  
a script:

1. do something
2. check if response ready
2.1 if ready, goto wherever based on response
2.2 if not, proceed
3. send a page back that contains a form and a javascript that pops up a  
message box
4. when the user answers, javascript populates the form with the  
response and submits form
5. back to 1.

It's like a login page :)
2. check if login submitted
2.1 if login ok, redirect somewhere
2.2 otherwise, proceed
3. output login form


Re: Message box

You can probably do this with Javascript. Your problem is not described
specific enough for me to say how to solve it in Javascript exactly,
but I think it is possible.

Site Timeline