Jonathan Nicholson

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJonathan Nicholson
ToMe
SubjectSave form values script
Date20 February 2006 13:43
Hi

I'm really sorry to trouble you.

I'm just completing [URL] and wish to use your script
"save form values script ". I'm new to web building and this is my first 
large project. I've been at it all weekend and after a 2.30am finish this 
morning I'm feeling very thick and desperate, no matter how I try I can't 
get your script to work. 

I have got another script to work that saves information from text boxes 
just to prove to myself that my machine settings are OK.

Would you kindly help me?

I would like to put your script onto [URL]
so that it automatically loads onload and saves on onunload. 

If you can't assist would you kindly recommend somebody.

Regards

Jonathan
FromMe
ToJonathan Nicholson
SubjectRe: Save form values script
Date20 February 2006 14:26
Jonathan,

> "save form values script "

Your page is trying to load my script from this address:
[URL]
I get a 404 for that. Have you uploaded the script to your server?

Second thing is this weird bit of code:
MM_callJS('saveSelections(document.forms[0])')

Exactly why do you need Macromedia's script to call my script? surely you
can do that yourself ...


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromJonathan Nicholson
ToMe
SubjectRe: Save form values script
Date20 February 2006 15:10
Targuin

Below refers.

Just to prove to myself that it wasn't your script or my computer settings 
that where are fault I used a simple cookie script last thing before I 
disappeared to bed.

Apologies I thought I had deleted off saveRestore.js reference from 
[URL]
MM_callJS('saveSelections(document.forms[0])')refers to saveRestore.js. I 
used dreamweavers insert function to insert into the onLoad event.

I do use saveRestore.js to originate a cookie for a very small form (uses 
text boxes only), this script is uploaded to my server. You can see it 
working at [URL]

Apologies once gain for not clearing the mess from the page, I'll do it to 
night when I get how.

Your JS files should be uploaded ............................. can you 
please help me?

Kind regards,

Jonathan
FromJonathan Nicholson
ToMe
SubjectSave form values script
Date20 February 2006 21:48
I've made some progress!

I have copied the two scripts into two files
[URL]/saveFormValues.js and
[URL]/cookie.js and uploaded. I have referenced in
<head>:

<script src="saveFormValues.js" language="javascript1.2"
type="text/javascript"></script>
<script src="cookie.js" language="javascript1.2"
type="text/javascript"></script>

I would like the cookie to be automatically activated onload and saved on
onunload. I have put the following in the <body>:

<body style="background-color:#FFFFFF"
onload="init();recoverInputs(document.forms.contactform,retrieveCookie('firstfactor'),true);"
onunload="setCookie('firstfactor',getFormString(document.forms.contactform,true));">

The name of my form is "contactform". The name of my cookie is firstfactor.

I have played about with other settings to try and make work, however now
put back. Its beating me.

I have uploaded the latest version of [URL]

What's happening? Page loads OK. Form field elements are retained when
refreshing pages and moving around the site and returning to the page. If I
terminate the session and re-access the site the page doesn't load from the
cookie. Can you please advise where I'm going wrong.
FromJonathan Nicholson
ToMe
SubjectSave form values script - cookie recall problem
Date22 February 2006 23:45
I downloaded your script a few days ago now and I can't get it to work
properly. Apologies but I think its my configuration. I'm really stuck.

My page is [URL]. I have uploaded the two JS
files and referenced them on my page. The script takes the vales and holds
them while I move around the site. However when I terminate the session and
then go back into the site its not recalling the cookie.

Could you please help.

Regards

Jonathan
FromMe
ToJonathan Nicholson
SubjectRe: Save form values script - cookie recall problem
Date24 February 2006 19:59
Jonathan,

> The script takes the vales and holds
> them while I move around the site. However when I terminate the session and
> then go back into the site its not recalling the cookie.

You are only setting a session cookie:
setCookie('firstfactor',getFormString(document.forms.contactform,true));

You need to give it a lifetime (in this example here, one year):
setCookie('firstfactor',getFormString(document.forms.contactform,true),31536000);
FromJonathan Nicholson
ToMe
SubjectRe: Save form values script - cookie recall problem
Date26 February 2006 23:44
Targuin,

Thanks ................ working like a dream.

thank you once again.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.