Cool script-- thank you very much!
My question is, for my application, I would like to be able to have the bookmark refer to a dynamically changed page...
The part of your example that used:
<a href="#"
onmousedown="addBookmark('Williamsons Oldham','http://williamsons-oldham.co.uk/')"><img src="graphics/bookmark.gif" alt="bookmark this page" border=0 /> Bookmark this page</a>
is the part I would like to change. Ideally, I would like to use
...addBookmark('mysite',<? echo 'http://mysite'; ?>)... Of course, this does not work, so is there a way to make something similar work?
Where I used the php echo, I just used echo to simulate a very simple php command.
I am sure this is more-or-less a fundamental javascript/php interaction question, but unfortunately I am very new to javascript.
Thanks!!!