I'm making a 'CSS generator'
I have it all done, clicking on the 'Generate Code' button, loads the code into an iframe. Awesome!
But before they generate their code, I'd like them to be able to press a 'Preview' button, which will open a small popup window that shows them the effect of their CSS code, so they can change their settings if they like.
I don't know how to send the $_POST data from the form to this preview page, and still have the Submit (generate code) button there.
Would this require two forms?
preview and submit
Moderator: General Moderators
preview and submit
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- AndrewBacca
- Forum Commoner
- Posts: 62
- Joined: Thu Jan 30, 2003 10:03 am
- Location: Isle of Wight, UK
you could set the submit button to say "preview"
send the action setting to the preview.php
and have the code for previewing it on that page and then have another hidden form with the settings from the form before in and another submit button which goes to a save page
Just an idea but that is what I do when I am checking data sent from forms so it should work
send the action setting to the preview.php
and have the code for previewing it on that page and then have another hidden form with the settings from the form before in and another submit button which goes to a save page
Just an idea but that is what I do when I am checking data sent from forms so it should work
well i wouldn't like to redirect to a preview page, it'd just like to have it open in a popup.
I could do the if($action=="preview") thing..
but I would either have to send the post data to the $action="preview" or $action="generate"
how does this forum do the preview thing before you submit the data?
I could do the if($action=="preview") thing..
but I would either have to send the post data to the $action="preview" or $action="generate"
how does this forum do the preview thing before you submit the data?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- AndrewBacca
- Forum Commoner
- Posts: 62
- Joined: Thu Jan 30, 2003 10:03 am
- Location: Isle of Wight, UK
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Preview on most forums is done via submission to the server so it can process the data correctly to give you accurate data back.
If you want to use a popup like device, I'd suggest using a floating div and XMLHTTP transport, as that will play nicely with popup blockers, since it isn't one, and probably feel pretty neat from a user experience perspective.
If you want to use a popup like device, I'd suggest using a floating div and XMLHTTP transport, as that will play nicely with popup blockers, since it isn't one, and probably feel pretty neat from a user experience perspective.