close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

unterminated parenthetical

Thread began 4/19/2013 9:47 am by chris369732 | Last modified 4/19/2013 11:18 am by chris369732 | 2573 views | 4 replies |

chris369732

unterminated parenthetical

When trying to edit one of my eCart objects, Dreamweaver throws a JavaScript error saying there is an undetermined parenthetical at line 686 of WA eCart Object.js that occurred while executing timer in WA eCart Object.htm. I am able to edit some of my other eCart objects, but this error appears on a few of them. I am not entirely sure why it works for some, but not others. Interestingly, when looking at the file the snippet in which the error occurs is labeled // hypothetically this code is no longer needed. Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

since you don't get the error when editing some eCart objects, i would guess the problem is specify to the way the eCart objects that do have the problem are defined.

can you send a copy of one of the eCart object files that you are getting the error with.

Sign in to reply to this post

chris369732

Thanks. The file is attached.

Sign in to reply to this post

Jason ByrnesWebAssist

your hand coded function to recalcualte the rpice is causing the error.

php:
function ResetCalculations($itmObj)     {

   $itmObj->Cost = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($itmObj->OIDStatusID == 7?(($_SESSION[PUROPOSID] > 2?abs($itmObj->OIDUnitCost):(($itmObj->UPDCQtyBreak2 > 1 AND $itmObj->Quantity >= $itmObj->UPDCQtyBreak2)?$itmObj->UPDCQty2Cost:(($itmObj->UPDCQtyBreak1 > 1 AND $itmObj->Quantity >= $itmObj->UPDCQtyBreak1)?$itmObj->UPDCQty1Cost:$itmObj->UPDCCost)))*-1):($_SESSION[PUROPOSID] > 2?$itmObj->OIDUnitCost:(($itmObj->UPDCQtyBreak2 > 1 AND $itmObj->Quantity >= $itmObj->UPDCQtyBreak2)?$itmObj->UPDCQty2Cost:(($itmObj->UPDCQtyBreak1 > 1 AND $itmObj->Quantity >= $itmObj->UPDCQtyBreak1)?$itmObj->UPDCQty1Cost:$itmObj->UPDCCost))));//c
   switch ($itmObj->OIDPPRate) {
    case 1:
        $itmObj->MPrice = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($_SESSION[OORDSTID] > 1?($itmObj->OIDStatusID == 7?abs($itmObj->Price)*-1:$itmObj->Price):round(($itmObj->Cost * $_SESSION['CustRate1']),2));//c
        break;
    case 2:
        $itmObj->MPrice = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($_SESSION[OORDSTID] > 1?($itmObj->OIDStatusID == 7?abs($itmObj->Price)*-1:$itmObj->Price):round(($itmObj->Cost * $_SESSION['CustRate2']),2));//c
        break;
    case 3:
        $itmObj->MPrice = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($_SESSION[OORDSTID] > 1?($itmObj->OIDStatusID == 7?abs($itmObj->Price)*-1:$itmObj->Price):round(($itmObj->Cost * $_SESSION['CustRate3']),2));//c
        break;
    case 4:
        $itmObj->MPrice = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($_SESSION[OORDSTID] > 1?($itmObj->OIDStatusID == 7?abs($itmObj->Price)*-1:$itmObj->Price):round(($itmObj->Cost * $_SESSION['CustRate4']),2));//c
        break;
    case 5:
        $itmObj->MPrice = (($itmObj->OIDStatusID > 7) AND ($itmObj->OIDStatusID < 10))?0:($_SESSION[OORDSTID] > 1?($itmObj->OIDStatusID == 7?abs($itmObj->Price)*-1:$itmObj->Price):round(($itmObj->Cost * $_SESSION['CustRate5']),2));//c
        break;
}



this code has many syntax errors such as this session referance:
$_SESSION[OORDSTID]

the session name should include single quotes:
$_SESSION['OORDSTID']

Sign in to reply to this post

chris369732

Thank you, I am picking up where someone else had left off on this project, and I did not know about the extent of the changes that had been made. I will try to fix that function, and update you if the error persists.

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