[Proto-Scripty] Re: protosafe download

2009-01-21 Thread T.J. Crowder

Hi,

(A single thread is sufficient, you don't need to do multiple posts.)

The person who was maintaining Protosafe decided to stop doing so and
took down the files.

For a minified version of Prototype, you have several options, such as
jsmin from Crockford[1], Packer 3 from Edwards[2], or many others.
With Packer 3 or anything else that (optionally) rewrites parameter
names, you'll need to either not use that option or modify the code so
that it leaves the special $super parameter[3] alone.

[1] http://www.crockford.com/javascript/jsmin.html
[2] http://dean.edwards.name/packer/
[3] http://prototypejs.org/api/class/create

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

On Jan 21, 2:47 am, river weiguowa...@gmail.com wrote:
 Where can I download the package? It seemshttp://code.google.com/p/protosafe/
 is no longer accessible. I got a 403 error. Any help is great
 appreciated. I need the files ASAP!

 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: jQuery or Prototype ?

2009-01-21 Thread T.J. Crowder

Hi,

Tools are tools, use the one that does what you need and that you find
comfortable.

One thing I don't like about jQuery is all of the (in effect) function
overloading.  I don't have a problem with overloaded functions
provided they do essentially the same thing (in Java, for instance,
it's how you do optional parameters).  But for example, the jQuery
function (usually aka $) is just way too overloaded.  If you see:

$(x);

...or

jQuery(x);

...in someone's code, you have to look very carefully at 'x' to know
what that's going to do.  It might

1. Extend a raw element

or maybe

2. Search for elements matching a CSS selector

or it could

3. Register a function to be called when the DOM is ready

but don't forget that instead it might

4. Create DOM elements from an HTML string.

Yikes.  That's asking for maintenance problems IMHO, even if you don't
have junior staff -- and especially if you do.

In a similar vein, I don't like the fact that a number of jQuery's
functions are dual-mode:  They do one thing if you pass in a
parameter, something else if you don't.  If you write:

x = $('#frog').html('ribbit');

...you're setting the inner content of the 'frog' element to the text
'ribbit'.  But if you write:

x = $('#frog').html();

...you're *retrieving* the content of 'frog'.  So the html() function
has to check arguments.length every time you call it (except it
doesn't, see note about subtle bugs below) to figure out whether it's
a set or get operation, even though you've ALREADY done that
differentiation in your code.  Now, I know branch-on-test is very fast
these days, but I still don't see any excuse for requiring the library
to do that runtime check on every call.  Just use different names,
f'chrissake. :-)  And there's that maintenance aspect again -- it's
unusual for functions to change meaning in that way.  Granted, this
isn't *totally* dissimilar to using a property (where what happens
depends on whether it's on the left- or right-hand side of the
assignment operator), but it's different enough to cause hassles.

Oh!  And quick:  What does 'x' refer to in the above two statements?
You guessed it, it depends on whether you passed a parameter into html
() or not.  If you did, html() returns a jQuery object (for chaining
purposes); if you didn't, it returns a string (the content of the
element).  Say what?

These dual-mode functions make some bugs in your code even more subtle
than they need to be.  Consider:

function buggyFunction(count) {
var display;
if (count  minThreshold) {
display = 'Need more thingies';
} else if (count  maxThreshold) {
display = 'Too many thingies!';
}
$('#levelmessage').html(display);
}

The author of the function messed up and forgot to set 'display' to
anything if minThreshold = count = maxThreshold (they probably
wanted ''), and so 'display' is undefined when passed into html() in
that case.  Now, does that show the text 'undefined'?  No.  It doesn't
change the content of the element at all.  Why not?  Because the html
() call returns the current text inside the levelmessage element
rather than setting its content, because html() *doesn't* check
arguments.length, it checks if its first parameter === undefined.  So
even if you pass in a parameter, it does a get rather than a set if
the parameter is undefined.

Now, all of the above could easily be characterized as being akin to
the brace style wars of the 80's -- style issues rather than substance
issues (with some speculation that the style issues could be/become
substantive maintenance issues).  I'm not saying any of it necessarily
means you shouldn't use jQuery if the other arguments in favor of it
are compelling for you -- and it does seem to me that there are some
compelling arguments.  I'm just saying, you asked the question, and I
have issues with the API. ;-)

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

On Jan 20, 11:55 am, Jan Hansen j...@nhl-data.dk wrote:
 Hi all,

 Still more frequently I get or see the question: Should we use jQuery
 or Prototype? There has been discussions about the future of prototype,
 is there enough development going on for prototype, an unofficial wiki
 has been created (thanks!) etc. etc. But nothing BIG. jQuery has a
 huge community, a lot of plugins and to me it looks like all the
 trivial stuff is equally easy to do with both libraries. Some argue that
 prototype is better when it comes to dealing with things not directly
 related to the DOM - but I cant find any hard evidence helping me
 decide whether to use prototype or jquery. There are, however lots of
 soft arguments that people throw at me to convince me to switch to jQuery:

 1) Larger community
 2) Better website
 3) More plugins
 4) Supported by microsoft (they will now distribute an
 intellisense-enabled version of jQuery - but not add a single line of
 code, 

[Proto-Scripty] Re: jQuery or Prototype ?

2009-01-21 Thread Jan Hansen
Thanks!

Yes, tools are tools - and one should use the one that fits the task at 
hand best. However, it is difficult to actually know which tool to use 
if you dont know the tools well enuogh. I guess this is the reason 
developers tend to have a tendency of falling into the habit of once 
you've learned how to use a hammer, everything starts looking like a 
nail... Ah well...

I'm not looking for arguments _not_ to use jQuery, but the current 
situation is that it is getting increasingly harder to convince 
co-workers that prototype is a valid choice. jQuery seem to have many 
more followers along with a more united community, whereas the 
prototype api pages are relatively short in larger examples. There is 
the unofficial wiki you set up which tries to help in several areas, 
which it does - and no, I haven't found time to contribute myself (yet.. 
argh...). Plugins/tools/whatever is found on scripteka and finally we 
have the scriptaculous website as well. I know that the prototype team 
now focuses on more scheduled releases, better documentation and the 
community as a general - which is good. I really hope it will help the 
ecosystem around prototype evolve. Im just looking for all you clever 
guys comments on what the differences between prototype and jQuery are, 
and how this could help me persuade others that just because MS decides 
to support a tool, doesnt mean that the others should be abandoned. 
But I believe that we have to do something now. Sigh... more work, and 
still no time...

But thanks a lot for you insightfull answers!

Best regards,

/Jan




On 21-01-2009 10:56, T.J. Crowder wrote:
 Hi,

 Tools are tools, use the one that does what you need and that you find
 comfortable.

 One thing I don't like about jQuery is all of the (in effect) function
 overloading.  I don't have a problem with overloaded functions
 provided they do essentially the same thing (in Java, for instance,
 it's how you do optional parameters).  But for example, the jQuery
 function (usually aka $) is just way too overloaded.  If you see:

 $(x);

 ...or

 jQuery(x);

 ...in someone's code, you have to look very carefully at 'x' to know
 what that's going to do.  It might

 1. Extend a raw element

 or maybe

 2. Search for elements matching a CSS selector

 or it could

 3. Register a function to be called when the DOM is ready

 but don't forget that instead it might

 4. Create DOM elements from an HTML string.

 Yikes.  That's asking for maintenance problems IMHO, even if you don't
 have junior staff -- and especially if you do.

 In a similar vein, I don't like the fact that a number of jQuery's
 functions are dual-mode:  They do one thing if you pass in a
 parameter, something else if you don't.  If you write:

 x = $('#frog').html('ribbit');

 ...you're setting the inner content of the 'frog' element to the text
 'ribbit'.  But if you write:

 x = $('#frog').html();

 ...you're *retrieving* the content of 'frog'.  So the html() function
 has to check arguments.length every time you call it (except it
 doesn't, see note about subtle bugs below) to figure out whether it's
 a set or get operation, even though you've ALREADY done that
 differentiation in your code.  Now, I know branch-on-test is very fast
 these days, but I still don't see any excuse for requiring the library
 to do that runtime check on every call.  Just use different names,
 f'chrissake. :-)  And there's that maintenance aspect again -- it's
 unusual for functions to change meaning in that way.  Granted, this
 isn't *totally* dissimilar to using a property (where what happens
 depends on whether it's on the left- or right-hand side of the
 assignment operator), but it's different enough to cause hassles.

 Oh!  And quick:  What does 'x' refer to in the above two statements?
 You guessed it, it depends on whether you passed a parameter into html
 () or not.  If you did, html() returns a jQuery object (for chaining
 purposes); if you didn't, it returns a string (the content of the
 element).  Say what?

 These dual-mode functions make some bugs in your code even more subtle
 than they need to be.  Consider:

 function buggyFunction(count) {
 var display;
 if (count  minThreshold) {
 display = 'Need more thingies';
 } else if (count  maxThreshold) {
 display = 'Too many thingies!';
 }
 $('#levelmessage').html(display);
 }

 The author of the function messed up and forgot to set 'display' to
 anything if minThreshold = count = maxThreshold (they probably
 wanted ''), and so 'display' is undefined when passed into html() in
 that case.  Now, does that show the text 'undefined'?  No.  It doesn't
 change the content of the element at all.  Why not?  Because the html
 () call returns the current text inside the levelmessage element
 rather than setting its content, because html() *doesn't* check
 arguments.length, it checks if its first parameter === 

[Proto-Scripty] Re: protosafe download

2009-01-21 Thread river

Thanks a lot T.J. I apologize for the multiple posts. I was posting on
different groups and forgot I've posted on this.

I guess I was not clear on what I need exactly. I have to deal with
conflicts between prototype and mootools. From what I've read,
protosafe seems to be an excellent solution for that. The options
you've suggested don't address that issue, if I understand them
correctly. I'm new on prototype and JavaScript's OOP.

Weiguo

On 1月21日, 上午3时04分, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi,

 (A single thread is sufficient, you don't need to do multiple posts.)

 The person who was maintaining Protosafe decided to stop doing so and
 took down the files.

 For a minified version of Prototype, you have several options, such as
 jsmin from Crockford[1], Packer 3 from Edwards[2], or many others.
 With Packer 3 or anything else that (optionally) rewrites parameter
 names, you'll need to either not use that option or modify the code so
 that it leaves the special $super parameter[3] alone.

 [1]http://www.crockford.com/javascript/jsmin.html
 [2]http://dean.edwards.name/packer/
 [3]http://prototypejs.org/api/class/create

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

 On Jan 21, 2:47 am, river weiguowa...@gmail.com wrote:

  Where can I download the package? It 
  seemshttp://code.google.com/p/protosafe/
  is no longer accessible. I got a 403 error. Any help is great
  appreciated. I need the files ASAP!

  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: jQuery or Prototype ?

2009-01-21 Thread Gabriel Gilini
You might like to read Dion's opinion on this:
http://almaer.com/blog/why-i-often-prefer-prototype-too

Gabriel Gilini

www.usosim.com.br
gabr...@usosim.com.br
gabr...@souagil.com.br


On Wed, Jan 21, 2009 at 9:41 AM, Jan Hansen j...@nhl-data.dk wrote:

  Thanks!

 Yes, tools are tools - and one should use the one that fits the task at
 hand best. However, it is difficult to actually know which tool to use if
 you dont know the tools well enuogh. I guess this is the reason developers
 tend to have a tendency of falling into the habit of once you've learned
 how to use a hammer, everything starts looking like a nail... Ah well...

 I'm not looking for arguments _not_ to use jQuery, but the current
 situation is that it is getting increasingly harder to convince co-workers
 that prototype is a valid choice. jQuery seem to have many more followers
 along with a more united community, whereas the prototype api pages are
 relatively short in larger examples. There is the unofficial wiki you set
 up which tries to help in several areas, which it does - and no, I haven't
 found time to contribute myself (yet.. argh...). Plugins/tools/whatever is
 found on scripteka and finally we have the scriptaculous website as well. I
 know that the prototype team now focuses on more scheduled releases, better
 documentation and the community as a general - which is good. I really hope
 it will help the ecosystem around prototype evolve. Im just looking for all
 you clever guys comments on what the differences between prototype and
 jQuery are, and how this could help me persuade others that just because MS
 decides to support a tool, doesnt mean that the others should be
 abandoned. But I believe that we have to do something now. Sigh... more
 work, and still no time...

 But thanks a lot for you insightfull answers!

 Best regards,

 /Jan





 On 21-01-2009 10:56, T.J. Crowder wrote:

 Hi,

 Tools are tools, use the one that does what you need and that you find
 comfortable.

 One thing I don't like about jQuery is all of the (in effect) function
 overloading.  I don't have a problem with overloaded functions
 provided they do essentially the same thing (in Java, for instance,
 it's how you do optional parameters).  But for example, the jQuery
 function (usually aka $) is just way too overloaded.  If you see:

 $(x);

 ...or

 jQuery(x);

 ...in someone's code, you have to look very carefully at 'x' to know
 what that's going to do.  It might

 1. Extend a raw element

 or maybe

 2. Search for elements matching a CSS selector

 or it could

 3. Register a function to be called when the DOM is ready

 but don't forget that instead it might

 4. Create DOM elements from an HTML string.

 Yikes.  That's asking for maintenance problems IMHO, even if you don't
 have junior staff -- and especially if you do.

 In a similar vein, I don't like the fact that a number of jQuery's
 functions are dual-mode:  They do one thing if you pass in a
 parameter, something else if you don't.  If you write:

 x = $('#frog').html('ribbit');

 ...you're setting the inner content of the 'frog' element to the text
 'ribbit'.  But if you write:

 x = $('#frog').html();

 ...you're *retrieving* the content of 'frog'.  So the html() function
 has to check arguments.length every time you call it (except it
 doesn't, see note about subtle bugs below) to figure out whether it's
 a set or get operation, even though you've ALREADY done that
 differentiation in your code.  Now, I know branch-on-test is very fast
 these days, but I still don't see any excuse for requiring the library
 to do that runtime check on every call.  Just use different names,
 f'chrissake. :-)  And there's that maintenance aspect again -- it's
 unusual for functions to change meaning in that way.  Granted, this
 isn't *totally* dissimilar to using a property (where what happens
 depends on whether it's on the left- or right-hand side of the
 assignment operator), but it's different enough to cause hassles.

 Oh!  And quick:  What does 'x' refer to in the above two statements?
 You guessed it, it depends on whether you passed a parameter into html
 () or not.  If you did, html() returns a jQuery object (for chaining
 purposes); if you didn't, it returns a string (the content of the
 element).  Say what?

 These dual-mode functions make some bugs in your code even more subtle
 than they need to be.  Consider:

 function buggyFunction(count) {
 var display;
 if (count  minThreshold) {
 display = 'Need more thingies';
 } else if (count  maxThreshold) {
 display = 'Too many thingies!';
 }
 $('#levelmessage').html(display);
 }

 The author of the function messed up and forgot to set 'display' to
 anything if minThreshold = count = maxThreshold (they probably
 wanted ''), and so 'display' is undefined when passed into html() in
 that case.  Now, does that show the text 'undefined'?  No.  It doesn't
 

[Proto-Scripty] Re: Scriptaculous problem with option field

2009-01-21 Thread ColinFine



On Jan 20, 4:33 pm, rolfK r...@ibk-kellner.de wrote:
 Hello,

 Thank you for your fast response. But unfortunately your suggestion
 does not solve the problem. Using xyz as query, the following string
 is transferred:

 Without option field:
 query=xyz
 That is okay and as expected. With your suggestion as option field,
 the following is pushed to the server.
 query=xyz%5Bobject%20Object%5D

There is what looks very much like a bug in the scriptaculous
documentation (as is actually noted at
http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter): the
'parameters' property needs a string, not an object.

Try

new Ajax.Autocompleter(
  query, auto_suggest,
  include/suggest.php,
  { parameters: media_only=media_only  }
);

It would be very much neater if it did accept an object (and I fell
over this myself).

Colin

--~--~-~--~~~---~--~~
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] image load

2009-01-21 Thread Stucture_Ulf

Hello!

How do I check/read when an image is loaded ?. What I want to do is
that I want to wait to displaya div until the entire image is loaded.
Now, the div get's displayed as the code structure is loaded. Grateful
for tips.

--~--~-~--~~~---~--~~
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: image load

2009-01-21 Thread Pete Brown

Try defining an onload event for the image that does what you need

On Jan 21, 7:43 am, Stucture_Ulf maximilian.moulet...@gmail.com
wrote:
 Hello!

 How do I check/read when an image is loaded ?. What I want to do is
 that I want to wait to displaya div until the entire image is loaded.
 Now, the div get's displayed as the code structure is loaded. Grateful
 for tips.
--~--~-~--~~~---~--~~
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] Close Div when click outside

2009-01-21 Thread Dave L

I am trying to build my own select pull down menu that will close when
a click is observed outside of the pull down div, but I am having
trouble stopping the click event from triggering when the link to show
the pull down is clicked.  This is the relevant code:

a onclick=showSelect(); id=start_timeOpen Div/a

function showSelect() {
  if($('dropdown').style.visibility == visible) {
$('dropdown').style.visibility = hidden;
Event.stopObserving(document.body, 'click', new_obj.bfx);

  } else {
new_obj.bfx = new_obj.fx.bindAsEventListener(new_obj);
$('dropdown').style.visibility = visible;
Event.observe(document.body, 'click', new_obj.bfx);
//!!this click event is triggered right away when the link with
id=start_time is
//clicked.  I would like to remove this specific event somehow
  }
}

//this function is suppossed to close the div the page is clicked
anywhere but on the div
  var new_obj = { fx: function(){
$('dropdown').style.visibility = hidden;
}}

I would really appreciate any help or suggestions, I am pretty new to
prototype and this has me completely stumped.  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: Modifying prototypescriptaculous to work alongside jQuery

2009-01-21 Thread kangax

On Jan 21, 11:30 am, Phil W phi...@googlemail.com wrote:
 I suppose I could use jQuery UI as it wouldn't clash, but I'd like to
 stick with Scriptaculous as the code can be in onClick etc events
 rather than all specified in the head region.
[...]

I'm pretty sure simply replacing all occurrences of `$` with, say `_
$`, should work just fine. What exactly did you do last time and how
did it break?

--
kangax
--~--~-~--~~~---~--~~
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: Modifying prototypescriptaculous to work alongside jQuery

2009-01-21 Thread Tobie Langel

Why don't you just use jQuery's noConflict mode ?

On Jan 21, 11:28 pm, Phil W phi...@googlemail.com wrote:
 Thanks a lot for the response, I've gone through prototype.js,
 scriptaculous.js, builder.js, controls.js etc etc and replaced all
 instances of $ with _$.

 I've uploaded to my server, but now when I click on a link with a
 onClick scroll event handler (using a href=#
 onclick=Effect.ScrollTo('restofhomepage'); return false;read/a) I
 get this error:

 JavaScript -http://liverpoolstudentmedia.com/
 Event thread: click
 Error:
 name: ReferenceError
 message: Statement on line 1: Undefined variable: Effect
 Backtrace:
   Line 1 of function script
     Effect.ScrollTo('restofhomepage'); return false;
   ...
 stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have
 Stacktrace'

 Any ideas what is going wrong?

 Thanks,

 Phil

 On Jan 21, 5:16 pm, kangax kan...@gmail.com wrote:

  On Jan 21, 11:30 am, Phil W phi...@googlemail.com wrote: I suppose I 
  could use jQuery UI as it wouldn't clash, but I'd like to
   stick with Scriptaculous as the code can be in onClick etc events
   rather than all specified in the head region.

  [...]

  I'm pretty sure simply replacing all occurrences of `$` with, say `_
  $`, should work just fine. What exactly did you do last time and how
  did it break?

  --
  kangax
--~--~-~--~~~---~--~~
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: Modifying prototypescriptaculous to work alongside jQuery

2009-01-21 Thread Phil W

jQuery is used by my CMS, and I don't really want to mess around below
the hood of Drupal. Using noConflict would mean I'd have to change
Drupal's js code that uses jQuery to use the new variable and I don't
want to do that as it could cause errors if I don't do it perfectly,
and when I upgrade the CMS the changes will just be overwritten.

I'm hoping to find a way to modify scriptaculous and prototype so that
they behave as if they have their own noConflict mode, and that it was
activated.

Hope that's cleared things up. I wish it was that simple!

On Jan 21, 11:37 pm, Tobie Langel tobie.lan...@gmail.com wrote:
 Why don't you just use jQuery's noConflict mode ?

 On Jan 21, 11:28 pm, Phil W phi...@googlemail.com wrote:



  Thanks a lot for the response, I've gone through prototype.js,
  scriptaculous.js, builder.js, controls.js etc etc and replaced all
  instances of $ with _$.

  I've uploaded to my server, but now when I click on a link with a
  onClick scroll event handler (using a href=#
  onclick=Effect.ScrollTo('restofhomepage'); return false;read/a) I
  get this error:

  JavaScript -http://liverpoolstudentmedia.com/
  Event thread: click
  Error:
  name: ReferenceError
  message: Statement on line 1: Undefined variable: Effect
  Backtrace:
    Line 1 of function script
      Effect.ScrollTo('restofhomepage'); return false;
    ...
  stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have
  Stacktrace'

  Any ideas what is going wrong?

  Thanks,

  Phil

  On Jan 21, 5:16 pm, kangax kan...@gmail.com wrote:

   On Jan 21, 11:30 am, Phil W phi...@googlemail.com wrote: I suppose I 
   could use jQuery UI as it wouldn't clash, but I'd like to
stick with Scriptaculous as the code can be in onClick etc events
rather than all specified in the head region.

   [...]

   I'm pretty sure simply replacing all occurrences of `$` with, say `_
   $`, should work just fine. What exactly did you do last time and how
   did it break?

   --
   kangax
--~--~-~--~~~---~--~~
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] Element is null

2009-01-21 Thread n8cshaw

I am doing the following on one of my pages:

document.observe(dom:loaded, function() {
Event.observe('fm', 'submit', checkReqFields, false);
$('resetBtn').observe('click',resetForm);

#if(!$edit)
  initForm();
#else
  disableOther();
#end
  });

The line:

Event.observe('$formName', 'submit', checkReqFields, false);

is causing an element is null error on page load. If I remove that
line, I don't get the error. The form that is referenced exists, the
function checkReqFields exists and the script is located after the
HTML, so all of the elements should exist before it is executed.

I do something very similar on another page and it works fine. Any
ideas as to what is causing this problem?

--~--~-~--~~~---~--~~
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] help with autocompleter

2009-01-21 Thread eulerss

hi guys, i want to implement the autocomplete function with ajax, im
very new using prototype (i only know how to do dependent selects),
can you tell me some ideas? actually i have de database in mysql and i
want to use php for this, thanks in advance for your help

here is the simple code that i only know for selects:

script type=text/javascript
function OnChangeOrg() {

some vars definitions ...

var url = './file.php?var1=value1var2=value2, etc
etc
new Ajax.Request(
url,
{

method: 'get',

asynchronous: false,

onSuccess: function(transport) {

var = transport.responseText;


}

});


document.getElementById('id').innerHTML = 'select
optionSelect/option' + var +'/select';
/script


eulerss

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