Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6747093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:24:01+00:00 2026-05-26T12:24:01+00:00

I am having script errors of Error expected ‘)’ in IE when attempting to

  • 0

I am having script errors of “Error expected ‘)'” in IE when attempting to do the following:

alert(<%=SystemConfig.getTranslatedTextByKey(LBIBOConstants.LANG_KEY_MODIFYTIME_ALRTMISSINGA, userLocale)%> + strMessageString + <%=SystemConfig.getTranslatedTextByKey(LBIBOConstants.LANG_KEY_MODIFYTIME_ALRTMISSINGB, userLocale)%>);

I would originally like to just alert with one string added together ahead of time, but I’ved tried that with no luck either.

My guess is you can’t do something like this, but I don’t have many other options (the code was developed by someone else, so I understand there are better alternatives than Scriptlets).

Regardless, these strings returned by JSP expressions are found in a constants.java file, which are in turn loaded from a language package, in case you all were wondering. I have double checked these, and they are just fine.

How can I add these strings together when one value is a var within the page, and the other values are within scriptlet tags? Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:24:02+00:00Added an answer on May 26, 2026 at 12:24 pm

    JSP = server-side

    JavaScript = client-side

    The JavaScript code that the JSP generates must be valid JavaScript code. Look at the generated JavaScript using your browser “View page source” menu item, and fix the JSP code so that it generates valid JavaScript code.

    Exactly how you would do if your JSP generated incorrect HTML code.

    You’re probably missing some quotes. But also make sure that the scriptlet expression don’t return characters that should be JavaScript-escaped. Or use commons-lang StringEscapeUtils.escapeEcmaScript to escape those characters :

    alert('<%= ... %>' + strMessageString + '<%= ... %>');
          ^----------^----------------------^----------^-- quotes!
    

    And the expressions (…) should be your expressions escaped:

    StringEscapeUtils.escapeEcmaScript(yourOriginalExpression)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings everyone. Having an issue compiling my script containing the following function. Three errors
I'm having trouble with this PHP script where I get the error Fatal error
I am having an VB Script. I need to log the error information in
Im having trouble with cygwin not running my script file as expected here is
Having problem understanding Delegate error. Error says expression expected, How do I fix? Thanks
I am using pdb to examine a script having called run -d in an
I am having a PowerShell script which is walking a directory tree, and sometimes
well the thing is i am having a scheduled script that checks some changes
I am encountering an issue where having a ending script tag inside a quoted
I'm trying to determine the best way of having a PHP script determine which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.