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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:52:53+00:00 2026-06-03T23:52:53+00:00

I am having library in SharePoiint 2010 and also Document Library. I have placed

  • 0

I am having library in SharePoiint 2010 and also Document Library. I have placed a view of the document library in a web part. There is a link to “add new document” that I want change with JQuery;

$("#idHomePageNewAnnouncement").attr('href','google.com');

and it works if I check it afterwards in a alert()

alert($('#idHomePageNewAnnouncement').attr('href'));   // gives google.com

but if I hoover it or open it in a new window a prefix is added with the site URL; it will give http:// sitename/webname/subsite/google.com.

How can I get rid of this prefix in the link?

I don’t have access to SharePoint Designer or Visual Studio in this project.

  • 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-03T23:52:55+00:00Added an answer on June 3, 2026 at 11:52 pm

    href attributes are either relative (not starting with “http://” or similar) or absolute. Since your link is relative, the browser is going to look for a file called “google.com” in the current directory. Try this instead:

    $("#idHomePageNewAnnouncement").attr('href','http://google.com');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a new problem with the Zend Gdata library where I am
I'm having a class library which is getting referenced in a web application. This
Having issues using cURL on windows vista. The library is there and showing with
I have a document library with a workflow that dynamicly sets user permissions to
I have a 32 bit .NET class library having a simple public class and
Having a look at this code http://msdn.microsoft.com/en-us/library/ee862406%28VS.85%29.aspx It says Add the Microsoft.GroupPolicy.Management assembly to
I've been trying to compile glut as a static library without having to link
Having referenced: Microsoft Office 14.0 Object Library in a C# project. Is it possible
I am having difficulty using a thirdparty library registration function to register a callback.
I am having trouble getting the ODP.NEt library to work with the .NET DBProviderFactories.

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.