Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Recommend it - open small window

Quote Reply
Recommend it - open small window
I want to launch small pop-up window when user clicks on recommend this link; however, the id of the link is not being passed...
I am using the following javascript to launch the window...
the url comes like: http: ...../recommend_it.cgi?ID=34 instead of ID=12
what can I do here ... thanks
Mark

Code:
<script language='javascript'>
function recommend()
{
window.open('<%db_cgi_url%>/recommend_it.cgi?ID=<%ID%>','Recommend','scrollbars=no, resizable=no, status=no, menubar=no, location=no, directories=no, width=500, height=500');
}
</script>and this code I put in link.html:<A HREF=javascript:recommend()>Send this Song</A>
Quote Reply
Re: [Mark2] Recommend it - open small window In reply to
If you are using this on a category page then it is probably the ID of the category that is being used. You really need to include the script within the links loop or link.html to get the correct ID:

<a href="javascript:void(0);" onclick="window.open('<%db_cgi_url%>/recommend_it.cgi?ID=<%ID%>','Recommend','scrollbars=no, resizable=no, status=no, menubar=no, location=no, directories=no, width=500, height=500');">Recommend</a>
Quote Reply
Re: [afinlr] Recommend it - open small window In reply to
Well! that worked very well (for single link), thank you...
However, I was trying to send more then one link at a time, so I have a check box next to each link, so that the user can check several links at one time, then click on "recommend links" (at least the titles, the URLs are not importants in my case) and all the links will go in one email, and that it why I am trying to put the script in category.html...
is there any other option...
thank you for your help
Mark