close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Javascript error when trying to add ShowIf function

Thread began 5/06/2011 11:07 am by jeremyandrebecca67370 | Last modified 5/16/2011 10:07 am by Jason Byrnes | 2542 views | 9 replies |

jeremyandrebecca67370

Javascript error when trying to add ShowIf function

I just realized I posted this in the "validation toolkit" forum instead of here. However, the issue itself and the steps I have taken to try to resolve it are almost identical to this post:

showthread.php?p=98098#post98098

Here is my post from that forum:

-------------------------------

Helllo! I purchased Forms Toolkit yesterday and am experiencing the same error as the original poster whenever attempting to add a ShowIF behavior. The message I get is "While executing applyServerBehaviour in WAFV_ShowIF.htm, a JavaScript error occurred."

I have attempted all the fixes mentioned previously, including deleting the AppData cache file, uninstalling and reinstalling the Forms Toolkit extension, etc. I have also checked and double-checked all Javascript code. Nothing works.

I have zipped one of the pages which is experiencing the issue. Thanks, in advance, for your assistance.

Jeremy

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

Jason ByrnesWebAssist

the error is caused because you have multiple instances of the Server Validations server behavior. You should only have one instance of the server validations server behavior on the page. The one server behavior can be set to validate all of the form elements.

Select the validation type, click the lightning bolt next to server variable and select the form element, click the plus button to add it, then set up the next form element validation and click the plus button. Repeat those steps for all the form elements.

Sign in to reply to this post

jeremyandrebecca67370

Hi Jason! Thanks for the reply.

I made another attempt at this, (starting from a pre-validation version of the page) being very careful to only have one instance of the Server Validations behavior. Unfortunately, I still get the ShowIf javascript error message. I'm attaching the new page in case you want to take a look at it.

Do you have any other ideas why this error would still be occurring?

Thanks for your assistance.

Jeremy

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

Jason ByrnesWebAssist

If you crate a blank php page and recreate your form with validation, do you get the same error message?

IT could be that one of the included php files on your page is causing a conflict.

Sign in to reply to this post

jeremyandrebecca67370

Great idea! So, as it turns out, I don't get the javascript error when adding the "showIf" behavior to a "blank" PHP page containing only the form. (I've attached that page as "formTest.php".)

However, when I try taking out ALL php and javascript code on my original form page, I continue getting the "showIf" javascript error. I have also attached my "stripped down" communicationForm3.php page.

Everything else on the page is really standard stuff. I can't imagine any of it causing a conflict... but who knows. This is really strange.

Any other ideas? Thanks again!

Jeremy

Attached Files
communicationForm3.zip
formTest.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the difference in the 2 pages is the doctype.


change the doctype from strict to transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Sign in to reply to this post

jeremyandrebecca67370

Aha! We're getting somewhere! :-)

Changing the DOCTYPE eliminated the "showIf" javascript error. Thank you!!!

Now, for some reason, we're getting a ton of PHP errors on the page. You can see them here:

communicationForm3.php

I also get the same PHP errors on the "blank" test page, as well as our original form page. I have uploaded and re-uploaded the files in the "webassist" > "form_validations" folder. So the referenced files are there and in the right location. Are there any other reasons why these PHP errors could be showing up?

Thanks again!

Jeremy

Sign in to reply to this post

Jason ByrnesWebAssist

these errors mean that there is a problem with the hosting server php. ini settings for the session.save_path.


you will need to contact the host to have them correct the session.save_path in the php.ini file.

Sign in to reply to this post

jeremyandrebecca67370

Thanks Jason!

I've got it all working now. In case it helps anyone else, I'll post our solution.

As it turns out, it was easy as creating a folder in the root of the site called "sessiontmp" and adding the following line to the "php5.ini" file (may be "php.ini" for others):

session.save_path = /absolute/path/to/root/sessiontmp

Thankfully, everything is working perfectly now. I really appreciate the assistance in getting our problems resolved. As always, the support and community here is wonderful!

All the best!

Jeremy

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