[Proto-Scripty] Error in IE8

2009-07-28 Thread stegel

I am running prototype.js RC3 in IE8 within a Radiant CMS. It seems
that I am getting the following error on line 598

'null' is null or not an object  prototype.js, line 596 character 5

this is in the Enumerable Function:

var Enumerable = {
  each: function(iterator, context) {
var index = 0;
iterator = iterator.bind(context);
try {
  this._each(function(value) {
iterator(value, index++);
  });
} catch (e) {
  if (e != $break) throw e;
}
return this;
  },

Anyone seen this error?

--~--~-~--~~~---~--~~
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: Error in IE8

2009-07-28 Thread Alex McAuley

Check the script that is calling it.
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: stegel ritp...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 28, 2009 2:59 AM
Subject: [Proto-Scripty] Error in IE8



 I am running prototype.js RC3 in IE8 within a Radiant CMS. It seems
 that I am getting the following error on line 598

 'null' is null or not an object  prototype.js, line 596 character 5

 this is in the Enumerable Function:

 var Enumerable = {
  each: function(iterator, context) {
var index = 0;
iterator = iterator.bind(context);
try {
  this._each(function(value) {
iterator(value, index++);
  });
} catch (e) {
  if (e != $break) throw e;
}
return this;
  },

 Anyone seen this error?

 
 


--~--~-~--~~~---~--~~
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: Calling more than one effect fails (script.aculo.us)

2009-07-28 Thread bill

Hi,

thank you for this hint. Didn't actually solve my problem but a way to
improve my code =)
Solution for my problem:
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/154cb11c642020f6#

On 27 Jul., 16:47, Diodeus diod...@gmail.com wrote:
 Don't use the onload event in the body tag. Your script starts running
 before the DOM is ready.

 Use this instead in a script block:

 document.observe(dom:loaded, function() {
   start()

 });

 See:http://www.prototypejs.org/api/document/observe

 On Jul 25, 8:16 am, bill stefan@googlemail.com wrote:

  Hi,

  I'm new in using javascript and script.aculo.us so please patient with
  me =)

  I guess the best thing to do is to start with some code:

  script type=text/javascript language=javascript
                  function start()
                  {
                          Effect.Pulsate('warning', { pulses: 5, duration: 4 
  , from: 0.4});
                          Effect.Fade('info', { duration: 6});
                  }
  /script

  body onload=start();

  div id='info'
          Some info text
  /div

  div id='warning'
          Some warning text
  /div

  I guess it's pretty obvious what I'm trying to do: after the page is
  loaded, I want to start trigger two effects for the boxes info and
  warning. But non of the effect actually happen. If I just try to
  start one effect (I deleting one of function calls in start()) the
  remaining one is executed as expected.

  So why aren't both working at the same time?

  Thank you for any advice,
  bill


--~--~-~--~~~---~--~~
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: Calling more than one effect fails (script.aculo.us) - Correction

2009-07-28 Thread bill

This solves my problem perfectly. Thank you

 if ($('foo')) new Effect.Highlight('foo');
--~--~-~--~~~---~--~~
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] ternary operators

2009-07-28 Thread Jeztah

Afternoon guys

Is it possible in javascript to give out 2 answers to a tenary
opertor (doesnt make sense i know - see below)

function foo(arg) {

return ($(arg)) ? true : alert('Element Does not exist');false;

}
...
(wrapped in window loaded function)

foo('baz'); // doesnt exist so i want it to alert the
alert and return false to halt the script...


div id=bar/div



Is this the right way to do it in the operator or cant it be done
and no i dont want to make 2 functions i would like it in one if it
can be done.

Regards
Alex Mcauley

http://www.thevacancymarket.com
--~--~-~--~~~---~--~~
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: ternary operators

2009-07-28 Thread Alex McAuley

In my usual Not enough coffee moments i just used an If/Else instead lol

Not sure why i was trying to cut code using a tenary ...

We live and learn

Sorry for useless post


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: Jeztah webmas...@thecarmarketplace.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 28, 2009 4:51 PM
Subject: [Proto-Scripty] ternary operators



 Afternoon guys

 Is it possible in javascript to give out 2 answers to a tenary
 opertor (doesnt make sense i know - see below)

 function foo(arg) {

 return ($(arg)) ? true : alert('Element Does not exist');false;

 }
 ...
 (wrapped in window loaded function)

 foo('baz'); // doesnt exist so i want it to alert the
 alert and return false to halt the script...


 div id=bar/div



 Is this the right way to do it in the operator or cant it be done
 and no i dont want to make 2 functions i would like it in one if it
 can be done.

 Regards
 Alex Mcauley

 http://www.thevacancymarket.com
 
 


--~--~-~--~~~---~--~~
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] Manipulating the ghostly Clone

2009-07-28 Thread ferion

Hello everybody,

another day - another problem :)

Due to the design of my project it is nessesary to manipulate the DOM-
Structure of the ghost created by the new Draggable function
ghosting:true

like in
this.Dragger = new Draggable($(this.widgetToolId),{revert:
this.shallIToolRevert.bind(this), onStart:this.startDrag.bind(this),
onEnd:this.stopDrag.bind(this), onDrag:this.whileDrag.bind(this),
ghosting:true, starteffect:null});

The ghosting works fine, but it seems to be a perfect Clone of the
original Div (including the ID which is quite strange because the
shall be no ambigious id in one page).
I worked some time on this Problem but every manipulation ($
(dragname), Dragger.element) targets the original div an not the
clone.

I have to constantly manipulate the Source of the ghost AND the
Original, so simply put another clone behind the Draggable and skip
ghosting is not an option.

Question is how do i access the Ghost?

Thanx for your help

Ferion

I apologize for the lack of proper english. I'm not a native speaker
--~--~-~--~~~---~--~~
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-28 Thread damerub

Hi, T.J.

Thank you for the explainnation. It's very clear.

best regards,

Lin



On Jul 17, 12:18 am, T.J. Crowder t...@crowdersoftware.com wrote:
 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 mcaca...@gmail.com 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: Error in IE8

2009-07-28 Thread Alex McAuley

Most scripts on a page are evaluated by the interpereter first.

COmment out all of your functions and see if its still happening

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: stegel ritp...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 28, 2009 5:48 PM
Subject: [Proto-Scripty] Re: Error in IE8



It is happening when I read in prototype.js, as it is the first js I
reference. Nothing is calling it yet.

On Jul 28, 4:19 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 Check the script that is calling it.
 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: stegel ritp...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Tuesday, July 28, 2009 2:59 AM
 Subject: [Proto-Scripty] Error in IE8

  I am running prototype.js RC3 in IE8 within a Radiant CMS. It seems
  that I am getting the following error on line 598

  'null' is null or not an object prototype.js, line 596 character 5

  this is in the Enumerable Function:

  var Enumerable = {
  each: function(iterator, context) {
  var index = 0;
  iterator = iterator.bind(context);
  try {
  this._each(function(value) {
  iterator(value, index++);
  });
  } catch (e) {
  if (e != $break) throw e;
  }
  return this;
  },

  Anyone seen this error?



--~--~-~--~~~---~--~~
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] how to use scripts without clicks

2009-07-28 Thread dmcglone

Hi everyone,

I'm new to scriptaculous and javascript. I've followed the examples
on
scriptaculous web site, but I can't find any examples implement the
events
without them being links, such as when the page loads.

currently what I'm trying to do is make a block of text fade in on the
page
when it loads. I've already got 1 script that I am playing with that
zooms the
header in, and the only way It works is to add a tag to the body tag
of the
document This seems to not allow me to add other stuff to the page
unless they
are links.

My goal is to learn how to load more than 1 element on a page with 2
or more
effects.

My Google searches have turned up fruitless, does anyone know of any
good
tutorials or such?
--~--~-~--~~~---~--~~
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 to use scripts without clicks

2009-07-28 Thread DJ Mangus

document.observe(dom:loaded, function() {
  // initially hide all containers for tab content
  $$('div.tabcontent').invoke('hide');
});

Note: you can of course do anything you want in that function.  The
function runs when everything is loaded and available to javascript.

On Tue, Jul 28, 2009 at 12:02 PM, dmcgloned.mcgl...@att.net wrote:

 Hi everyone,

 I'm new to scriptaculous and javascript. I've followed the examples
 on
 scriptaculous web site, but I can't find any examples implement the
 events
 without them being links, such as when the page loads.

 currently what I'm trying to do is make a block of text fade in on the
 page
 when it loads. I've already got 1 script that I am playing with that
 zooms the
 header in, and the only way It works is to add a tag to the body tag
 of the
 document This seems to not allow me to add other stuff to the page
 unless they
 are links.

 My goal is to learn how to load more than 1 element on a page with 2
 or more
 effects.

 My Google searches have turned up fruitless, does anyone know of any
 good
 tutorials or such?
 


--~--~-~--~~~---~--~~
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.Morph query

2009-07-28 Thread Andrew Dodd

Hi

I page with multiple elements each of which are highlighted
(individually) onclick.

I would like the morph effect to be removed from the previous element
when a new one is clicked (highlighted).

I won't know what the id of the previous element was though, is there
a way to achieve this?

Cheers
Andy

--~--~-~--~~~---~--~~
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] Firefox v3.5

2009-07-28 Thread evrim

After I updated my firefox to version 3.5 my running code started to
not run and
i have an error from firebug (An invalid or illegal string was
specified code: 12) on prototype.js version—1.6.1 RC3 line 3342
in my code, code stop running on using Element.select function when I
get this code comment, the code run well.

--~--~-~--~~~---~--~~
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] Form array causes problems in ie 7 and below

2009-07-28 Thread Andy Daykin
Hello, I have a form http://spanglerdesign.com/test/glucocard/enrollment.php, 
and when I hit the submit button in ie7 and below, I get an error message 
saying Object doesn't support this property or method. I have tried versions 
1.6.1 rc3, and 1.6.0.3.

It breaks on the line: 
if(!form['dobyear'].getValue().match(/^(\d{4})?$/)) {

The script is working fine in all other browsers, including ie8. What can I do 
to fix this?

Thanks,

-Andy Daykin
--~--~-~--~~~---~--~~
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.Morph query

2009-07-28 Thread Andy Daykin

Why don't you use an array to store all of the elements that have been 
clicked and treat it like a queue?

--
From: Andrew Dodd a...@slicethepie.com
Sent: Tuesday, July 28, 2009 7:02 AM
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Effect.Morph query


 Hi

 I page with multiple elements each of which are highlighted
 (individually) onclick.

 I would like the morph effect to be removed from the previous element
 when a new one is clicked (highlighted).

 I won't know what the id of the previous element was though, is there
 a way to achieve this?

 Cheers
 Andy

 
 

--~--~-~--~~~---~--~~
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: Form array causes problems in ie 7 and below

2009-07-28 Thread Walter Lee Davis

Make sure that this object is extended by Prototype before you ask for  
any of the Prototype goodies. IE has this habit of not following the  
prototype chain (small p prototype, that is) up to find the methods  
that Prototype puts there. If you modify your code thusly:

if( ! $(form['dobyear']).getValue...

you will have no more error, because the first thing that happens is  
that Prototype will extend the raw object reference (because it was  
wrapped in the dollar function), turning it into a full-featured  
inheritor of all the goodies in all supported browsers.

Walter

On Jul 28, 2009, at 12:41 PM, Andy Daykin wrote:

 Hello, I have a form http://spanglerdesign.com/test/glucocard/enrollment.php 
 , and when I hit the submit button in ie7 and below, I get an error  
 message saying Object doesn't support this property or method. I  
 have tried versions 1.6.1 rc3, and 1.6.0.3.

 It breaks on the line:
 if(!form['dobyear'].getValue().match(/^(\d{4})?$/)) {

 The script is working fine in all other browsers, including ie8.  
 What can I do to fix this?

 Thanks,

 -Andy Daykin

 


--~--~-~--~~~---~--~~
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] how sum value from input?

2009-07-28 Thread Miguel Beltran R.
Hi list

I have the next code, but how can be made better?

 var i;
 var suma=0;
 var valor;
 for(i=1; i=24; i++){
valor=$F( 'quincena_'+ i).strip();
if(valor!=''  !(isNaN(valor))){
   suma+=parseFloat(valor,10);
}
   }



-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida

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