close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Framework Theme Body Tag

Thread began 3/01/2013 7:30 am by Cologne | Last modified 3/01/2013 6:01 pm by Cologne | 700 views | 2 replies |

Cologne

Framework Theme Body Tag

Hi,
I am using a Frameowk Theme. Now I want to use the the Cookie Behavior to store my from.
But I cant use the BODY tag in the page I created from the Theme?
How can I use the onload Cookie in the body tag?
Cheers,
Denis

Sign in to reply to this post

Jason ByrnesWebAssist

select the form tag and apply the behavior to the onchange event of the form tag, then cut the code from the onchange event that is generated and paste it to a new script tag at the end of the page:

so you will have the form tag with the onchange to set the form from the cookies:
<form ...... onchange="<set form from cookie code>"


copy the code from the onchange event to a new script tag:

<script type="text/javascript">
<set form from cookie code>
</script>

This will execute the code when the page is loaded.

Sign in to reply to this post

Cologne

Hi Jason,

I think I am doing something wrong :-)

register.php

Attached is the register file

Maybe you can take a look.

Denis

Attached Files
register.zip
Sign in to reply to this post

Jason ByrnesWebAssist

your page should have the following code in the head:

<script src="../webassist/cookies/cookies.js"></script>
<script type="text/javascript">
function WA_getFormCookie(cookieObj, formObj, cookieName) {
cookieFormFromString(cookieObj,formObj,cookieName);
}
</script>
Sign in to reply to this post

Cologne

Hi Jason,
so this is the code I should put at the end in the post before?

<script type="text/javascript">
function WA_getFormCookie(cookieObj, formObj, cookieName) {
cookieFormFromString(cookieObj,formObj,cookieName);
}
</script>



Why is the code

<script src="../webassist/cookies/cookies.js"></script>


not set automatic? Even if I use normal pages it wont be in the code?

It only was written when I used the Show Cookie on Page behavior.

So I give it a try...
Cheers
Denis

Sign in to reply to this post

Jason ByrnesWebAssist

you need both pieces of code, in the head of the document.

I logged a bug for the script not being added.

Sign in to reply to this post

Cologne

ok I think I got it.

in the head

<script src="../webassist/cookies/cookies.js"></script>
<script type="text/javascript">
function WA_getFormCookie(cookieObj, formObj, cookieName) {
cookieFormFromString(cookieObj,formObj,cookieName);
}
</script>
<script type="text/javascript">
function WA_setFormCookie(cookieObj, formObj, cookieName, expdays) {
if (expdays) {
cookieObj.expires = daysToExpire(expdays);
}
else {
cookieObj.expires = "";
}
cookieFormToString(cookieObj,formObj,cookieName);
}
</script>



Link to the script, Function Get the Cookie, Function Set the Cookie

in the Form onSubmit store the form

<form action="" method="post" name="formRegister" id="formRegister" onSubmit="WA_setFormCookie(WA_CookieObj,document.formRegister,'WAFC_register_formRegister', 1)">



at the end of the form to set the form

<script type="text/javascript">
WA_getFormCookie(WA_CookieObj,document.formRegister,'WAFC_register_formRegister');
</script>



Why are the functions and the link to the script not set automatic?

Cheers,
Denis

Sign in to reply to this post

Cologne

Hi Jason,

works now.

Thanks a lot for helping!

Denis

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...