...

View Full Version : Trouble with adding bookmark!



Crash1hd
09-27-2003, 03:29 AM
Ok I am having trouble with the following code if the main page is loaded it works fine but if you goto a another page within the site and click the bookmark button it doesnt work?


<td width="33%"><a href="javascript:if(ie){window.external.AddFavorite(http://www.website.com/Page.asp','<%response.write RS.fields("FNameField") & " "&Flink&" Page"%>')}else{}" title="Click here to bookmark" onClick="Bookmark()" style="text-decoration: none" onMouseOver="window.status='Click here to Bookmark Page'; return true" onMouseOut="window.status=''; return true"><font color="#000000"><%response.write RS.fields("FNameField") & " "&Flink&" Page"%></font></A></td>

How can I make this work on all pages?

liorean
09-27-2003, 09:56 AM
Hmm, it might be the length of the bookmark. Did you know ie6w has a limit at about 530 characters?

me'
09-27-2003, 10:56 AM
You may also need to escape the quotes halfway through the bookmark.

ie:

"AddFavourite('blahblah\"blahblah')"

If you have quotes halfway through the bookmark.

Crash1hd
09-27-2003, 11:38 AM
I think I figured out where the problem is the page that its trying to save is not the same as the page it is on! I have to try it when I get home

Crash1hd
09-27-2003, 09:56 PM
Ok I was wondering is there a way to get the URL of the page that you are on! Useing ASP so for example of the url is www.website.com then it would show that and if the url is www.website.com/here/ it would show that?

me'
09-28-2003, 09:22 AM
I believe window.location does this, you don't need ASP.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum