- Create Account

Check for Null ?

Forums > SuperNote > Check for Null ?
Author
Message

1) yfki Group: Guests
IP: 69.143.--.--
I have managed to use supernote as part of a MS .hta
After tweaking the regex a bit, the only real tweak I had to do was a check for null here:

if (srcElm  != null){
if (srcElm.nodeType != 1)  srcElm = srcElm.parentNode;
}


I am not the JS master, and my understanding of how Supernote works is mediocre , I cant seem to tell if will have any noticable adverse effects. I seems as if it shouldnt matter since the srcElm would essentially be changing as the mouse moves anyways? Either way supernote is great!!


2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Odd -- srcElm should never be null! No harm done with your tweak anyway. Glad you like the script!

Cheers - Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.