Page 1 of 1
Previewing input in browser
Posted: Tue Oct 07, 2003 12:46 pm
by niekerk
Hi everyone,
I am trying to implement a function similar to the Preview button we have on the "post new topic" page of this forum whereby data entered by user can be previewed (on the same page) before submitting.
Any suggestions are welcome!
Thanks
Niekerk
Posted: Tue Oct 07, 2003 2:02 pm
by mudkicker
or using the
switch function

Posted: Tue Oct 07, 2003 2:47 pm
by evilMind
switch isn't a *function* it's a control structure.
switch ( $variable) {}
or
switch ( $variable ):
....
endswitch;
Posted: Tue Oct 07, 2003 3:23 pm
by mudkicker
ooops!

sorry for wrong word to explain

but i think everybody understand what i meant.
Posted: Tue Oct 07, 2003 3:29 pm
by niekerk
Thanks to all the contributors to this thread so far.
What i am trying to do is to pass the text entered into the textarea to a script that formats the text (i have this script) and then displays it with a chance for the user to edit or submit
Posted: Tue Oct 07, 2003 4:03 pm
by mrvanjohnson
Depending on the implmentation, I usually send people to a "confirm" page. They submit the data, go to a confirm page and see the data formatted as it will be durning the output and then confirms that entry or edits it. This also gives me level one of data validation to make sure they inputed all the correct data. Edit takes them back to the form with the fields populated with their information. Confirmig the page sends it back through data validation then INSERTs or UPDATEs the database. Simple and works well. Requires an extra click or two but no real additional typing.