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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:58:53+00:00 2026-06-12T20:58:53+00:00

I am trying to put a text (containing a hyperlink) using the click function

  • 0

I am trying to put a text (containing a hyperlink) using the click function in jQuery.

var publicationsText = "Rohit. <a href=\"http://www.google.com\" onmouseover=\"this.style.color=#EC4D48;\" onmouseout=\"this.style.color=#666;\" style=\"color:#666;\">Emerging Energy</a>";

    $('#publicationsID').click(function(){ 
      $("#homepage").html(publicationsText);
      return false;
    });

This works fine as intended on my local box. But when I publish this on Google sites, the HTML produced is:

<div id="container-caja-guest-0___">
<div id="homepage-caja-guest-0___">
Rohit.<a target="_blank" style="color: #666">Emerging Energy</a>
</div>
</div>

And the hyperlink is automatically removed.

Can any one please suggest a workaround that works on the Google sites?

Moreover the site is available at: http://www.wattalyst.org (and you can see the problem in Contact/Publications page)

Thanks!

  • 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-06-12T20:58:54+00:00Added an answer on June 12, 2026 at 8:58 pm

    Your string is incorrectly formatted. You need to escape the quotes and merge the lines

    var publicationsText = "Rohit. <a href=\"http://www.google.com\" "+
        " onmouseover=\"this.style.color=#EC4D48;\" onmouseout=\"this.style.color=#666;\" "+ 
        " style=\"color:#666;\">Emerging Energy</a>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to put some text inside an input, tried this: $(#someText).click(function () {
I'm trying to put row header text based on a converter function of the
I'm trying to convert text containing URL's into HTML anchors using Visual Basic in
I am trying to parse text using pyparsing. My function is shown below. Firstly,
I'm trying to put text in to a vertical histogram using the length of
I'm trying to put together a Multilingual Text Calculator using just plain Javascript (not
I was trying to put text in front of an image and what happened
I am trying to put full text search working on SQL Server 2008, however
I am trying to add and image and then put some text(title) on the
Working in Eclipse, I am trying to put some italics text onto a layout.

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.