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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:48:32+00:00 2026-06-12T13:48:32+00:00

I have the below element on my web page: <a target=_blank href=http://www.fxs.dev/quote/quote.aspx onclick=javascript:window.location=’http://www.fxs.dev/quote/quote.aspx?partnumber=526-NTE3031′; return=

  • 0

I have the below element on my web page:

<a target="_blank" href="http://www.fxs.dev/quote/quote.aspx" onclick="javascript:window.location='http://www.fxs.dev/quote/quote.aspx?partnumber=526-NTE3031';" return="" false;="">Request Delivery Quote</a>

I would like to try and add querystrings to the ‘url’ in the “onclick” attribute of the element.
Is there a jquery function that allows me to do edit just the “URL” part of the onclick event. Or do i just have to write my own custom function to strip and edit the onclick event code?

Thanks in advance for your help 🙂

  • 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-12T13:48:34+00:00Added an answer on June 12, 2026 at 1:48 pm

    Strictly speaking, the onclick attribute contains a string that’s interpreted as Javascript code. I’m aware of only two things you can do with this; execute it as Javascript, or edit is as a String. The latter would mean you would have to strip the url from it and edit it manually, I’m afraid.

    I don’t quite see the reason to having a window.location= call as the only thing in the onclick of an anchor tag.. wouldn’t that be what the href attribute is for? That’s also much easier to edit with jQuery, using .attr('href','http://example.com');

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

Sidebar

Related Questions

I have below html code in my aspx. <input type=hidden id=medicalLink value='<a href=/forms/contactus.aspx >Contact
I have a SELECT element in a web page, and I'd like it to
I have the jQuery below http://jsfiddle.net/XMdYw/7/ var elements = ''; var ELEMENT_COUNT_PER_PAGE = 301;
I have below structure <div class=mybox> <div id=imageslide> <a href=><img src=url /></a> </div> </div>
I have below code: <a href=# id=@item.Id name=vote ><img src=/Content/images/021.png style=float:left alt= /></a> which
I have a web form on my web page. Before the user leaves the
There are many input radio elements on a web page and each radio element
We have an single-page web app that displays emails. Some of the emails we're
I have created a web page which will add an Indian rupee symbol to
I have a div container on my web page with fixed width and it

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.