[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread Ken Snyder
[EMAIL PROTECTED] wrote: > Here's a prototype I was working on: > > http://code.markhuot.com/image_trick/ > > So you're saying you want users to see no javascript: 4 drawers with 4 images loaded javascript: 1 drawer with 1 image loaded then load more images as the user scrolls Correct? One wa

[Prototype-core] Re: Event.element() oddity

2007-06-13 Thread Mislav Marohnić
On 6/14/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > event.currentTarget is the element the event was attached to (i.e. > it's equivalent to "this"). > event.target == event.srcElement is the element that triggered the > event. Thanks, thats what I thought. I guess MDC docs confused me by no

[Prototype-core] Re: Event.element() oddity

2007-06-13 Thread Tobie Langel
event.currentTarget is the element the event was attached to (i.e. it's equivalent to "this"). event.target == event.srcElement is the element that triggered the event. So for example: click me $('myUl').observe('click', callback); If I now click on the click me text: event.target should b

[Prototype-core] Re: Event.element() oddity

2007-06-13 Thread Mislav Marohnić
Thanks for the report. This sounds serious enough to open up a ticket, can you do that? While we're at it, does anyone really know the difference between "target" and "currentTarget"? Doesn't one of them correspond to what the "this" keyword references when the event handler is executed? On 6/13

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread [EMAIL PROTECTED]
Here's a prototype I was working on: http://code.markhuot.com/image_trick/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.c

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread Ken Snyder
[EMAIL PROTECTED] wrote: >> A simple unobtrusive approach would be to have a "drawer" of thumbnails >> with a link to view more images. For JavaScript enabled browsers, >> simply override the functionality of that link to load a list of image >> locations from memory or by AJAX. >> > > The on

[Prototype-core] Event.element() oddity

2007-06-13 Thread jdalton
Hi Guys, I was using Event.element(event) in an image onload observer and I noticed that in IE, it would return the Image element while in FireFox it would return a [object HTMLDocument]. I used the guts of the Event.element and changed it to $ (event.currentTarget || event.srcElement) and that

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread [EMAIL PROTECTED]
> A simple unobtrusive approach would be to have a "drawer" of thumbnails > with a link to view more images. For JavaScript enabled browsers, > simply override the functionality of that link to load a list of image > locations from memory or by AJAX. The only problem with that is people without

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread Ken Snyder
[EMAIL PROTECTED] wrote: > Hey guys, > > I'm building a web app and am hoping to minimize the images loaded per > page. I like the way YouTube only loads the thumbnails of the images > you can see and then waits till you scroll before loading any others. > They do this by placing tags for the in

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread [EMAIL PROTECTED]
> You could try having your Javascript modify the URLs of images that you want > to > hold off on loading. Unfortunately i've tried this out and it still loads the original images even though the swapped out image is displayed. I realize this is probably a browser specific thing, and may not be

[Prototype-core] Re: Hijack Browser Loading

2007-06-13 Thread Michael Peters
[EMAIL PROTECTED] wrote: > No matter what I try the images still load. Does anyone know > how to hijack the browser and tell it not to load certain images? I might be wrong, but how a browser parses the HTML, decides what to download and when is all pretty browser specific. You probably can't ch

[Prototype-core] Hijack Browser Loading

2007-06-13 Thread [EMAIL PROTECTED]
Hey guys, I'm building a web app and am hoping to minimize the images loaded per page. I like the way YouTube only loads the thumbnails of the images you can see and then waits till you scroll before loading any others. They do this by placing tags for the initial images and then use javascript

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mislav Marohnić wrote: > $('myIframe').contentDocument.body > That is W3C standard. QED: I'm obsolete. :o) Thanks (again) a million, Mislav. :) - -- Marius Feraru -BEGIN PGP SIGNATURE- iD8DBQFGcA49tZHp/AYZiNkRAm+vAJ9fK/M/toCXmX7p4zuvZgMAVC

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Mislav Marohnić
On 6/13/07, Marius Feraru <[EMAIL PROTECTED]> wrote: > > > Neither Gecko 1.8 nor 1.9 are able to "get the content of #myIframe". $('myIframe').contentDocument.body That is W3C standard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mislav Marohnić wrote: > On 6/13/07, Marius Feraru <[EMAIL PROTECTED]> wrote: >> "IFRAME" !== "FRAME". ;-) > When it comes to scripting, there is no difference that I know of. Hmm, AFAIR there were, at least on Gecko, so I baked a quick test: http:/

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Mislav Marohnić
On 6/13/07, Marius Feraru <[EMAIL PROTECTED]> wrote: > > > "IFRAME" !== "FRAME". ;-) When it comes to scripting, there is no difference that I know of. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Cor

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mislav Marohnić wrote: > On 6/13/07, Marius Feraru <[EMAIL PROTECTED]> wrote: >> [ Seeing you mentioned "myIframe" (+ the reference to a "document" >> property), I'm assuming you're really talking about IFRAMEs, i.e. the HTML >> element ]. > > Marius

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Mislav Marohnić
On 6/13/07, Marius Feraru <[EMAIL PROTECTED]> wrote: > > > [ Seeing you mentioned "myIframe" (+ the reference to a "document" > property), I'm assuming you're really talking about IFRAMEs, i.e. the HTML > element ]. > > Why would anyone expect to be able to reach other folks' documents? ;-) > > It'

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Mislav Marohnić
On 6/13/07, Jostein <[EMAIL PROTECTED]> wrote: > > > One thing that is strange, is that when I try to get elements with > selectors like "table" or ".class1" it works perfectly! It is just the > ids ("#id") that don't work. OK, so here is what you do now. Check out the latest trunk and try with i

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jostein wrote: > I'm trying this (I'm using FF 2 and IE 6): > Element.getElementsBySelector(frames["myIframe"].document, "#id1"); [ Seeing you mentioned "myIframe" (+ the reference to a "document" property), I'm assuming you're really talking about I

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Jostein
On 13 Jun, 13:57, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > Can you try frames["myIframe"].document.body? Thanks, I tried, but it gave the same result. One thing that is strange, is that when I try to get elements with selectors like "table" or ".class1" it works perfectly! It is just the

[Prototype-core] Re: getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Mislav Marohnić
On 6/13/07, Jostein <[EMAIL PROTECTED]> wrote: > > > I'm trying this (I'm using FF 2 and IE 6): > Element.getElementsBySelector(frames["myIframe"].document, "#id1"); Can you try frames["myIframe"].document.body? --~--~-~--~~~---~--~~ You received this message beca

[Prototype-core] getElementsBySelector has different behaviour in 1.5.0 and 1.5.1

2007-06-13 Thread Jostein
Hi. I think there is something buggy somewhere. I'm trying this (I'm using FF 2 and IE 6): Element.getElementsBySelector(frames["myIframe"].document, "#id1"); When I use prototype version 1.5.0 Firefox don't work ("TypeError: element.readAttribute is not a function."), but when I use version 1.5.