[Proto-Scripty] Re: Prototype.js / AJAX.response() Script

2010-04-07 Thread T.J. Crowder
Hi,

 Any suggestions?  Is this possible/doable?

Unfortunately, as far as I can tell on a few minutes' effort, TinyURL
doesn't support cross-origin resource sharing (CORS)[1], and so while
you could do this with Ajax.Request[2]:

new Ajax.Request(http://tinyurl.com/api-create.php?url=http://
www.google.com/, {
method:GET,
onSuccess: function(response) {
var newUrl = response.responseText;
alert(New URL:  + newUrl);
}
});

...it doesn't work because it fails afoul of the SOP[3].

Apparently you're not the first to want to do this client-side,
because in the course of trying to find out whether TinyURL supported
CORS I ran across a Google AppEngine site[4] that works around this
using JSONP[5]. So you could use that service (if you could find
someone to ask permission from):

function gotTinyURL(data)
{
if (data.ok) {
alert(New URL:  + data.tinyurl);
}
else {
alert(Request failed);
}
}

function getTinyURL(url)
{
var head, script;

head = $$('head')[0];
if (head) {
script = new Element('script', {
type: 'text/javascript',
src: 'http://json-tinyurl.appspot.com/?url=' + url +
callback=gotTinyURL
});
head.appendChild(script);
head.removeChild(script);
}
}

Note that when you call a JSONP service in this way, you are *trusting
that service not to do anything bad* because you're giving them full
access to the page (that's how JSONP works).

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


[1] http://www.w3.org/TR/access-control/
[2] http://api.prototypejs.org/ajax/ajax/request/
[3] http://en.wikipedia.org/wiki/Same_origin_policy
[4] http://json-tinyurl.appspot.com/
[5] http://en.wikipedia.org/wiki/JSON#JSONP

On Apr 6, 8:25 pm, mTorbin mtor...@gmail.com wrote:
 Hey all,

 I'm relatively new to prototype.js and I'm attempting to figure out
 the ajax.response() function.  I'd like to build a little function
 that achieves the same as PHP's file_get_contents() but using
 Javascript.  Specifically I'd like to be able to take advantage of
 TinyURL's open API:

 http://tinyurl.com/api-create.php?url=http://www.google.com/

 Any suggestions?  Is this possible/doable?

 Thanks in advance!

  - MT

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Remove script from view

2010-04-07 Thread Christophe Decaux
First, this group doesn't know much about Rails, so you won't get any advice on 
how to move some code to application.js

But, I believe your issue can be easily solve with a little help from the queue 
mechanism.
Check Effect Queues - scriptaculous - GitHub

So you might end up with a slightly modified 
:onmouseout=new Effect.Move(this, {x: 10, y: 0, duration: 0.2, queue: 'end' } 
); return false;

Hope this helps,
Christophe

Le 7 avr. 2010 à 06:16, emachnic a écrit :

 I'm new to Prototype and script.aculo.us and I have this code in my
 view that makes a link move left onmouseover and back right
 onmouseout. I have had the same problem as others where it executes
 the onmouseout event even if onmouseover hasn't finished so I wanted
 to put this in my application.js file and I needed to know how to
 write it there and call it in the view. This is written in HAML for a
 Rails2.3.5 app.
 
 = link_to BLOG, {:action = index}, :id = sideLink1, :class =
 sideLink, :onmouseover = new Effect.Move(this, {x: -10, y: 0,
 duration: 0.2}); return false;, :onmouseout = new Effect.Move(this,
 {x: 10, y: 0, duration: 0.2}); return false;
 
 Any help/suggestions would be much appreciated. 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-scriptacul...@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.
 

-- 
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-scriptacul...@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: Queues Effects

2010-04-07 Thread C_B
Thanks for your solution! Unfortunately, i am not able to get this
work.
Firefox Debug says: start is not defined - line 1. However, i have
alredy checked all ;, ) and } but I am not able to troubleshoot.

Here is my function:

   function start(area, choice) {
   var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
$('solution')));
});
}

Any evidence?

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
Hi

How are you calling and defining the start function ? directly in your HTML
page or through an Ajax Request ? if it is defined through an ajax request,
you must use the syntax :
var start = function() {
...
};

is there some place where we can view the page ?

And I've seen a missing dot again
 Enumerable.invoke.curry(appear).bind($$('*.*solution'))

On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:

 Thanks for your solution! Unfortunately, i am not able to get this
 work.
 Firefox Debug says: start is not defined - line 1. However, i have
 alredy checked all ;, ) and } but I am not able to troubleshoot.

 Here is my function:

   function start(area, choice) {
var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
 $('solution')));
});
}

 Any evidence?

 --
 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-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
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-scriptacul...@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: Queues Effects

2010-04-07 Thread C_B

Unfortunately I am actually not able to get the site online.

I call the function like this:
div onclick=javascript:start('age', 6) id=age6
class=entryComputer/div

If I run the search() function directly in the onclick-handler it
works. However, with no fade-  appear-effects.

Maybe the following is an evidence:
Sometimes Firefox Debug says, that one ) is missing after argument
list on position new.Effect.Parallel(effects, afterFinish:**
function()


Cheers!



On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Hi

 How are you calling and defining the start function ? directly in your HTML
 page or through an Ajax Request ? if it is defined through an ajax request,
 you must use the syntax :
 var start = function() {
 ...

 };

 is there some place where we can view the page ?

 And I've seen a missing dot again
  Enumerable.invoke.curry(appear).bind($$('*.*solution'))

 On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
  Thanks for your solution! Unfortunately, i am not able to get this
  work.
  Firefox Debug says: start is not defined - line 1. However, i have
  alredy checked all ;, ) and } but I am not able to troubleshoot.

  Here is my function:

        function start(area, choice) {
         var effects = [];
         $$(.solution).each( function(item) {
           effects.push( new Effect.Fade(item, {sync: true}));
         });

         new Effect.Parallel(effects, afterFinish:  function() {
           search(area, choice, Enumerable.invoke.curry(appear).bind($
  $('solution')));
         });
         }

  Any evidence?

  --
  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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
Yes it is !

new Effect.Parallel(effects,* {*
afterFinish:  function() {
search(area, choice,
Enumerable.invoke.curry(appear).bind($$('solution')));
}
*}* );

On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:


 Unfortunately I am actually not able to get the site online.

 I call the function like this:
 div onclick=javascript:start('age', 6) id=age6
 class=entryComputer/div

 If I run the search() function directly in the onclick-handler it
 works. However, with no fade-  appear-effects.

 Maybe the following is an evidence:
 Sometimes Firefox Debug says, that one ) is missing after argument
 list on position new.Effect.Parallel(effects, afterFinish:**
 function()


 Cheers!



 On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
 wrote:
  Hi
 
  How are you calling and defining the start function ? directly in your
 HTML
  page or through an Ajax Request ? if it is defined through an ajax
 request,
  you must use the syntax :
  var start = function() {
  ...
 
  };
 
  is there some place where we can view the page ?
 
  And I've seen a missing dot again
   Enumerable.invoke.curry(appear).bind($$('*.*solution'))
 
  On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
   Thanks for your solution! Unfortunately, i am not able to get this
   work.
   Firefox Debug says: start is not defined - line 1. However, i have
   alredy checked all ;, ) and } but I am not able to troubleshoot.
 
   Here is my function:
 
 function start(area, choice) {
  var effects = [];
  $$(.solution).each( function(item) {
effects.push( new Effect.Fade(item, {sync: true}));
  });
 
  new Effect.Parallel(effects, afterFinish:  function() {
search(area, choice, Enumerable.invoke.curry(appear).bind($
   $('solution')));
  });
  }
 
   Any evidence?
 
   --
   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-scriptacul...@googlegroups.com.
   To unsubscribe from this group, send email to
   prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/prototype-scriptaculous?hl=en.

 --
 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-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
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-scriptacul...@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: Queues Effects

2010-04-07 Thread C_B
Incredible! It works! Thanks!!! Fade out and search are sucessfully
processed.

There is only one thing left: it does not appear again softly, it
seems like the effect would not run - the solution is there directly.

On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Yes it is !

 new Effect.Parallel(effects,* {*
 afterFinish:  function() {
     search(area, choice,
 Enumerable.invoke.curry(appear).bind($$('solution')));
     }
 *}* );

 On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:

  Unfortunately I am actually not able to get the site online.

  I call the function like this:
  div onclick=javascript:start('age', 6) id=age6
  class=entryComputer/div

  If I run the search() function directly in the onclick-handler it
  works. However, with no fade-  appear-effects.

  Maybe the following is an evidence:
  Sometimes Firefox Debug says, that one ) is missing after argument
  list on position new.Effect.Parallel(effects, afterFinish:**
  function()

  Cheers!

  On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
  wrote:
   Hi

   How are you calling and defining the start function ? directly in your
  HTML
   page or through an Ajax Request ? if it is defined through an ajax
  request,
   you must use the syntax :
   var start = function() {
   ...

   };

   is there some place where we can view the page ?

   And I've seen a missing dot again
    Enumerable.invoke.curry(appear).bind($$('*.*solution'))

   On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
Thanks for your solution! Unfortunately, i am not able to get this
work.
Firefox Debug says: start is not defined - line 1. However, i have
alredy checked all ;, ) and } but I am not able to troubleshoot.

Here is my function:

      function start(area, choice) {
       var effects = [];
       $$(.solution).each( function(item) {
         effects.push( new Effect.Fade(item, {sync: true}));
       });

       new Effect.Parallel(effects, afterFinish:  function() {
         search(area, choice, Enumerable.invoke.curry(appear).bind($
$('solution')));
       });
       }

Any evidence?

--
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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/prototype-scriptaculous?hl=en.

  --
  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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
you are still missing the . css class prefix .bind($$('.solution'))

On Wed, Apr 7, 2010 at 12:09 PM, C_B i...@christian-baesler.de wrote:

 Incredible! It works! Thanks!!! Fade out and search are sucessfully
 processed.

 There is only one thing left: it does not appear again softly, it
 seems like the effect would not run - the solution is there directly.

 On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
 wrote:
  Yes it is !
 
  new Effect.Parallel(effects,* {*
  afterFinish:  function() {
  search(area, choice,
  Enumerable.invoke.curry(appear).bind($$('solution')));
  }
  *}* );
 
  On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:
 
   Unfortunately I am actually not able to get the site online.
 
   I call the function like this:
   div onclick=javascript:start('age', 6) id=age6
   class=entryComputer/div
 
   If I run the search() function directly in the onclick-handler it
   works. However, with no fade-  appear-effects.
 
   Maybe the following is an evidence:
   Sometimes Firefox Debug says, that one ) is missing after argument
   list on position new.Effect.Parallel(effects, afterFinish:**
   function()
 
   Cheers!
 
   On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
   wrote:
Hi
 
How are you calling and defining the start function ? directly in
 your
   HTML
page or through an Ajax Request ? if it is defined through an ajax
   request,
you must use the syntax :
var start = function() {
...
 
};
 
is there some place where we can view the page ?
 
And I've seen a missing dot again
 Enumerable.invoke.curry(appear).bind($$('*.*solution'))
 
On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de
 wrote:
 Thanks for your solution! Unfortunately, i am not able to get this
 work.
 Firefox Debug says: start is not defined - line 1. However, i
 have
 alredy checked all ;, ) and } but I am not able to
 troubleshoot.
 
 Here is my function:
 
   function start(area, choice) {
var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});
 
new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice,
 Enumerable.invoke.curry(appear).bind($
 $('solution')));
});
}
 
 Any evidence?
 
 --
 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-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 prototype-scriptaculous%252bunsubscr...@googlegroups.comprototype-scriptaculous%25252bunsubscr...@googlegroups.com
 
 
 .
 For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.
 
   --
   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-scriptacul...@googlegroups.com.
   To unsubscribe from this group, send email to
   prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/prototype-scriptaculous?hl=en.

 --
 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-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
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-scriptacul...@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: Queues Effects

2010-04-07 Thread C_B
Unfortunately that is not the mistake.
I have already corrected that.

Last version of the function:

   function start(area, choice) {
   var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, {afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
$('.solution')));
}});
}

On 7 Apr., 12:13, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 you are still missing the . css class prefix .bind($$('.solution'))

 On Wed, Apr 7, 2010 at 12:09 PM, C_B i...@christian-baesler.de wrote:
  Incredible! It works! Thanks!!! Fade out and search are sucessfully
  processed.

  There is only one thing left: it does not appear again softly, it
  seems like the effect would not run - the solution is there directly.

  On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
  wrote:
   Yes it is !

   new Effect.Parallel(effects,* {*
   afterFinish:  function() {
       search(area, choice,
   Enumerable.invoke.curry(appear).bind($$('solution')));
       }
   *}* );

   On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:

Unfortunately I am actually not able to get the site online.

I call the function like this:
div onclick=javascript:start('age', 6) id=age6
class=entryComputer/div

If I run the search() function directly in the onclick-handler it
works. However, with no fade-  appear-effects.

Maybe the following is an evidence:
Sometimes Firefox Debug says, that one ) is missing after argument
list on position new.Effect.Parallel(effects, afterFinish:**
function()

Cheers!

On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Hi

 How are you calling and defining the start function ? directly in
  your
HTML
 page or through an Ajax Request ? if it is defined through an ajax
request,
 you must use the syntax :
 var start = function() {
 ...

 };

 is there some place where we can view the page ?

 And I've seen a missing dot again
  Enumerable.invoke.curry(appear).bind($$('*.*solution'))

 On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de
  wrote:
  Thanks for your solution! Unfortunately, i am not able to get this
  work.
  Firefox Debug says: start is not defined - line 1. However, i
  have
  alredy checked all ;, ) and } but I am not able to
  troubleshoot.

  Here is my function:

        function start(area, choice) {
         var effects = [];
         $$(.solution).each( function(item) {
           effects.push( new Effect.Fade(item, {sync: true}));
         });

         new Effect.Parallel(effects, afterFinish:  function() {
           search(area, choice,
  Enumerable.invoke.curry(appear).bind($
  $('solution')));
         });
         }

  Any evidence?

  --
  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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
  prototype-scriptaculous%252bunsubscr...@googlegroups.comprototype-scriptaculous%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

--
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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/prototype-scriptaculous?hl=en.

  --
  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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are 

[Proto-Scripty] Re: I'm getting an error in line 599 of dragdrop.js

2010-04-07 Thread ColinFine


On Apr 6, 4:12 pm, HotShot hs...@gmx.net wrote:
 Hi,

 i created some sortable lists. Now I'm getting the error element is
 null in line 599 of the original dragdrop.js when a item from one
 list ist dropped into another. When I release the mouse button nothing
 happens. When I click it again the item droppes where it should drop.

 The code around line 599 would be:

 var Sortable = {
   SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,

   sortables: { },

   _findRootElement: function(element) {
     while (element.tagName.toUpperCase() != BODY) {
       if(element.id  Sortable.sortables[element.id]) return element;
       element = element.parentNode;
     }
   },

   options: function(element) {
     element = Sortable._findRootElement($(element));
     if(!element) return;
     return Sortable.sortables[element.id];
   },

 ...

 Where as line 599 would be while (element.tagName.toUpperCase() !=
 BODY) {

 Does anybody have an idea why this could be?
 Could it be, because the html tags for the sortalble divs are
 generated dynamically by  javascript?

This kind of error means that you are passing an element into one of
the Scriptaculous functions as null. This might be a simple error in
your programming but it is often because you are passing an element
which does not yet exist (perhaps because you have done some innerHTML
and not given the DOM time to operate.

Without more of your code, it's impossible to tell: but please don't
post a large amount: look at where the element values come from that
you are passing into Dragdrop functions.

-- 
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-scriptacul...@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] floating div

2010-04-07 Thread Martín Marqués
OK, I know this isn't strictly prototype, but I'll through it here.

I have a div with id divsubmit which has an animated gif used when
prototype is waiting for a response. So I use $('divsubmit').show() in
onLoading: and $('divsubmit').hide in onComplete.

The thing is that I have this div on the top of the page and everytime
I .show() it, all the objects below it go down to make the div fit. I
want the div to show up on top of the other objects. How do I do this?

-- 
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

-- 
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-scriptacul...@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] new Parsing

2010-04-07 Thread Hariz Soleminio
Hi Guys,

I'll ask a stupid question of newbies like me. I have a prototype and I use 
firebug for the development. 

I keep having prototype [Break on this error] Error in parsing value for 
'top'.  in my console.

what seems to be the problem? is it my scripting? but I think i don't have any 
problem in my scripting.

Since I'm just using a $(anyid)  in my development.


Thanks in advance guys.



  

-- 
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-scriptacul...@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.



Re: [Proto-Scripty] new Parsing

2010-04-07 Thread Alex Wallace
I'm assuming you're modifying the style attribute top for the element
$(anyid) -- and I'm further assuming that you're feeding it an integer. If
you're doing:

$(anyid).style.top = 42;

Change it to:

$(anyid).style.top = 42px;

If my assumptions are completely incorrect, please isolate the failing line
of code and send that to the list.

Cheers,
Alex

On Wed, Apr 7, 2010 at 3:42 PM, Hariz Soleminio 
harriz_solemi...@rocketmail.com wrote:

 Hi Guys,

 I'll ask a stupid question of newbies like me. I have a prototype and I use
 firebug for the development.

 I keep having prototype [Break on this error] Error in parsing value for
 'top'.  in my console.

 what seems to be the problem? is it my scripting? but I think i don't have
 any problem in my scripting.

 Since I'm just using a $(anyid)  in my development.


 Thanks in advance guys.

 --
 Feel safer online. Upgrade to the new, safer Internet Explorer 8
 http://us.lrd.yahoo.com/_ylc=X3oDMTFnNHZxc2k1BHRtX2RtZWNoA1RleHQgTGluawR0bV9sbmsDVTExMDM0NjUEdG1fbmV0A1lhaG9vIQ--/SIG=11k7khaee/**http%3A//downloads.yahoo.com/sg/internetexplorer/optimized
 for Yahoo! to put your mind at peace. It's free.
 Get IE8 
 here!http://us.lrd.yahoo.com/_ylc=X3oDMTFnNHZxc2k1BHRtX2RtZWNoA1RleHQgTGluawR0bV9sbmsDVTExMDM0NjUEdG1fbmV0A1lhaG9vIQ--/SIG=11k7khaee/**http%3A//downloads.yahoo.com/sg/internetexplorer/

 --
 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-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


-- 
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-scriptacul...@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.



Re: [Proto-Scripty] floating div

2010-04-07 Thread Guillaume Lepicard

Hi martin

This is a pure style issue... Try setting your div as positonned  
absolutely with a z-index


Guillaume


Le 7 avr. 2010 à 20:37, Martín Marqués martin.marq...@gmail.com a  
écrit :



OK, I know this isn't strictly prototype, but I'll through it here.

I have a div with id divsubmit which has an animated gif used when
prototype is waiting for a response. So I use $('divsubmit').show() in
onLoading: and $('divsubmit').hide in onComplete.

The thing is that I have this div on the top of the page and everytime
I .show() it, all the objects below it go down to make the div fit. I
want the div to show up on top of the other objects. How do I do this?

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

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




--
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-scriptacul...@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.