Page 1 of 1

Previewing before submitting

Posted: Fri Dec 02, 2005 10:43 pm
by FruitBeard
Script URL: http:www.fgps.com/keith/
Version of script: 1.34 (Modified)
Version of PHP: 5.0.5
Hosting company: N/A
Have you searched THIS FORUM for your problem: N/A
(if not please do before posting)
If so, what terms did you try: N/A

Write your message below:

Hi Guys,

Within my modified version of gbook I am trying to have a preview before submit function.

Not quite sure how to pull the data from the text fields, to display in the preview pane.

It is there on the page and goes through the motions if you wish to see it, gbook can be found under visitors notepad, and the preview link is on the sign area.

Thanks for anything upfront too.

Fruity

Posted: Fri Dec 09, 2005 3:54 pm
by Fruity
Hi,

Have managed to make the majority of previewing before submitting work, just one snag,,

evertything works, images , styled text, email links, http links etc etc

although inserting styled text works properly, when in IE having used the insert styled text option (it retains the data if you do not use styled text) ??? it tends to wipe the page clear of inputted data when returning from previewing, firefox is fine.

Damned annoying.

any input most appreciated, otherwise i shall have to plod along until i get it sorted,

cheers
Fruity

http://www.fgps.com/keith/

Posted: Fri Dec 09, 2005 5:34 pm
by Henrie
Hi Fruity,

I would like to try to help you because i like what you are doing but I have no ideas as of yet.
Maybe if i could see what you have done already i would get an idea. However, i can't see what you do in your FRUITY.php file.

Maybe you can put that code in this forum, or mail the file to me. Than i can play with it a little and maybe get an idea.

Greetings,
Henrie.

Posted: Sat Dec 10, 2005 1:34 pm
by Klemen
Yes, paste the code here let's see. Any demo where we can try?

Posted: Sun Dec 11, 2005 11:00 am
by Fruity
Hi there,

its really quite simple what I actually have done,

I have placed a hidden form using <style="display:none;">
which mimics the normal form and changed the input field names and the form name.

and the Preview button has a onmouseover command calling this function:

function PREVIEW()
{
document.formPREVIEW.PREV1.value=document.form.name.value;
document.formPREVIEW.PREV2.value=document.form.url.value;
document.formPREVIEW.PREV3.value=document.form.email.value;
document.formPREVIEW.PREV4.value=document.form.from.value;
document.formPREVIEW.PREV5.value=document.form.comments.value;
}

the button also sends the data to my file which then simply echoes the values $PREV1 - $PREV5.

I still didnt manage to make the form retain the data having used the new windoiw to insert styled text, even thoiugh it did it, it wiped it upon returning, using onClick="Javascript:history.go(-1);"

but i have now plumped for being able to input the styled text within the same page and all works fine now.

Cheers

Fruity

although please mess around till your hearts content