Create a preview button on a form?
Posted: Fri Oct 06, 2006 12:40 pm
I want a popup to appear showing a preview of the data so the user can see how it will be formatted when posted. Then they can just close that window and hit post to actualy send it to the DB, however I cant figure it out for the life of me.
I basicly want to pass the $_POST value for the textarea into a new window so I can echo it onto the popup window, without actualy sending the page to the DB using the submit button.
Current form code:
I googled the heck out of this, found nothing useful.
Thanks
-Steve
I basicly want to pass the $_POST value for the textarea into a new window so I can echo it onto the popup window, without actualy sending the page to the DB using the submit button.
Current form code:
Code: Select all
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
<center><p><input type="hidden" name="action" value="sign" />
<textarea cols="60" rows="5" name="onwall" style="font-size: 12px; font-family: Georgia;" onKeyDown="limitText(this.form.onwall,this.form.countdown,255);"
onKeyUp="limitText(this.form.onwall,this.form.countdown,255);"></textarea></p>
<p><font size="1">(Maximum characters: 255)<br>You have <input readonly type="text" name="countdown" size="3" value="255" style="background-color: #d8dfea; color: #000000; border-top: 1px solid #d8dfea; border-left: 1px solid #d8dfea; border-right: 1px solid #d8dfea; border-bottom: 1px solid #d8dfea;"> characters left.</font></p>
<input type="submit" name="submit" value="Post" style="color: #FFFFFF; background-color: #3b5998;"></center>
</form>Thanks
-Steve