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

  • SEARCH
  • Home
  • 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 6062587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:04:09+00:00 2026-05-23T09:04:09+00:00

Often times, when I use struts 2 tags, the loading of a page will

  • 0

Often times, when I use struts 2 tags, the loading of a page will be incomplete apparently because of single quote or double quote characters from the struts 2 tag interfering with such characters from javascript.

One example I am very eager to get working is as follows:

 var me = '<s:a href=\'http://www.google.com\'>Google Link</s:a>';
 $('#appnSelect').html(me);

So what I am concerned about is when single and double quotes are inside that me string on the right side of line 1. Ultimately, I need to get <s:select> to work, but this problem seems to creep in with a number of tags like the above example. Replace the <s:a> tag with an <a> tag, and voila, it works. However, when the <s:a> tag gets expanded, the page will incompletely load.

Is there an easy solution somewhere I am missing? One thing I did try was with the theme attribute setting theme=”simple” because sometimes that helps me when the output gets rendered incorrectly. That did not work in this case.

  • 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-23T09:04:10+00:00Added an answer on May 23, 2026 at 9:04 am

    Generating HTML from tags like that in the middle of a JavaScript string constant is always going to be an ugly business. In addition to quote characters, you’re also likely to get newlines. Strictly speaking you don’t know what you’re going to get, and you can’t control it.

    One thing that comes to mind is that you could drop the tags into dummy <script> blocks marked as a non-JavaScript type:

    <script id='anAnchor' type='text/html'>
      <s:a href='http://www.google.com'>Google Link</s:a>
    </script>
    

    The browser won’t try to execute that. You can then do this in your JavaScript code:

    $('#appnSelect').html($('#anAnchor').html());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I often use to memorize all matrixes in a single vector, because my book
I use a binary library that crashes quite often. When it does, some times
When writing a T-SQL script that I plan on re-running, often times I use
I have a page with textboxes and buttons. When the page loads, often times,
There are often times when you know for a fact that your loop will
Often, when searching for answers, I have found that certain websites will allow you
Often, when restarting Django runserver, if I use the same port number, I get
Often we have to use some of the methods which don't return anything useful.
I often times have the need to import 3D points (x,y,z data) into the
For example, I often use this: [self performSelector:@selector(doSomethingAfterDelay:) withObject:someObject afterDelay:someDelay]; Now, lets say I

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.