[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-28 Thread Matt Foster

 The iframe element doesn't support any events[1].

You can indeed listen to the load event directly from the IFrame
element.
http://pastie.org/493154

 The document that it contains may support various events (such as load, 
 click, etc.).

Why would a document inside an iframe not support these events?


--

http://positionabsolute.net

On May 21, 8:46 pm, RobG rg...@iinet.net.au wrote:
 On May 22, 12:11 am, Walter Lee Davis wa...@wdstudio.com wrote:

  I'd like to see what events are there for the observing, particularly  
  on an iframe.

 The iframe element doesn't support any events[1].  The document that
 it contains may support various events (such as load, click, etc.).

  Is there a general-purpose way (or even some tab of  
  Firebug I haven't seen before) that I can see what events are being  
  fired? Some sort of Event.observe('foo','*'... kind of thing?

 Try Firebug's Profile option.

 1. URL:http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME



 --
 Rob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-26 Thread Matt Foster

I'm pretty sure you can listen to the iframe's load event for that...
I don't think it bubbles so you'll have to listen to it on the iframe
itself and not on a parent.

I use that event extensively in my ajax history solution,
http://positionabsolute.net/blog/2007/07/javascript-history-service.php

--

http://positionabsolute.net

On May 21, 5:39 pm, Walter Lee Davis wa...@wdstudio.com wrote:
 Thanks, it appears that the only way that I'll be able to work around  
 this is with a timed observer pattern, there doesn't seem to be an  
 event fired by an iframe into the page context when its src changes.  
 The underlying problem was how to keep an iframe sized to match its  
 contents. While you get one onload event when the frame finishes  
 loading, no others are ever fired, even when you navigate to a  
 different page within the iframe.

 Walter

 On May 21, 2009, at 5:05 PM, Matt Foster wrote:

  You could find a list of all events and listen to them each, there
  isn't an all operator to listen to any event that is fired as far as
  I know...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-26 Thread Walter Lee Davis

This works fine as long as the iframe stays in the current domain. If  
it strays outside that, you get a permission error. The person who was  
after this wanted an iframe that would expand to hold its contents  
without hiding any of them or displaying scroll bars (not sure why,  
exactly). I've warned them about this issue, and thanks again for your  
help.

Walter

On May 26, 2009, at 1:14 PM, Matt Foster wrote:

 I'm pretty sure you can listen to the iframe's load event for that...
 I don't think it bubbles so you'll have to listen to it on the iframe
 itself and not on a parent.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-21 Thread Matt Foster

You could find a list of all events and listen to them each, there
isn't an all operator to listen to any event that is fired as far as
I know...

function allYourEventAreBelongToUs(e){
console.log(You hit an event %o, e);
}
$w(load unload click dblclick ...).each(function(evenType){
  $(ele).observe(eventType, allYourEventAreBelongToUs);
})

Here is a list I found of most events in JS, just remove the on
obviously for your purposes...
http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.2.3


--

http://positionabsolute.net


On May 21, 10:11 am, Walter Lee Davis wa...@wdstudio.com wrote:
 I'd like to see what events are there for the observing, particularly  
 on an iframe. Is there a general-purpose way (or even some tab of  
 Firebug I haven't seen before) that I can see what events are being  
 fired? Some sort of Event.observe('foo','*'... kind of thing?

 Thanks in advance,

 Walter
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-21 Thread Walter Lee Davis

Thanks, it appears that the only way that I'll be able to work around  
this is with a timed observer pattern, there doesn't seem to be an  
event fired by an iframe into the page context when its src changes.  
The underlying problem was how to keep an iframe sized to match its  
contents. While you get one onload event when the frame finishes  
loading, no others are ever fired, even when you navigate to a  
different page within the iframe.

Walter

On May 21, 2009, at 5:05 PM, Matt Foster wrote:

 You could find a list of all events and listen to them each, there
 isn't an all operator to listen to any event that is fired as far as
 I know...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How can I get a list of events fired by an object?

2009-05-21 Thread RobG



On May 22, 12:11 am, Walter Lee Davis wa...@wdstudio.com wrote:
 I'd like to see what events are there for the observing, particularly  
 on an iframe.

The iframe element doesn't support any events[1].  The document that
it contains may support various events (such as load, click, etc.).

 Is there a general-purpose way (or even some tab of  
 Firebug I haven't seen before) that I can see what events are being  
 fired? Some sort of Event.observe('foo','*'... kind of thing?

Try Firebug's Profile option.

1. URL: http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME



--
Rob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---