close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Inserting ANY jQuery on a page is causing conflicts with WebAssist jQuery Validation?

Thread began 5/23/2014 6:26 am by Nathon Jones Web Design | Last modified 5/23/2014 6:40 am by Jason Byrnes | 752 views | 1 replies |

Nathon Jones Web Design

Inserting ANY jQuery on a page is causing conflicts with WebAssist jQuery Validation?

I have this at the bottom of my product detail page (http://www.ledwarehouseuk.com/LED-Lights-Bulbs.php?lbid=689):

<script>
var LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Serene",
pointedAt: "middle",
fieldOffset: 0,
fieldMargin: 0,
position: "middle",
direction: "middle",
border: 0,
offset: 0,
closeText: "?",
percentWidth: 100,
orientation: "left",
};
function LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Validate() {
$("#LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>").h5Validate(LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts);
}
$(document).ready(function () {
LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Validate()
ConvertServerErrors(LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts);
});
</script>
<script>
var LEDCart_1_ATC_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Serene",
pointedAt: "middle",
fieldOffset: 0,
fieldMargin: 0,
position: "middle",
direction: "middle",
border: 0,
offset: 0,
closeText: "?",
percentWidth: 100,
orientation: "left",
};
function LEDCart_1_ATC_Validate() {
$("#LEDCart_1_ATC").h5Validate(LEDCart_1_ATC_Opts);
}
$(document).ready(function () {
LEDCart_1_ATC_Validate()
ConvertServerErrors(LEDCart_1_ATC_Opts);
});
</script>

I've been trying to add in a jQuery Dialog via the DW Insert > jQuery UI > Dialog option but when I do this it immediately flags a syntax error in the above code which it changes to:

<script>
var LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Serene",
pointedAt: "middle",
fieldOffset: 0,
fieldMargin: 0,
position: "middle",
direction: "middle",
border: 0,
offset: 0,
closeText: "?",
percentWidth: 100,
orientation: "left",
};
function LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Validate() {
$("#LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>").h5Validate(LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts);
}
$(document).ready(function () {
LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Validate()
ConvertServerErrors(LEDCart_1_ATC_<?php echo $row_rsPROD["LEDid"]; ?>_Opts);
});
</script>
<script>
var LEDCart_1_ATC_Opts = {
focusout: true,
focusin: false,
change: false,
keyup: false,
popupClass: "Serene",
pointedAt: "middle",
fieldOffset: 0,
fieldMargin: 0,
position: "middle",
direction: "middle",
border: 0,
offset: 0,
closeText: "?",
percentWidth: 100,
orientation: "left",
};
function LEDCart_1_ATC_Validate() {
$("#LEDCart_1_ATC").h5Validate(LEDCart_1_ATC_Opts);
}
$(document).ready(function () {
LEDCart_1_ATC_Validate()
ConvertServerErrors(LEDCart_1_ATC_Opts);
});
$(function() {
$( "#Dialog1" ).dialog();
});
</script>

It is the final }); that is being highlighted as the syntax error.
Hope you can help.
Thank you
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

That syntax looks correct. I copied it to a new document and DW is not highlighting a syntax error on my page.


Sometimes DW will highlight a syntax error when there is none, and it wont go away till you toggle from code view to design and back again, or in some cases, close and re open the page.

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