CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Message Box

 



Mike_Aut
newbie

Jul 25, 2001, 3:21 PM

Post #1 of 3 (473 views)
Message Box Can't Post

Hi!

I hope somebody can help me.

After analyzing the data of a form I don't want to create a new html-page.
I just want to show a message box with a message depending on the data.

Is that actually possible?
Is it possible to send the javascript command 'alert()' somehow?

Thanx for your help!

Mike



Pro_4
User

Jul 25, 2001, 6:05 PM

Post #2 of 3 (466 views)
Re: Message Box [In reply to] Can't Post

Well i dont know about alert but one thing you can do is make the submit button have target="_blank" and when they submit a new window pops up and you could print in it like your stuff was submitted or whatever. thats the only way i am aware of.

Hope that helps... :)

@letters = ('A'..'Z', 'a'..'z', '1'..'5', '_');
@i = ( '15', '43', '40');
print @letters [ @i, -1, 55];


etheracide
journeyman

Jul 26, 2001, 8:43 PM

Post #3 of 3 (451 views)
Re: Message Box [In reply to] Can't Post

Well here is a very simple way to try it

add this to your submit input tag:

onClick="alert('YourMessage')";>
where YourMessage is obviously what ever you want to say.

example

<input ="subit" value="Subit!" onClick="alert('Thank you for filling out the form. I appreciate your taking the time to fill this out. You will now be sent back to our main page!')";>

This will open an alert box after the user clicks submit. The user will have to click the "OK" button before the browser will continue.

If you are using a lib.pm or E-mail pm, you can probably set a url to go to after submission. You could put your index.htm(l) and then after the user submits, they will get the alert, then after they click "OK", they will be sent back to the main page.

This is a simple JavaScript. This will work just fine if you are making an HTML file with the form that submits the information to a cgi. But if you are programming the cgi itself to have the form, then make sure you put "\" before quotes if you need them. This can very easily cause lethal errors to your script.

I hope that this will help you. I can try to help you further or implement some other ideas if you need them. But this was as close as I could come to what you asked for off the top of my head. Good luck

Crazy




 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives