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 6722071
In Process

The Archive Base Latest Questions

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

Per this similar post , I tried the following but none-worked, with error noted

  • 0

Per this similar post, I tried the following but none-worked, with error noted to side:

onclick="alert('This is my  \"quoted text:\"');"   (no browser response)

onclick="alert('This is my  \\"quoted text:\\"');  (no browser response) 

onclick="alert('This is my  "quoted text:"');"  (comes out as: This is my  "quoted text:")

onclick="alert('This is my  \x22quoted text:\x22');"  (grails .gsp page preprocessor chokes on this)

Any ideas, other than putting the alert into a function? I imagine there is a way to do this in html/javascript?

NOTE: I updated the title to qualify the question for using Grails. All the solutions below may well work in general, but not in grails 1.3.7. What did work, per MaxArt’s direction, is adding an additional backslash before each backslash, in version 4 above.

  • 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-26T09:24:15+00:00Added an answer on May 26, 2026 at 9:24 am

    The last form is the correct one. I don’t know how Grails handles that, but you may try to escape the backslashes.

    You can always resolve to (and it’s actually a better practice) attach an event listener to the element rather than using the traditional event declaration. This should be executed after the body has loaded:

    document.getElementById("alerter").addEventListener("click", function() {alert('This is my "quoted text"');}, false);
    

    Of course, use attachEvent for Internet Explorer < 9.

    And this should be your element:

    <span id="alerter">Quoted text</span>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is somewhat related to a similar post , but that post was Visual
I need to have a single instance application (as per this answer ), but
I've worked with Git to accomplish this before, but require Mercurial for another project.
I have a question similar to this but in the context of L2S. I
This is similar to my previous question, but that solution did not solve this
I've similar requirement as posted in this Question. How to open IE with post
So facebook just implemented this per-app post privacy setting for all applications as announced
My question is similar to this one but for Mercurial (converting using cvs2hg ).
Per this helpful article I have confirmed I have a connection pool leak in
Per this question (see comments near the bottom), I was wondering if anyone knows

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.