SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    0 Post(s)
    0 Thread(s)

    Making the "title" of a link the same as the text of the link?

    Hi Everyone:

    I am trying to get the title attribute of a link to be the same as the visible text of the link. That is, I want the little pop up that occurs when you hover your mouse over the link to read the same as what users would see in the menu.
    The menu is written by Javascript, so there is no way to just put a title attribute on each link. Here is the code:
    // "For" loop which creates all of the inline JavaScript anchor tags
    	for (var i = 1; i <= iNumMarkers; i++) {
    		sTempString = sTempString + "  <li><A HREF=\"javascript:parent.seekToMarker(";
    		sTempString = sTempString + i + ")\"title=\"Click the Link You Would like to Listen To.\">&nbsp;";
    		sTempString = sTempString + document.MediaPlayer1.GetMarkerName(i);
    		sTempString = sTempString + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A></li><BR>"
    The code reads the Marker name from a separate file and places it into an I-Frame. I got the I-frame working ok, as well as the links. The links in the Iframe though need to have a title that is the same as the link. I hope that makes sense. If not ask and I'll try to clarify. I have attached the actual page if you need to see more code.
    Attached Files Attached Files


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts