is it at all possible to have a normal hyperlink inside a supernote? We're using the snb-pinned notedefault supernote load, and in the supernote we have a link for more information (on a different page) as well as a link to a pdf for tips. I've tried adding a target="_blank", but nothing seems to get the hyperlink to work correctly.
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
Hmm! The SuperNote script traps mouse click events in MSIE so it might be interfering with some of the events. I will have a play with it when I get home.
- Angus.
3) AmyGroup: Guests IP: 67.135.--.--
Posted:
Thank you! I've been messing around with using a javascript pop-up script to make the links work, but I'm having a hard time getting the window.open to take the XML URL (I'm pulling data using XML DOM, AJAX-y stuff)... I thought I could be sneaky, but it takes more brain power than I have. :-) I hope there's an easier solution.
4) AmyGroup: Guests IP: 67.135.--.--
Posted:
I think I have an okay solution. I have it built so it only accepts one type of supernote right now, but I believe it would be easy enough to add the others with an "or" statement. I haven't integrated it fully yet, but it uses a popup window function and pulls all the links out of the supernote (except the note-close link). Do you have a better solution? http://www.jocolibrary.org/upload/all/supernoteajax3c.html
The un-incorporated version (just an onload right now, but that'll change): window.onload = function() { if(!document.getElementsByTagName) return false; var linkset = document.getElementById("supernote-note-data"); var links = linkset.getElementsByTagName("a"); for (var i=0; i<links.length; i++) { if (links[i].className != "note-close") { links[i].onclick = function() { popUp(this.getAttribute("href")); return false; } } } }
And the pop-up: function popUp(winURL) { window.open(winURL,"popup","toolbar=0,scrollbars=1,location=0,s tatusbar=0,menubar=0,resizable=1,width=800,height=500"); }
5) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
Great to hear! Sorry, I've been a little busy and didn't manage to fully investigate this, but glad that you fixed it :).