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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:19:06+00:00 2026-06-04T12:19:06+00:00

I am trying to add a click event to a link in SharePoint. The

  • 0

I am trying to add a click event to a link in SharePoint.
The current href set by SharePoint is href="javascript:ClickOnce()".
If I add the following code:

var saveNclose = document.getElementById("diidIOSaveItem");
saveNclose.href = "javascript:JSEPreSaveAction()";
alert(saveNclose.href);

The alert outputs the href I am trying to get, which is javascript:PreSaveAction() but when I look at it in the page it is still ClickOnce().

Why is the alert telling me the href is one thing and the source code and behavior says is another? Is there something causing SharePoints script to take priority over mine?

  • 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-04T12:19:07+00:00Added an answer on June 4, 2026 at 12:19 pm

    I was able to do this by adding a timer to add PreSaveAction() to the button 10 seconds after the page had finished loading.

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

Sidebar

Related Questions

I'm trying to add an function to an a click event to my code.
I am trying to add click event to one of the widgets that use
i am trying to add class on on-click jquery event for that i am
I am trying to add a click event on the element that is return
I am trying to add a class and remove the on click event for
Im trying to add click events to shapes within a visio file.. I have
I'm trying to add in a double click on a node in the force
I'm trying to add a $('body').live('click') listener after the user clicks on a div.
i'm trying to add readonly to all the inputs and then on the click
I'm trying to add the System.ServiceModel reference on my CLR project. When I click

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.