A quick question about event management. I have a button that toggles
a style field on certain elements between two different values and
here's the code that I use:
function firstFunction(event) {
$$(div[class='content']).invoke(setStyle,{height:50px});
$$(input[value='height
Good points.
1. In a couple of places you're duplicating work, searching the DOM
again for something you already have (such as when unhooking the old
handler and hooking the new one)
2. It seems a bit odd that secondFunction is inside firstFunction, but
it's not a big deal.
3. The code is
I've a little web app that loads and unloads pages with script tags in
them and even though I pass evalJS: false to the Ajax.Request I
still get an error message that says
pq is not defined
http://localhost/test/javascript/prototype.js
Line 605
return this.extractScripts()...
How can I prevent
://api.prototypejs.org/dom/element/update/
[4]http://api.prototypejs.org/language/string/prototype/stripscripts/
HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / comwww.crowdersoftware.com
On May 18, 5:35 am, orbiter dkarapet...@gmail.com wrote:
I've a little web
Usually the API documentation is really good because it clearly states
all the inputs along with their types and the outputs along with their
types but the documentation for the Selector object is a little
sparse. More specifically the documentation for
Selector.findChildElements does not make it
I looked at the code and it seems that readAttribute has some extra
plumbing for IE but other than that it works basically as you would
expect.
On May 19, 5:16 pm, patrick patrick99...@gmail.com wrote:
Hi,
I was looking over the API docs, and saw readAttribute, and thought to
myself: I have
` is documented. I'd
probably stick to the higher-level interfaces -- `$$`,
`Element#select`, `Element#down`, etc.
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / comwww.crowdersoftware.com
On May 20, 6:56 am, orbiter dkarapet...@gmail.com wrote:
Usually the API
I recently discovered Element.store and Element.retrieve and I'm
wondering a little about the semantics. Mainly I'm interested in the
following use case: If I store some data and then delete the object on
which I stored the data from the DOM tree what happens to the stored
data? Do I need to worry
I can think of a way of doing what you asked with some event
management. The events I would mess with to get things to work would
be mousedown, mouseup, mouseover, and mouseout.
On May 21, 12:27 pm, thegdog theg...@gmail.com wrote:
Should have mentioned that I am using Prototype version 1.6.0.2.
, 7:35 am, orbiter dkarapet...@gmail.com wrote:
I have a button with an onclick callback that creates a closure and
uses Element.observe to clear the old callback and set the closure as
the new one. Here's the pseudo code:
button onclick='original_handler.bind(this)(event)'button/button
return false didn't work but the timeout method did. Thanks for the
help.
On Jul 18, 9:38 am, orbiter dkarapet...@gmail.com wrote:
Thanks, that explains a lot. I do most of my coding on firefox and
chrome and IE always throws me for a loop. I'll go with return false
and let you know how
setTimeout trick accomplishes.
On Jul 18, 10:11 am, T.J. Crowder t...@crowdersoftware.com wrote:
No worries. I'm not entirely surprised return false didn't work. Did
you try Event.stop(event)? I'd give it no more than 50/50 odds...
-- T.J. :-)
On Jul 18, 5:45 pm, orbiter dkarapet...@gmail.com wrote
12 matches
Mail list logo