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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:52:34+00:00 2026-05-30T12:52:34+00:00

how to add onclick=’openLightB(‘remove_ddi’,500);’ in to <a>open</a> with jquery function my present code is

  • 0

how to add onclick='openLightB('remove_ddi',500);' in to <a>open</a> with jquery function

my present code is like this

$(".remove_row").live("click", function(){
  $(".ddi tr:eq(2) td:eq(5) a").replaceWith("<a onclick='openLightB('remove_ddi',500);'>Remove</a>");
});

unfortunately result coming like this

<a remove_ddi',500);'="" onclick="openLightB(">Remove</a>
  • 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-30T12:52:37+00:00Added an answer on May 30, 2026 at 12:52 pm

    How about letting jquery deal with escaping the quotes by using .attr():

    $(".remove_row").live("click", function(){
      $(".ddi tr:eq(2) td:eq(5) a").attr('onclick', "openLightB('remove_ddi',500);");
    });
    

    DEMO


    BTW, .live() is deprecated and could be removed from the library any time in the future. You should consider using .delegate() or .on() for event delegation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code is suppose to add an onClick event to each of the a
I am downloading a file using the code btnDownloadTemplate.Attributes.Add( onClick, window.open('StudyReport/WordReportTemplate.doc', 'OpenTemplate', 'resizable=no,scrollbars=no,toolbar=no,directories=no,status=no,menubar=no,copyhistory=no');return false;
I have an aspx.cs page with the following code: hypPopup.Attributes.Add(onclick, window.open('Popup.aspx', '', 'height=650, width=800,
my client side code button1.Attributes.Add(onclick, javascript:window.open('page1.aspx?CheckedItem= + checkedItem.ToString() + ','mywindow',');); is not executing on
rbnResubmission.Items.FindByValue(Yes).Attributes.Add(onclick, getCheckedRadioFieldResubmission(this)); rbnResubmission.Items.FindByValue(No).Attributes.Add(onclick, getCheckedRadioFieldResubmission(this)); So I have these click events for showing rows in
I have this solution for a single button: myButton.Attributes.Add(onclick, this.disabled=true; + GetPostBackEventReference(myButton).ToString()); Which works
I am trying this in my Form Load Event cmdCancel.Attributes.Add(onClick, document.forms[0].reset();return false;) but it
I have an onclick function that I want to add an anchor to the
The following C#: SelectLink.Attributes.Add(onclick, String.Format(javascript:{0});, this.ClientScript.GetPostBackEventReference(this, ad))); (some omitted for clarity) Appears to generate
I have two attributes I would like to assign to the same event: ddlBuyer.Attributes.Add(onclick,

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.