[Javascript] Code optimization

Troy III Ajnej trojani2000 at hotmail.com
Mon Aug 14 20:57:54 CDT 2006


Pardon me asking, but what UA are you targeting with your aplication?


>Thanks to John Warner the cursor should be fixed. I was able to do it in CSS.
 
No doubt about that, but "cursor: hand" will only do it in Explorer.
 
>>But two "onclick" events? You don't need that!
>Well... I do. Here is what I want to have happen.
>
>Click on Text - Select/Deselect
>Double click - Select single, Deselect everything else
>Click on Icon - Do content specific stuff (i.e. Folder will go to the folder, TXT will open editor in popup, 
>IMG will open uploader, etc...)
 
Well, that's again one single event per element.
So what does the Icon dblclick do?
>I have the click events working :) , but....  now I need to figure out how to put the icon before the text. 
>Any ideas on how I might do that.
I first need to see how are you putting your icons currently.
Seen it, its:
 o.insertBefore(newimg);
 
Try:
var filelist = o.parentNode//you can drop this line in IEfilelist.insertBefore(newimg, o)
 
This should do it, [!but only in case "o" is what I think it is!]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                         Troy III                           progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060815/62391569/attachment.htm>


More information about the Javascript mailing list