Forums
This topic is locked
create a preview site with UD
Posted 18 Jan 2002 13:23:28
1
has voted
18 Jan 2002 13:23:28 Thorsten Röver posted:
Does anyone now to create a preview site after filling out a form? Do I have to filter? Iyes, how? Do I have to set session? What is important to do?Replies
Replied 18 Jan 2002 21:24:03
18 Jan 2002 21:24:03 Bruno Mairlot replied:
Do you mean something like the preview window in UDzone ?
If yes, then, you don't really have to care about so much things.
There is a lot of way to do preview, but, generally they all check if the user wants to preview the page or save their information.
UDzone does it that way : There is two different buttons at the bottom of the form. Depending on which button the user click on, the site preview the page or insert a record in the database.
Don't forget that in both case, the FORM is posted to the page you want.
You could set up a Javascript that would change the form action if clicked on the "Preview" button, or set it to the insert page.
As well, you could change the value of a hidden tag that would telle the page if it should be rendered in a preview or not.
But normally, you shouldn't care about session, it won't help you very much.
--- Better to die trying, than never try at all ---
If yes, then, you don't really have to care about so much things.
There is a lot of way to do preview, but, generally they all check if the user wants to preview the page or save their information.
UDzone does it that way : There is two different buttons at the bottom of the form. Depending on which button the user click on, the site preview the page or insert a record in the database.
Don't forget that in both case, the FORM is posted to the page you want.
You could set up a Javascript that would change the form action if clicked on the "Preview" button, or set it to the insert page.
As well, you could change the value of a hidden tag that would telle the page if it should be rendered in a preview or not.
But normally, you shouldn't care about session, it won't help you very much.
--- Better to die trying, than never try at all ---
Replied 19 Jan 2002 08:43:58
19 Jan 2002 08:43:58 Thorsten Roever replied:
Yes, I mean the preview like in udzone. Your ideas are pretty good, but because I am still new to php, I think it will be a trouble for me to <ul><li>setting a javascript for switching the formaction</li><li>set the right orders to both pages</li></ul>What would the formaction be? "preview.php" and method "get"? And what do I have to do at the preview.php? How do I have to filter there? What would be the right server behavior to post the preview? "Go to detail page"? Of course the preview data should not be saved in db - only the "insert" should do that later on. Many questions as you can see. Always the same, if you are new to something <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
I hope, you can help me with some more instructions or maybe a bit code in order to see how you did the thing. That would be nice and maybe interesting for others here at udzone in the future, too.
I hope, you can help me with some more instructions or maybe a bit code in order to see how you did the thing. That would be nice and maybe interesting for others here at udzone in the future, too.