close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

I could not find this error in the forum: Expected ";"

Thread began 4/01/2011 7:05 am by info72555 | Last modified 4/05/2011 7:37 am by Jason Byrnes | 3675 views | 9 replies |

info72555

I could not find this error in the forum: Expected ";"

The form is working fine but there is an error in the code of every form (but different place) I am editing -> Error: Expected ";"
Using Windows XP Pro, DWCS4, Form Builder 2

I have deleted the Cache, deleted all custom presets, un- and re-installed a few times - same result. When I create a form based on a preset provided with FB, no error appears but as soon as I edit the form it slips in. I am not a programmer and spent about 4 hours trying to get it to work without showing the error. The good part is that the form is sending the message - the bad part is that the error suggests I don't know what I am doing :o(

Example:
ContactUs.php

Thank you

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

Jason ByrnesWebAssist

when it shows the error, does it give a line number?

I dont see the error occurring so can t really investigate the cause.

Sign in to reply to this post

info72555

I could not find this error in the forum: Expected ";"

Hi Jason,

I thought the best way to address it would be to show you a Live example, the reason I attached the link for you. In IE the yellow error icon shows in the status bar at the bottom right after the page has finished loading. When you double click on it you get the details.

In this case the error suggests:
Line 234
Char 12
Error: Expected ';'
Code 0

I get the Expected ';' in every form I am creating....

Hope this helps.

PS: I just noticed the error shows up only about 90% of the time. Please refresh the page if you don't see it.

Sign in to reply to this post

Jason ByrnesWebAssist

It wasn't clear from the initial post that this was a javascript error. but now i see it.


the error is caused by these two lines:
var Member Inquiry__1_Spry = new Spry.Widget.ValidationCheckbox("Member Inquiry__1_Spry", { isRequired:false , validateOn:["blur"]});
var Questions or Comments_Spry = new Spry.Widget.ValidationTextarea("Questions or Comments_Spry", { minChars:1, maxChars:300, isRequired:false , validateOn:["blur"]});


the reason it is happening is that you are using spaces in the form element names. Spaces are not permitted in form element names.

when naming the form elements either conform to the camelCase naming convention or use the underscore (_) in place of spaces.

Sign in to reply to this post

info72555

THANK YOU!! :o)

I feel really silly now - seems I should have known better.

Thanks Jason!!

Sign in to reply to this post

Jason ByrnesWebAssist

no worries.

Sign in to reply to this post

info72555

Removing the spaces did not resolve the error...

Hi Jason,

I just removed the spaces and I still get the same error as before but now it's in line 233. Similar to before, the error does not show up all the time so please reload the page if you do not see it: ContactUs.php

I had been hoping it was due to the spaces... what else did I miss?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

these two lines are left behind referancing the old form elements with spaces in the names:
var Member Inquiry__1_Spry = new Spry.Widget.ValidationCheckbox("Member Inquiry__1_Spry", { isRequired:false , validateOn:["blur"]});
var Questions or Comments_Spry = new Spry.Widget.ValidationTextarea("Questions or Comments_Spry", { minChars:1, maxChars:300, isRequired:false , validateOn:["blur"]});


delete them.

Sign in to reply to this post

info72555

You fixed it! :o)

I am really glad Webassist has great customer support - thank you Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

Glad to hear it is working.

Sign in to reply to this post
loading

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...