Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey guys, just had a quick question about something, if it was possible.

I have this div:

HTML
<div id="signup-response"></div>


And i wanted to know if it was possible to convert that into an alert function? Basically, once sign-up-response is activated, it'll show up as an alert.

Something like alert('#signup-response, MESSAGE'); or something.
Posted
Comments
[no name] 12-Jan-15 0:57am    
asically, once sign-up-response is activated, it'll show up as an alert.
What does activatedmean here??
[no name] 12-Jan-15 0:59am    
I didn't mean "activate". But this is a validated form with PHP & Javascript. Once the user has submitted info, it shows the responses via the signup-response, but I want to change that div to an alert. Is it possible?
Sergey Alexandrovich Kryukov 12-Jan-15 1:02am    
What does it mean, "convert div into a function"? What function, where it should be declared, what the idea? What you show is not a function, it's a function call. So far, I cannot see how it can make any sense.
—SA
JR009 12-Jan-15 4:52am    
You mean to say that, you need a customized alert box with message, right?

If I understand you correctly, you are trying to display the response from server-side script in the form of alert box. then try this (place it in the server-side script):
VB
<?php
    echo '<script>alert("this is the response msg.");</script>'
?>
 
Share this answer
 
Hi,

If you want to display a div as alert box then try the following link :
http://jsfiddle.net/JRD06/pg9u181r/[^]

and customize 'popup' div css and html markup as your requirement.

thank you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900