Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding output of a script to a link

Status
Not open for further replies.

PRoss

Programmer
Sep 26, 2005
3
US
I have a link to a callender and I want that link to be like <A href="Month> so it'll default down to the current month's events. I already have a script that gives me the month, but the problem is that the link is inside a frammed page and there seems to be no way that can incorperate where the target is when (in the script) I do "document.write(TEXT.link(URL))" where the URL is what I want the link to be.

Any help?
 
Code:
<html>
 <head>
  <script>
   var currMonth = getCurrentMonth();
   function setMonthLink(){
    document.getElementById("calendarlink").href = "[URL unfurl="true"]http://blahblah.com/blah/calendar.html#"[/URL] + currMonth;
   }
  </script>
 </head>
 <body onload="setMonthLink()">
  <a id="calendarlink" href="[URL unfurl="true"]http://blahblah.com/blah/calendar.html#January">Calendar</a>[/URL]
 </body>
</html>

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top