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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:45:12+00:00 2026-05-15T08:45:12+00:00

I have this hidden link, which is needed for other purposes: <span id=notitle style=display:

  • 0

I have this hidden link, which is needed for other purposes:

<span id="notitle" style="display: none;">
<a href="...Foo" title="Foo" style="..."></a>
</span>

The link is generated dynamically and automatically includes the title attribute. But I’d like to remove the title attribute since the value is copied when the user copy-pastes surrounding text.

I thought of using javascript. This is what I’ve got so far:

<html>
    <head>
        <script type="text/javascript">
          function notitle() {
            var mylist=document.getElementById("notitle")
            var listitems= mylist.getElementsByTagName("a")
            for (i=0; i<listitems.length; i++) {
              listitems.setAttribute("title", "");
            }
      }
        </script>
    </head>

<body onLoad="notitle()">

<p>Before hidden link:
<span id="notitle" style="display: none;">
<a href="#Foo" title="Foo">This Link should have no title attribute</a>
</span>
After hidden link.</p>
</body>
</html>

But doesn’t work. I guess it’s about listitems.setAttribute("title", "");
Any idea? Cheers 🙂

  • 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-15T08:45:12+00:00Added an answer on May 15, 2026 at 8:45 am

    listitems is the collection, so your code is probably throwing an error.

    Anyway, you want:

    listitems[i].setAttribute("title", "");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this peice of coding which simply swaps an image when a link
I have some link elements which are dynamically added and hidden from the page.
I have this code: var $msg = jQuery('<div></div>') .hide() .appendTo(document.body) ; if ($msg.is(:hidden)) {
I have this <%=Model.StartDate%> <%=Html.Hidden(StartDate, Model.StartDate)%> it outputs: 2010-05-11 11:00:00 +01:00 <input type=hidden value=2010-03-17
i have 3 hidden fields in 1 div. when I have reference to this
I have some hidden inputs like this <input name=exam.normals[1].blahblah ..../> I would like somehow
I have this line in a javascript block in a page: res = foo('<%=
I have a text box in a div whose display is none by default
I have a form which is hidden using slideToggle(). What I need to do
This is my code in which I have set the div visibility by default

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.