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

Javascript errors

Thread began 10/13/2014 1:24 am by Lee Firth | Last modified 10/27/2014 11:50 am by Jason Byrnes | 919 views | 7 replies |

Lee Firth

Javascript errors

I am trying to setup PayPal Payments Pro on zebraprintersonline.com.au but am having a few issues with JavaScript errors. The shopping cart when it loads throws the following errors in the JavaScript Console:

Resource interpreted as Script but transferred with MIME type text/html: "http://zebraprintersonline.com.au/products/shopping-cart/WA_eCart/js/eC_Display.js". (index):288
Uncaught SyntaxError: Unexpected token < eC_Display.js:1

When I go to the checkout page I get these errors in the console:

Resource interpreted as Script but transferred with MIME type text/html: "http://zebraprintersonline.com.au/webassist/ecart/checkout/js/paymentoptions.js". checkout.php:1211
Uncaught SyntaxError: Unexpected token < paymentoptions.js:1
Uncaught TypeError: undefined is not a function common.js:3(anonymous function) common.js:3n jquery-1.7.1.min.js: 2o.fireWith jquery-1.7.1.min.js:2e.extend.ready jquery-1.7.1.min.js:2c.addEventListener.B jquery-1.7.1.min.js:2

Clicking on the Payment Options radio buttons adds the following error to the mix:

Uncaught ReferenceError: wa_paymentChanged is not defined checkout.php:247 onclick

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Lee Firth

See PM

Sign in to reply to this post

Jason ByrnesWebAssist

you have conflicting versions of jquery on the pages.

<script src="/js/bootstrap/jquery.js"></script>
<script src="/js/jquery-ui-1.8.16.custom.min.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>


The query scripts can only be added once to the page.

Sign in to reply to this post

Lee Firth

I've removed the duplicate jquery includes but I still get javascript errors.

Sign in to reply to this post

Jason ByrnesWebAssist

Something in your htaccess file is preventing access to the cart scripts

try to go to:
http://zebraprintersonline.com.au/webassist/ecart/checkout/js/paymentoptions.js

and it opens the confirm page.

if i rename the htaccess file then it works correctly.

With the htaccess file renamed, the cart and the confirm page do not show the errors

Sign in to reply to this post

Lee Firth

Thanks Jason the issue was with two rewrite rules after I commented them out and changed the links sitewide it fixed the issues:

# RewriteRule products/shopping-cart/ cart.php
# RewriteRule checkout/ checkout.php

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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