[Proto-Scripty] DataGrid

2009-07-17 Thread nirbhab

http://is.gd/1zDvC have a flexible datagrid...but sorting issue is
there.

--~--~-~--~~~---~--~~
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] Mimicking a jQuery accordion using the same markup

2009-07-17 Thread MikeeBee

Hi all, what I assume to be a bit of a tricky one here!

I made a jQuery accordion using this code and markup

//HTML

FAQ Example

Lorem ipsum dolor sit amet, consectetur adipisicing elit
   
  Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum, Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur.
   
Lorem ipsum dolor sit amet, consectetur adipisicing elit
   
  Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum, Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur.
   


//JQUERY


$(document).ready(function() {

  // below used for faq show/hide use definition list
  $('dl.faq > dd').hide();
  $('dl.faq > dt').click(function() {
$(this).next('dd').slideToggle('fast')
.siblings('dd:visible').slideUp('fast');
  });
});



All great, however on another part of the site the page contents are
brought in to an area where prototype is being used with no option of
accessing jquery.

So basically is there any way of producing a similar effect with the
same markup but using prototype? Animation is not totally necessary
but I would like it if possible.

Thanks everyone.

--~--~-~--~~~---~--~~
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: checked !status in line 1496? (prototype-1.6.1.RC3)

2009-07-17 Thread dmitrymos

Alex, what does success() return if getStatus() returns 0 in case of
error?

Looks like success() returns TRUE all the time as foolged said.

On Jul 16, 7:37 am, "Alex McAuley" 
wrote:
> as it states...
>
> Return !status (NOT STATUS) || (OR) status greater than or equal to 200
> (TRUE|FALSE) && status LESS THAN 300
>
> as i said again it returns a true false
>
>
>
> - Original Message -
> From: "foolged" 
> To: "Prototype & script.aculo.us" 
> Sent: Thursday, July 16, 2009 10:42 AM
> Subject: [Proto-Scripty] Re: checked !status in line 1496?
>
> (prototype-1.6.1.RC3)
>
> > Hi All
> > You do not understand my question.
> > I asked, not what is returned.
> > I asked what is checked! status?
>
> > IMHO rightly so.
> > return (status> = 200 & & status <300);

--~--~-~--~~~---~--~~
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: IE8 invalid argument line 4501

2009-07-17 Thread breed...@gmail.com

Hi to evebody!

I'm getting the same error! Maybe you know the reason or how to fix
it But i guess it's a big of RC3.

Regards,
Dmitry

--~--~-~--~~~---~--~~
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] What is this.initialize.apply(this, arguments);

2009-07-17 Thread damerub

Could someone explain what the following line does?

this.initialize.apply(this, arguments);


I know how 'apply' works, but I cannot understand why 'this' is used
twice here? both 'this' refer to the same object (current object).
then why not just call this.initialize(arguments)?.  What's the
difference here?


THANKS IN ADVANCE!

Lin




--~--~-~--~~~---~--~~
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] problems with observe mouseover and mouseout

2009-07-17 Thread Dennis Schmidt

Hello everyone.

I've basically got this HTML code:


  
some content
some more content
some actions
  


and this JS code:

$$(".superlist li").invoke("observe", "mouseover", function(event) {
alert(event.element().inspect().escapeHTML());
});

So now the thing is, that the event.element() method does NOT (as I
would expect) return the  element, but any of the nested elements
instead. Which might be a  or a .

That results in two problems for me:
1. I want to toggle the visibility of li.actions for the li hovered.
It shall become visible on mouseover and unvisible on mouseout. That
doesn't work since anytime I move over one of the li's nested
elements, the mouse-events get triggered. Although (from my point of
view) I'm never leaving that element, since they are indeed children
of the li.

2. (similar to the first one) I do always need to know which li
element was hovered (so that I can determine which .actions div shall
be toggled but don't know any good way to achieve this.

I've run through similar problems like this several times but could
never find a good solution.
Hope anyone here can help me out :-)

--~--~-~--~~~---~--~~
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] parameter null in struts action class

2009-07-17 Thread abinawale

Java Script function with prototype in it:
-
function strutsProtScriptAjaxLogin(){

 //  Gets form value with id password
 var password = $F('password');

// longinFormDiv is my div id
new Ajax.Updater('loginFormDiv','/abinWebProject/strutsProtScript.do?
password=' + password, {
method:'get',
onFailure: function(){
$('loginFormDiv').update('An error occurred.');
},
onSuccess: function(response) {
$('loginFormDiv').value = response.responseText;
$('loginFormDiv').update( response.status );
}
});

--> That password value is showing null in my Struts Action Class...
--> I tried both :

1.  new Ajax.Updater('loginFormDiv','/abinWebProject/
strutsProtScript.do?password=' + password
 like shown above ( it doesn't have keyword parameter)

and ,

2
var password = 'password=' + $F('password');
new Ajax.Updater('loginFormDiv','/abinWebProject/
strutsProtScript.do
 
 parameters: password,
 .

But I could not get those values in struts action class...

password = (String) request.getAttribute("password");

it gives null to me..


Any suggestion, corrections and opinions will be greatly appreciated.


Thanks,
Abin Awale

--~--~-~--~~~---~--~~
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] Effect.SlideDown('') trouble in IE

2009-07-17 Thread talkingAnimals

Everything works great in Firefox and Safari, but when it comes to
internet explorer it's a bust! The bottom left says there's an error
on the page, and when the link is clicked, the page just jumps to the
top.

This is the code I use in the page:
Read
More About Aama

The page is here:
http://www.forthenext7generations.com/grandmothers.php

I'm new to javascript and I'm not even sure where to begin fixing
this, any help would be much appreciated!

--~--~-~--~~~---~--~~
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: What is this.initialize.apply(this, arguments);

2009-07-17 Thread T.J. Crowder

Hi Lin,

this.initialize(arguments) would call the initialize method and pass
in an array of arguments as the first and only parameter to the
function. (Well, on many browsers 'arguments' isn't quite a real
array, but very similar to one.)  this.initialize.apply(this,
arguments) calls the initialize method passing it the set of arguments
in the 'arguments' array as *individual* arguments.

So:

* * * *

var a = [1, 2, 3];

this.function(a);
// => Passes the function a single argument that's an array, [1,2,3]

this.function.apply(this, a);
// => Passes the function three individual arguments 1, 2, and 3

* * * *

You have to use the second 'this' because the JavaScript apply
function requires the context (the value to use for "this" during the
call) as the first argument, and then the arguments array as the
second argument.  (It needs this for a good reason -- it doesn't have
access to the value otherwise, because of the way "this" works in
JavaScript.)

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jul 16, 6:21 pm, damerub  wrote:
> Could someone explain what the following line does?
>
> this.initialize.apply(this, arguments);
>
> I know how 'apply' works, but I cannot understand why 'this' is used
> twice here? both 'this' refer to the same object (current object).
> then why not just call this.initialize(arguments)?.  What's the
> difference here?
>
> THANKS IN ADVANCE!
>
> Lin
--~--~-~--~~~---~--~~
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: Effect.SlideDown('') trouble in IE

2009-07-17 Thread T.J. Crowder

Hi,

Effect.SlideDown is a constructor, that might be the problem.  Put
"new" in front of it as you see in the examples on the script.aculo.us
website.  I don't know that's it, but it could be.

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jul 17, 2:22 am, talkingAnimals  wrote:
> Everything works great in Firefox and Safari, but when it comes to
> internet explorer it's a bust! The bottom left says there's an error
> on the page, and when the link is clicked, the page just jumps to the
> top.
>
> This is the code I use in the page:
> Read
> More About Aama
>
> The page is here:http://www.forthenext7generations.com/grandmothers.php
>
> I'm new to javascript and I'm not even sure where to begin fixing
> this, any help would be much appreciated!
--~--~-~--~~~---~--~~
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: problems with observe mouseover and mouseout

2009-07-17 Thread David Behler

Try this:
http://www.prototypejs.org/api/event/findElement

$$(".superlist li").invoke("observe", "mouseover", function(event) {
alert(|Event.findElement(event, 'li')|.inspect().escapeHTML()
|);
|});

That should return the li element instead of a div.

David



> Hello everyone.
>
> I've basically got this HTML code:
>
> 
>   
> some content
> some more content
> some actions
>   
> 
>
> and this JS code:
>
> $$(".superlist li").invoke("observe", "mouseover", function(event) {
> alert(event.element().inspect().escapeHTML());
> });
>
> So now the thing is, that the event.element() method does NOT (as I
> would expect) return the  element, but any of the nested elements
> instead. Which might be a  or a  class="content">.
>
> That results in two problems for me:
> 1. I want to toggle the visibility of li.actions for the li hovered.
> It shall become visible on mouseover and unvisible on mouseout. That
> doesn't work since anytime I move over one of the li's nested
> elements, the mouse-events get triggered. Although (from my point of
> view) I'm never leaving that element, since they are indeed children
> of the li.
>
> 2. (similar to the first one) I do always need to know which li
> element was hovered (so that I can determine which .actions div shall
> be toggled but don't know any good way to achieve this.
>
> I've run through similar problems like this several times but could
> never find a good solution.
> Hope anyone here can help me out :-)
>
> >
>
>   


--~--~-~--~~~---~--~~
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: DataGrid

2009-07-17 Thread Alex McAuley

Nice data grid! ... what about inline editing of the cells ? .. i cant get 
it to work on firefox in your demo
- Original Message - 
From: "nirbhab" 
To: "Prototype & script.aculo.us" 
Sent: Thursday, July 16, 2009 7:32 AM
Subject: [Proto-Scripty] DataGrid


>
> http://is.gd/1zDvC have a flexible datagrid...but sorting issue is
> there.
>
> >
> 


--~--~-~--~~~---~--~~
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: checked !status in line 1496? (prototype-1.6.1.RC3)

2009-07-17 Thread Alex McAuley

What about status's that are zero ? (some browsers report 0 as offline 
server)

..

Thats why its in there



- Original Message - 
From: "dmitrymos" 
To: "Prototype & script.aculo.us" 
Sent: Thursday, July 16, 2009 1:52 PM
Subject: [Proto-Scripty] Re: checked !status in line 1496? 
(prototype-1.6.1.RC3)



Alex, what does success() return if getStatus() returns 0 in case of
error?

Looks like success() returns TRUE all the time as foolged said.

On Jul 16, 7:37 am, "Alex McAuley" 
wrote:
> as it states...
>
> Return !status (NOT STATUS) || (OR) status greater than or equal to 200
> (TRUE|FALSE) && status LESS THAN 300
>
> as i said again it returns a true false
>
>
>
> - Original Message -
> From: "foolged" 
> To: "Prototype & script.aculo.us" 
> 
> Sent: Thursday, July 16, 2009 10:42 AM
> Subject: [Proto-Scripty] Re: checked !status in line 1496?
>
> (prototype-1.6.1.RC3)
>
> > Hi All
> > You do not understand my question.
> > I asked, not what is returned.
> > I asked what is checked! status?
>
> > IMHO rightly so.
> > return (status> = 200 & & status <300);




--~--~-~--~~~---~--~~
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: checked !status in line 1496? (prototype-1.6.1.RC3)

2009-07-17 Thread T.J. Crowder

> Looks like success() returns TRUE all the time as foolged said.

Yes, if getStatus returns 0 (either because the HTTP status code
really came back from the browser as 0, or because the browser didn't
supply one at all), then success will return true.  This has been
noted before.[1][2]

I'd love to hear from one of the core devs (NOT just someone active on
this list like myself) *why* zero is considered success, because it
doesn't make sense to me.  The server being offline is certainly not a
successful outcome.  Most of the contributors to Prototype are not
dumb, it's there for a reason, I just want to know what the reason is
since they didn't feel it deserved a comment in the source.

[1] http://proto-scripty.wikidot.com/prototype:how-to-bulletproof-ajax-requests
[2] 
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/6d1d9fc7aa1e927a
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jul 16, 1:52 pm, dmitrymos  wrote:
> Alex, what does success() return if getStatus() returns 0 in case of
> error?
>
> Looks like success() returns TRUE all the time as foolged said.
>
> On Jul 16, 7:37 am, "Alex McAuley" 
> wrote:
>
>
>
> > as it states...
>
> > Return !status (NOT STATUS) || (OR) status greater than or equal to 200
> > (TRUE|FALSE) && status LESS THAN 300
>
> > as i said again it returns a true false
>
> > - Original Message -
> > From: "foolged" 
> > To: "Prototype & script.aculo.us" 
> > Sent: Thursday, July 16, 2009 10:42 AM
> > Subject: [Proto-Scripty] Re: checked !status in line 1496?
>
> > (prototype-1.6.1.RC3)
>
> > > Hi All
> > > You do not understand my question.
> > > I asked, not what is returned.
> > > I asked what is checked! status?
>
> > > IMHO rightly so.
> > > return (status> = 200 & & status <300);
--~--~-~--~~~---~--~~
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: MySQL - order ID

2009-07-17 Thread WLQ

So many non related posts here, so I've thought of throwing in one
too. It's about the script you gave me.
Now I've tried to manipulate it as far as I could, but still could't
get the results I was waiting for. Because you know it better and
really I have no idea in how to accomplish it, for a long  time
thinking about trying everything, I thought you could help me a
little.

http://pastie.org/549275
--~--~-~--~~~---~--~~
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] Effect.Highlight Breaks CSS Hover

2009-07-17 Thread Nicholas Van Weerdenburg
Hi,
I found this ticket
http://dev.rubyonrails.org/ticket/6134

but the problem still exists.  No matter what I do, Effect.Highlight
pollutes the DOM by changing the element background color, breaking css
:hover and other style rules due to the element rule css precedence

Anyone know of a workaround? I tried :restorecolor=>"" but that doesn't
work. Calls to set the background color to "" fail, I think due to the
timing of the hightlight.

Thanks,
Nick

--~--~-~--~~~---~--~~
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: Effect.Highlight Breaks CSS Hover

2009-07-17 Thread T.J. Crowder

Hi,

Yeah, bit of a pain that there's no standard way to _remove_ a style
from the style property entirely.  Setting things to "" is not the
same thing.

However:  Effects offer beforeStart and afterFinish callbacks, and the
style property has this nifty cssText property on it, which suggests
this should work around the problem (and may be a way forward for an
eventual scripty fix):

$('target').highlight({
beforeStart: function(effect) {
effect.saveStyle = effect.element.style.cssText;
},
afterFinish: function(effect) {
effect.element.style.cssText = effect.saveStyle;
}
});

cssText is fairly widely supported, I believe, even IE6 had it (not
that :hover works with IE6, except on links).  In fact, Prototype's
setStyle uses it if you pass in a string (an undocumented feature;
docs say it has to be an object, so it may not get unit tested).

HTH,

On Jul 17, 2:33 pm, Nicholas Van Weerdenburg 
wrote:
> Hi,
> I found this tickethttp://dev.rubyonrails.org/ticket/6134
>
> but the problem still exists.  No matter what I do, Effect.Highlight
> pollutes the DOM by changing the element background color, breaking css
> :hover and other style rules due to the element rule css precedence
>
> Anyone know of a workaround? I tried :restorecolor=>"" but that doesn't
> work. Calls to set the background color to "" fail, I think due to the
> timing of the hightlight.
>
> Thanks,
> Nick
--~--~-~--~~~---~--~~
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: DataGrid

2009-07-17 Thread Matt Foster

That is nice, you should submit it to http://scipteka.com


--

http://positionabsolute.net

On Jul 17, 4:14 am, "Alex McAuley" 
wrote:
> Nice data grid! ... what about inline editing of the cells ? .. i cant get
> it to work on firefox in your demo
>
> - Original Message -
> From: "nirbhab" 
> To: "Prototype & script.aculo.us" 
> Sent: Thursday, July 16, 2009 7:32 AM
> Subject: [Proto-Scripty] DataGrid
>
> >http://is.gd/1zDvChave a flexible datagrid...but sorting issue is
> > there.
--~--~-~--~~~---~--~~
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: Effect.Highlight Breaks CSS Hover

2009-07-17 Thread Tobie Langel

cssText works in all supported browsers and is of course fully unit
tested.

Best,

Tobie

On Jul 17, 4:42 pm, "T.J. Crowder"  wrote:
> Hi,
>
> Yeah, bit of a pain that there's no standard way to _remove_ a style
> from the style property entirely.  Setting things to "" is not the
> same thing.
>
> However:  Effects offer beforeStart and afterFinish callbacks, and the
> style property has this nifty cssText property on it, which suggests
> this should work around the problem (and may be a way forward for an
> eventual scripty fix):
>
>     $('target').highlight({
>         beforeStart: function(effect) {
>             effect.saveStyle = effect.element.style.cssText;
>         },
>         afterFinish: function(effect) {
>             effect.element.style.cssText = effect.saveStyle;
>         }
>     });
>
> cssText is fairly widely supported, I believe, even IE6 had it (not
> that :hover works with IE6, except on links).  In fact, Prototype's
> setStyle uses it if you pass in a string (an undocumented feature;
> docs say it has to be an object, so it may not get unit tested).
>
> HTH,
>
> On Jul 17, 2:33 pm, Nicholas Van Weerdenburg 
> wrote:
>
>
>
> > Hi,
> > I found this tickethttp://dev.rubyonrails.org/ticket/6134
>
> > but the problem still exists.  No matter what I do, Effect.Highlight
> > pollutes the DOM by changing the element background color, breaking css
> > :hover and other style rules due to the element rule css precedence
>
> > Anyone know of a workaround? I tried :restorecolor=>"" but that doesn't
> > work. Calls to set the background color to "" fail, I think due to the
> > timing of the hightlight.
>
> > Thanks,
> > Nick
--~--~-~--~~~---~--~~
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: Unresponsive script

2009-07-17 Thread T.J. Crowder

Hi,

That's not nearly enough information to work with.  For instance
(picking at random), what version of Prototype are you using?  The
line number is not useful information without knowing what file it
refers to.  811 isn't a particularly significant line in either the
latest stable (1.6.0.3) or the latest beta (1.6.1 RC3).

Generally speaking, you'll get that warning from browsers if you have
a loop that takes a long time to complete.  For instance, something
like this will cause it on IE6 and probably later versions (untested):

var i, e;
for (i = 0; i < 10; ++i) {
e = document.createElement('p');
p.innerHTML = "Line " + i;
document.body.appendChild(e);
}

You get the idea.  If you have to do something really long, break it
up and yield execution periodically (untested):

function addLotsOfParagraphs(index, limit) {
var e;

e = document.createElement('p');
p.innerHTML = "Line " + i;
document.body.appendChild(e);
++index;
if (index < limit) {
arguments.callee.defer(index, limit);
}
}
addLotsOfParagraphs(0, 10);

Or it could be that you have an infinite loop somewhere, or that
you've tricked Prototype into having one.  Without more information,
no saying what's going on...

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jul 17, 4:59 pm, usha  wrote:
> Hi
>
> I am sometimes getting this warning :
>
> " A script on this page may be busy, or it may have stopped
> responding.You can stop the script now, or you can continue to see if
> the script will complete.
> .../prototype.js:811"
>
> I wanted to know how to avoid this warning .
>
> thanks
--~--~-~--~~~---~--~~
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: DataGrid

2009-07-17 Thread Douglas

Cannot see the 'edit' attr working too. Very nice grid though.

Thanks.

On Fri, Jul 17, 2009 at 5:14 AM, Alex
McAuley wrote:
>
> Nice data grid! ... what about inline editing of the cells ? .. i cant get
> it to work on firefox in your demo
> - Original Message -
> From: "nirbhab" 
> To: "Prototype & script.aculo.us" 
> Sent: Thursday, July 16, 2009 7:32 AM
> Subject: [Proto-Scripty] DataGrid
>
>
>>
>> http://is.gd/1zDvC have a flexible datagrid...but sorting issue is
>> there.
>>
>> >
>>
>
>
> >
>



-- 
Believe nothing, no matter where you read it, or who said it, no
matter if I have said it, unless it agrees with your own reason and
your own common sense.

--~--~-~--~~~---~--~~
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] Unresponsive script

2009-07-17 Thread usha

Hi

I am sometimes getting this warning :

" A script on this page may be busy, or it may have stopped
responding.You can stop the script now, or you can continue to see if
the script will complete.
.../prototype.js:811"

I wanted to know how to avoid this warning .

thanks

--~--~-~--~~~---~--~~
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] IE7 scrollTop

2009-07-17 Thread lun.ashis

Hi .

I am wandering why IE7 is not calculating the exact scrollTop of 
element as Firefox and Safari.

I found that if i made position relative/fixed than it calculates the
exact scrollTop position otherwise returns frequently 0.

can anyone explain this.

Thanks in advance...

Cheers
--~--~-~--~~~---~--~~
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: Unresponsive script

2009-07-17 Thread usha

Hi .. thanks for the response .

I am currently using the 1.6.0.2 version and I always get that at that
error in lines marked as below

function $A(iterable) {
  if (!iterable) return [];
  if (iterable.toArray) return iterable.toArray();
  var length = iterable.length || 0, results = new Array(length);
 ==> while (length--) results[length] = iterable[length];
  ==>return results;
}

Probably as you said it is getting iterated in a long loop .

On Jul 17, 12:26 pm, "T.J. Crowder"  wrote:
> Hi,
>
> That's not nearly enough information to work with.  For instance
> (picking at random), what version of Prototype are you using?  The
> line number is not useful information without knowing what file it
> refers to.  811 isn't a particularly significant line in either the
> latest stable (1.6.0.3) or the latest beta (1.6.1 RC3).
>
> Generally speaking, you'll get that warning from browsers if you have
> a loop that takes a long time to complete.  For instance, something
> like this will cause it on IE6 and probably later versions (untested):
>
> var i, e;
> for (i = 0; i < 10; ++i) {
>     e = document.createElement('p');
>     p.innerHTML = "Line " + i;
>     document.body.appendChild(e);
>
> }
>
> You get the idea.  If you have to do something really long, break it
> up and yield execution periodically (untested):
>
> function addLotsOfParagraphs(index, limit) {
>     var e;
>
>     e = document.createElement('p');
>     p.innerHTML = "Line " + i;
>     document.body.appendChild(e);
>     ++index;
>     if (index < limit) {
>         arguments.callee.defer(index, limit);
>     }}
>
> addLotsOfParagraphs(0, 10);
>
> Or it could be that you have an infinite loop somewhere, or that
> you've tricked Prototype into having one.  Without more information,
> no saying what's going on...
>
> FWIW,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Jul 17, 4:59 pm, usha  wrote:
>
>
>
> > Hi
>
> > I am sometimes getting this warning :
>
> > " A script on this page may be busy, or it may have stopped
> > responding.You can stop the script now, or you can continue to see if
> > the script will complete.
> > .../prototype.js:811"
>
> > I wanted to know how to avoid this warning .
>
> > thanks- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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: Effect.Highlight Breaks CSS Hover

2009-07-17 Thread Nicholas Van Weerdenburg
Thanks!

On Fri, Jul 17, 2009 at 10:42 AM, T.J. Crowder wrote:

>
> Hi,
>
> Yeah, bit of a pain that there's no standard way to _remove_ a style
> from the style property entirely.  Setting things to "" is not the
> same thing.
>
> However:  Effects offer beforeStart and afterFinish callbacks, and the
> style property has this nifty cssText property on it, which suggests
> this should work around the problem (and may be a way forward for an
> eventual scripty fix):
>
>$('target').highlight({
>beforeStart: function(effect) {
>effect.saveStyle = effect.element.style.cssText;
>},
>afterFinish: function(effect) {
>effect.element.style.cssText = effect.saveStyle;
>}
>});
>
> cssText is fairly widely supported, I believe, even IE6 had it (not
> that :hover works with IE6, except on links).  In fact, Prototype's
> setStyle uses it if you pass in a string (an undocumented feature;
> docs say it has to be an object, so it may not get unit tested).
>
> HTH,
>
> On Jul 17, 2:33 pm, Nicholas Van Weerdenburg 
> wrote:
> > Hi,
> > I found this tickethttp://dev.rubyonrails.org/ticket/6134
> >
> > but the problem still exists.  No matter what I do, Effect.Highlight
> > pollutes the DOM by changing the element background color, breaking css
> > :hover and other style rules due to the element rule css precedence
> >
> > Anyone know of a workaround? I tried :restorecolor=>"" but that doesn't
> > work. Calls to set the background color to "" fail, I think due to the
> > timing of the hightlight.
> >
> > Thanks,
> > Nick
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---