PDA

View Full Version : help with a variable in a html link



the albatross
Feb 20th, 2006, 12:50 PM
Hi,
I am trying to load the src of this iframe as a link to a variable anchor within the src.
The anchors are 0 to 11 depending on the month and I am setting the month variable thus

today = new Date()

var month = today.getMonth()


what i need is how to write link to the anchor

src="diary.htm# ---what do i put here to call the 'month' variable? ---"

This is how i call the frame with the #0 refering to january

<iframe WIDTH="320" HEIGHT="375" MARGINWIDTH="1" MARGINHEIGHT="1" FRAMEBORDER="NO" STYLE="border:5px ridge #0066FF; " name="I1" align="right" src="diary.htm#0"></iframe>

The whole thing is a diary frame within a page which should show the current month

For you info I am not a programmer just a tinkerer trying to make a website for a local group
Thanks in advance for any help

the albatross
Feb 23rd, 2006, 01:32 PM
i take it that this is not possible or is too difficult, thanks anyway