1. Create a separate class that has your
highlight/unhighlight behavior in it, and extend just the element you want to
highlight with that class… like this (also allows you to easily apply
this behavior elsewhere when you need it in the future):
Object.extend(this.el, Highlig
I have created a _javascript_ object which is initialized for some input fields, fieldsets, and divs on the page. With each object i attach a mouseover and mouseout event that highlights and un-highlights. Also on mouseout i am trying to display the id of the object to a console. The highlighting w
These inconsistencies exist in ALL the browsers... different cases for
each one.
Yea yea yea, I like FF better also, but it has just as many problems. No
one has made a perfect browser yet.
Anyway, I just reverted to using the old event attachment method for
this class, so I could use the INTUITI
Totally disagree. Which is easier?
if (keyThatWasPressed.toLowerCase() == "g") << for your "99%" of
people
or...
if (keyThatWasPressed.toLowerCase() == "g")
{
...Now figure out if shift and/or capslock is down..
}
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTE
Because that's what you get when you produce a product which is a just a
series of dirty hacks added on to the last version. Honestly, I would
bet any money that is the real answer.
-Rob
Ryan Gahl wrote:
This is another case of what we were talking about yesterday. Browser
inconsistencies. Wh
I'd say, returning letters consistently cased makes sense.
element.nodeName is always returned in capital letters for the same
reason - because 99% of the time the case doesn't matter, and you really
don't want to be calling case-conversion functions when you just want to
see if something == a
Hey Jan,You may want to consider JSON. I don't know much about Ruby, but JSON is the simplest format to use if you're just going to be converting the results to JS objects anyway. Regardless of the language you use, you'll have to pick a method for returning the data. There are any number of possib
Cheers, good stuff.
Yeah I had a bit of a debate over the cursor thing. I thought it would
be easy enough for other people to do it so I left it.
Glad you like it. I'll probably submit a finished version on monday. I'm
going to just add an option for "Fixed height" and let people set it if
t
This is another case of what we were
talking about yesterday. Browser inconsistencies. Why would, in the same
browser, attaching an event handler one way give you different results from
attaching it another way?
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Rya
I just had to see this in action so I put up an example of Robin's excellent work here:
http://turnstudio.com/accordian.htmlIt's
butt-ugly but it at least shows the different elements in action.
also, I made the h3 use a link cursor - that's not actually part of the
accordian code.
- DangerOn 3
Yes, prototype handles that (so it does
exist)
Function.prototype.bindAsEventListener
= function(object) {
var __method = this;
return function(event) {
return __method.call(object, event || window.event);
}
}
Now… just attaching the event handler as you suggested
Well, my point was that in IE, the
variable that is passed to the function does not exist, so you need to
reference the global ‘event’ object. Or does prototype handle
that in the bindAsEventListener code already?
What happens if you do this, instead of
the inline handler?
$(‘id’).>
I’ve simplified my example. Changing
“evt” to “event” makes no difference, you can name that
parameter anything you want, it’s just a function argument variable
(which is a reference to the actual event object).
I’m using IE6. I’m
implementing a textbox input masking script in a proto O
Just a random thought, but what if you
change ‘evt’ to ‘event’. Does it work
then? What browser are you testing in, btw? My thought is
based on the fact that event is a global object in IE that gets the last event
triggered. I thought that you had to pass the object in as a parameter i
The above returns “g” when “g”
is pressed and “G” when “G” is pressed.
WHILE…
someClass = Class.create();
someClass.prototype =
{
initialize:
function()
{
Event.observe($(“tb”),
“keypress”, this.showkeyPressed.bindAsEven
On 3/3/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:
> I just set my hightlight colour like so highlightcolor:'transparent'
I tried that and it seemed to work, but Firefox's Javascript console
was spewing a lot of warnings about #NaNNanNan not being a valid color
every time I rolled over an in
Code? Can’t help much without seeing what you’re doing.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Gahl
Sent: Friday, March 03, 2006 1:48
PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs]
event.keyCode broken in prototype?
I
I ran 2 tests. One using proto’s Event.observe, and
another using an in-line handler of the “keydown” event in a
textbox.
Using .bindAsEventListener, the event.keyCode is always
returning a capital letter, no matter what. The in-line event handler returns
lowercase vs. uppercase correct
Ok, while I'm able to drag-and-drop the table rows in the browser, my
callback (onUpdate) function is not being called (nor is the
onComplete function), so the new order isn't being saved in the DB.
Any ideas why this would be happening?
Here's the Rails code:
<%= sortable_element 'item-list-bod
i did it, the problem was i am using
var xml = originalRequest.responseText;
i need to use this
var xml = originalRequest.responseXML;
thx a lotOn 3/3/06, Maninder, Singh <[EMAIL PROTECTED]> wrote:
Make sure the response you are receiving is XML and not Text in case you want to traverse throu
I just set my hightlight colour like so highlightcolor:'transparent'
Best I could figure out.
On 3/3/06, John Beppu <[EMAIL PROTECTED]> wrote:
> Is there a way to disable Ajax.InPlaceEditor's yellow rollover highlight?
> ___
> Rails-spinoffs mailing
Is there a way to disable Ajax.InPlaceEditor's yellow rollover highlight?
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 3/3/06, Maninder, Singh <[EMAIL PROTECTED]> wrote:
Make sure the response you are receiving is XML and not Text in case you want to traverse through XML.Check it by checking the responseHeaders().
how? i put this
function showResponse(originalRequest){
alert(originalRequest.responseHeader
Sorry, it would be unprofessional of me to give my example (as I wrote
this for work), but it's intended to be identical to:
http://openrico.org/rico/demos.page?demo=ricoAccordion.html
..eventually. The only work left to be done is work out whether we wanna
expand the container (#accordion) to
I love real live examples, do you have one ? :)
On 3/3/06, Robin Haswell <[EMAIL PROTECTED]> wrote:
> Oops, should provide an example:
>
>
>
> Heading>
>
> Content geoes here
> Etc..
>
>
Oops, should provide an example:
Heading>
Content geoes here
Etc..
Another heading
Yet more tatsy content
Make sure the response you are receiving is XML and not Text in case you want
to traverse through XML.
Check it by checking the responseHeaders().
Hope this helps!
Thank you,
Mandy.
<>___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails
Hello boys and girls
In the ever-loving spirit of OSS, here's another feature for s.a.u.
In particular it's called Effect.Accordion, and is a scriptaculified
version of openrico's Accordion.
Work in progress, I'll submit further modifications as the come in, but
this is 90% of what needs to be d
Hello there, im having a problem with the xml handling, i want to get
and xml node and put things in an input text but im a little lost, im
using this code, but isn't work, what am i doing wrong?
-
function getXML(){
var url = '';
var myAjax = new Ajax.Re
Sorry, we're using the SVN version of script.aculo.us...which has v1.5pre0 of prototype. Its a new function. Careful when removing the strip() function, it *could* cause themes to break. You can just replace it with a regex to remove whitespace if that's the case.
-JerodOn 3/3/06, Michael Peters <[
You're wrong, I'm afraid. Disabled elements are never sent. I don't
know any browser that does not adhere to this part of the HTML spec
(http://www.w3.org/TR/html4/interact/forms.html, read sections 12 and
13.2). Maybe you are confusing this with fields set to "display:none"
- David
Am 03
> Because that's how form behaviour is defined? I don't know what
browser
> you're using, but anything I've ever seen sends disabled elements
along
> just like every other element.
It's been too long since I looked into it, but either IE or Firefox does
not send disabled elements along. Of course
Because that's how form behaviour is defined? I don't know what browser
you're using, but anything I've ever seen sends disabled elements along
just like every other element.
In my experience the only deviation between a browser's normal behaviour
and the Form.serialize function is the handling of
Hi all,
I'm building an application which uses mostly ajax to update the
sections of the page. Now I've come to some thoughts on how to make the
ajax-handling more efficient / less buggy.
Currently, when the page loads up, I start some "new Ajax.Updater"-stuff
to fill some sections with content f
On 3/3/06, Sean Mountcastle <[EMAIL PROTECTED]> wrote:
> > Could you try to replace :tagname by :tag ?
>
> Thanks Nicolas, that seems to have fixed the tr vs 'tr' issue. The
> version of dragdrop.js I have (from Rails 1.0) has the following
> comment which threw me off:
> tag: 'li',
Does anyone know why Prototype adds disabled fields to the query
string generated by Form.serialize()?
I have looked through the code, there is no way around that, I'll
have to do it by hand.
Nevertheless, I find that behavior a little irritating. Any ideas why
it's implemented like this?
> Could you try to replace :tagname by :tag ?
Thanks Nicolas, that seems to have fixed the tr vs 'tr' issue. The
version of dragdrop.js I have (from Rails 1.0) has the following
comment which threw me off:
tag: 'li', // assumes li children, override with
tag: 'tagname'
It see
On 3/3/06, Sean Mountcastle <[EMAIL PROTECTED]> wrote:
> I'm having some difficulty adding drag-and-drop sorting to my
> application. I'm hoping that someone can help me figure out what I'm
> doing wrong:
>
> #view
>
> ...
>
>
>
> ...
> <%= sortable_element('item-list-body',
>
I'm having some difficulty adding drag-and-drop sorting to my
application. I'm hoping that someone can help me figure out what I'm
doing wrong:
#view
...
...
<%= sortable_element('item-list-body',
:tagname => 'tr',
:url => { :controller => 'Item',
Marco M. Jaeger wrote:
> The dialog script has been updated – thanks to Jerod we were able to add
> themes – please see changelog for further details and fixes.
>
>
>
> The latest version can be downloaded from here:
> http://www.net4visions.com/dev/downloads/dialog.zip
The only problem I ha
40 matches
Mail list logo