[Proto-Scripty] Modal Dialog question...

2009-03-06 Thread Daniel Israel

Is there some sort of add-on or control out there that will make a  
modal dialog?  I've got an application where I want a dialog to pop up  
in the middle of the screen and allow the user to enter/edit data,  
then do something if the user clicks OK.  All the data (to populate  
the dialog's form) is already in the script, so I don't need to go to  
the server...

Any pointers appreciated...  I checked out prototype-UI, but unless  
I'm missing something, it doesn't exactly do that.

-D. Israel
d...@ebji.org
http://www.customcodebydan.com
AIM: JudoDanIzz

If a dozen smart, successful people who've achieved something great  
are all giving the same advice, take it.


--~--~-~--~~~---~--~~
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] nested method calls?

2009-03-06 Thread icarus.wings

i'm using the Function.wrap() method in a utility I am greating for my
company that does something similar to the prototype update helper,
but more specific to my companies needs.

we are in the middle of a big move from a very messy pile of copy and
pasted javascript functions to using prototype and I want to be able
to notify users when they are using a deprecated method from our old
codebase which i can easily do as per the update helper utility,

BUT, i also want to be able to distinguish between direct calls to a
method and nested calls to a method. because if i call a deprecated
method that has nested calls to another deprecated method I end up in
a loop and get all kinds of timeouts and 'too much recursion' errors.

with JS, how can i reliably tell if my deprecated method is being
called directly, or if it is being called from within another method?

appreciate any help with this.

--~--~-~--~~~---~--~~
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] Creating a Submit Button

2009-03-06 Thread Tommaso

I am having a problem creating a submit button with prototype in IE.

I use the following code:

button = new Element('button', {'type' : 'submit'});
form.insert(button)

unfortunately in IE if you make at button, and run the code

new Element('button', {'type' : 'submit'}).type

You always get button, not submit. Consequently none of my forms
submit in explorer. Am i doing something wrong? Thanks in advance for
the help.


--~--~-~--~~~---~--~~
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: Modal Dialog question...

2009-03-06 Thread Chris Sansom

At 10:25 -0800 5/3/09, Daniel Israel wrote:
Is there some sort of add-on or control out there that will make a 
modal dialog?  I've got an application where I want a dialog to pop 
up in the middle of the screen and allow the user to enter/edit 
data, then do something if the user clicks OK.  All the data (to 
populate the dialog's form) is already in the script, so I don't 
need to go to the server...

Any pointers appreciated...  I checked out prototype-UI, but unless 
I'm missing something, it doesn't exactly do that.

All I do, which is nothing specifically to do with prototype, is to 
have two divs, one which floods the window with an opacity 60% shade 
(and covers, thus disabling, any existing controls), and another with 
the dialog, which has a higher z-index. These divs are both hidden 
until required, then when the user clicks the button, link or 
whatever, they appear. When the user clicks OK or whatever to dismiss 
the dialog they're hidden again and the page is back to normal. I've 
taken to calling this a 'lightbox', and it's a very nice way to get 
away from popup windows.

http://www.londonbusinessforum.com/ - click any of those events, 
then click the 'Email this to a colleague' link on the right (try 
emailing it to yourself). Is this what you mean?

-- 
Cheers... Chris
Highway 57 Web Development -- http://highway57.co.uk/

A professor is one who talks in someone else's sleep.
-- W.H. Auden

--~--~-~--~~~---~--~~
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: Creating a Submit Button

2009-03-06 Thread Michael Hauptmann

Hi Tomaso,

The submit is a input element.

new Element('input', {'type' : 'submit'})

should work.

Miguel

Tommaso wrote:
 I am having a problem creating a submit button with prototype in IE.

 I use the following code:

 button = new Element('button', {'type' : 'submit'});
 form.insert(button)

 unfortunately in IE if you make at button, and run the code

 new Element('button', {'type' : 'submit'}).type

 You always get button, not submit. Consequently none of my forms
 submit in explorer. Am i doing something wrong? Thanks in advance for
 the help.


 


--~--~-~--~~~---~--~~
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: writeAttribute problem

2009-03-06 Thread Tobie Langel

 writeAttribute does not fix cross browser differences in the
 implementation of setAttribute.

How so? What's missing? File bugs! :)


 Feel free to recommend otherwise but I'd like to see some reasons why.

There's one simple reason: forward compatibility.

Prototype 2.0 will stop extending prototype's of HTMLElement,
therefore, using the dot property to set or retrieve attributes will
no longer work (that is, until getters and setters are supported in
all browsers).

On top of that, using a unified API is always a good thing. Premature
optimization isn't.

Best,

Tobie





--~--~-~--~~~---~--~~
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: Scriptaculous in Joomla

2009-03-06 Thread david

HI Doppelganger,

I think this is not a prototype/scriptaculous issue. Try the JOOMLA
support, I did not think you're the only one integrating P/S inside
JOOMLA.

--
david

On 1 mar, 00:49, doppelganger a.ak...@gmail.com wrote:
 HI,

 I am trying to install the Scriptaculous system in my Joomla website
 but all I see is the script code on my webpage. Even the examples do
 not work but only show up as code on the webpage. It states clearly in
 the instructions to include the code :

 script src=images/stories/javascripts/scriptaculousscripts/
 prototype.js type=text/javascript/script

 script src=images/stories/javascripts/scriptaculousscripts/
 scriptaculous.js type=text/javascript/script

 in the HEAD of the document but I have no idea how this is done...
 Sorry for the newbee questions...:-S

 Thanks for replying,

 Andreas
--~--~-~--~~~---~--~~
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: $$ failing in FF3.1b3

2009-03-06 Thread Jim Higson

On Thursday 05 March 2009 23:22:26 Tobie Langel wrote:
 Hi,

 Extending Object.prototype is regarded as a Bad Thing[1].

Does Prototype state anywhere that it doesn't work if Object.prototype is 
extended? If this is a stated limitation then fair enough I guess.

It seems like some parts of Prototype are designed to work with code that adds 
to Object.Prototype, for example in the Hash class we have:

get: function(key) {
  // simulating poorly supported hasOwnProperty
  if (this._object[key] !== Object.prototype[key])
return this._object[key];
},


 The main reason being that cross-browser support for hasOwnProperty is
 fairly recent (Safari 2 doesn't have it for example).

I didn't know that, thanks for the info. What happens if you use 
hasOwnProperty in Safari 2?

I don't have any usage statistics but I'd guess Safari 2 isn't used much now. 
According to Wikipedia the last version was 2.0.4, released 13th January 2006 
and was replaced with 3.0.0 on the 11th June 2007.


 [1] http://erik.eae.net/archives/2005/06/06/22.13.54/

 On Mar 5, 6:34 pm, Jim Higson j...@wikizzle.org wrote:
  On Thursday 05 March 2009 16:16:05 Jim Higson wrote:
   Hi,
  
   Is anybody else finding this? Does Prototype from git work with FF3.1?
 
  On closer inspection, it is quite easy to get Prototype to throw similar
  errors even in FF3. It just happens that my present code only provokes it
  in 3.1.
 
  For example here:http://users.ox.ac.uk/~admn2094/test.html
 
  Basically, writeAttribute tries to add an attribute called 'foo'
  somewhere with the value
  function foo(){ return @@ } and this fails because of the illegal @
  char.
 
  Are you not allowed to extend Object when using prototype? Prototype
  doesn't seem to do any hasOwnProperty checks:
 
  http://yuiblog.com/blog/2006/09/26/for-in-intrigue/
 
  File as a bug?
 
  --
  Jim
  my wiki ajaxification thing:http://wikizzle.org
  my blog:http://jimhigson.blogspot.com/

 
-- 
Jim
my wiki ajaxification thing: http://wikizzle.org
my blog: http://jimhigson.blogspot.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: Modal Dialog question...

2009-03-06 Thread Yevgeniy A. Viktorov

Hello,

If you looking for something a bit more specified, take a look also:
http://www.wildbit.com/labs/modalbox/
http://prototype-ui.com/ ( guess you already have this one, but just in
case :) )

Thanks.


Chris Sansom wrote:
 At 10:25 -0800 5/3/09, Daniel Israel wrote:
   
 Is there some sort of add-on or control out there that will make a 
 modal dialog?  I've got an application where I want a dialog to pop 
 up in the middle of the screen and allow the user to enter/edit 
 data, then do something if the user clicks OK.  All the data (to 
 populate the dialog's form) is already in the script, so I don't 
 need to go to the server...

 Any pointers appreciated...  I checked out prototype-UI, but unless 
 I'm missing something, it doesn't exactly do that.
 

 All I do, which is nothing specifically to do with prototype, is to 
 have two divs, one which floods the window with an opacity 60% shade 
 (and covers, thus disabling, any existing controls), and another with 
 the dialog, which has a higher z-index. These divs are both hidden 
 until required, then when the user clicks the button, link or 
 whatever, they appear. When the user clicks OK or whatever to dismiss 
 the dialog they're hidden again and the page is back to normal. I've 
 taken to calling this a 'lightbox', and it's a very nice way to get 
 away from popup windows.

 http://www.londonbusinessforum.com/ - click any of those events, 
 then click the 'Email this to a colleague' link on the right (try 
 emailing it to yourself). Is this what you mean?

   

--~--~-~--~~~---~--~~
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: Prototype with SVG

2009-03-06 Thread david

Hi marx,

I try to do the following:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://
www.w3.org/TR/xhtml1/DTD/...
html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:svg=http://www.w3.org/2000/svg;
  head
  script src=prototype.js type=text/javascript/script
  script src=scriptaculous.js type=text/javascript/script
  style type=text/css
  /style
  /head
  body
div id=test class=toto2/div
svg:svg width=600px height=400px style=display:block;
  svg:polygon id=triangle points=50,50 50,300 300,300 style=
fill:blue; stroke:black; class=toto /
/svg:svg

script type=text/javascript
  alert('HTML !!!');
  var _t=$('test');
  alert(_t.className);
  _t.addClassName('test2');
  alert(_t.className);
  alert('SVG !!!');
  var _t=$('triangle');
  alert(_t.className);
  _t.addClassName('test2');
  alert(_t.className);
/script
  /body
/html

and the addClassName method is working fine as you could see if you
test my poor exemple.
Try looking if the $('room'+num) return an element, and if it return
an element, look at its method.
If prototype method does not exist, try to extend your selected object
with prototype method.

--
david

On 28 fév, 22:02, marx fredmcken...@googlemail.com wrote:
 Hi all,
 I'm currently writing an application that displays a floor plan using
 SVG, embedded within an HTML div.
 I'm writing the javascript code to make the floor plan interactive,
 allowing you to select rooms etc. However I've hit a snag.
 I was writing a simple function to let me change a room's colour when
 it's clicked. I set up the CSS class I wanted to add to the element
 that was clicked, and created the onclick function, here's how it
 looked:

 function select_room(num) {

   index = selected.indexOf(num); // find the index of the room number
 in the array
   if (index  0) { // If the room number isn't in the selected array

           selected.push(num); // add the number to the array
           $('room'+num).addClassName(selected); // Use addClassName to add
 the selected class to the room

   } else { // If the room's already selected

           selected[index] = null; // remove the number from the array
           selected = selected.compact(); // Remove the null index from the
 array
           $('room'+num).removeClassName(selected); // Use removeClassName
 to remove the selected class.

   }

   $('selected').value = selected;

 }

 However, when the function ran, I got the error $
 ('room'+num).addClassName is not a function. After some head-
 scratching and a bit of debugging, I realised that $('room'+num) is
 returning an SVG element instead of an HTML element (as described in
 the API docs). Does this mean that the associated methods aren't
 available? Is there any workaround to make (at least the applicable
 ones) available?
 Many thanks,
 Mark
--~--~-~--~~~---~--~~
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.opacity issues

2009-03-06 Thread david

Hi Russ,

That is normal, defaul opacity is 1, so if you did not set the
opacity, when you first set visibility, the element is visible, and
when scriptaculous begin effect, it sets it to (near) 0, nand effect
end with the value 1 for opacity == fully visible.

--
david

On 28 fév, 09:14, Russell russell.pr...@au.knightfrank.com wrote:
 Hi There,

 First off let me say I am new to all of this, so if I sound a bit lost
 it is because I am :)

 I am trying to use the Effect.Opacity event to fade in a div when a
 user clicks the link. As this DIV sits in the main page, it's default
 state is hidden, so when clicking the link the DIV's visibility is
 changed to visible, and the effect.opacity fades in from 0 to 1.

 It does work, but the problem is after the DIV is set to visible, it
 appears, then the fade from 0 to 1 occurs, so it appears on the page,
 disapears and fades in.

 If i set the opacity to 0 by default, the above issue doesnt occur,
 but once the fade in from 0 to 1 occurs, it then resets back to 0. The
 code I am using on the link is;

 A HREF=# onclick=javascript:new Effect.Opacity('page2', { from: 0,
 to: 1 }); return truetest/a

 My CSS for that DIV is as follows, with this config the first issue
 occurs where the page appears, then disapears and fades in.

 div.page2
                  {
                  top: 50%;
                  left: 50%;
                  width: 900px;
                  height: 600px;
                  position:absolute;
                  margin-left:-450px;
                  margin-top: -300px;
                  text-align:center;
                  background-image:url('images/ladder.jpg');
                  background-repeat:no-repeat;
                  z-index:1;
                          visibility:hidden
                   }

 When the second issue occurs, fades in, then disapears, the CSS is as
 follows;

 div.page2
                  {
                  top: 50%;
                  left: 50%;
                  width: 900px;
                  height: 600px;
                  position:absolute;
                  margin-left:-450px;
                  margin-top: -300px;
                  text-align:center;
                  background-image:url('images/ladder.jpg');
                  background-repeat:no-repeat;
                  z-index:1;
                                  visibility:hidden
                  opacity:0;
                  filter:alpha(opacity=0);;

 }

 Any help would be greatly appreciated!!!

 Thanks

 Russ
--~--~-~--~~~---~--~~
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: Scrolling scripts and Named Anchor

2009-03-06 Thread david

Hi Jason,

could you explain what we have to do to find the error, I'm sorry I
did not understand the problem.
I just look at the site, but didn't find the problem !

--
david

On 27 fév, 21:38, jsun at 82 jasonta...@gmail.com wrote:
 I am trying to set up scrolling html boxes with the use of the
 wonderful prototype.js, slider.js, and scroller.js on a site I am
 creating for a friend.

 cccspringfield.org/about.php

 I have a side nav to link certain topics for a quick scroll.

 The anchored named links work but the html sroll box does not scroll
 with the anchor tag.

 Perhaps if someone had time to take a quick look they will see the
 problem. Is there something I could add to the javascript to fix this
 problem?

 Or, does anyone have any suggestions?

 I am more of a designer than a programmer so this is a bit out of my
 league here?

 Forever grateful,

 Jason
--~--~-~--~~~---~--~~
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: Sortable.create with dropzones / Event for Mousemoves

2009-03-06 Thread david

Hi Chris,

I did not see any problem in IE6, but I did not have your complete
code. I try to invent !!
please, give us a live test to see the problem.

--
david

On 27 fév, 07:54, Chris c...@clicksports.de wrote:
 Hi,

 I have some little problems with prototype/scripty.

 First I want to use a dropzone marker in a sortable (which is build
 with floating list elements), but didnt find any options for it. The
 patched version 
 athttp://tanrikut.blogspot.com/2007/06/scriptaculous-171-beta-3-repatch...,
 which is stated in the wiki is very old (Scritacolous 1.7, I currently
 use 1.8.1). Is there a easier way to go?

 Next I want to use a custom mouse cursor on ajax events. This is the
 custom code I use:

 document.observe('mousemove', setMouseCursor);

 // Ajax Responders
 Ajax.Responders.register({
         onCreate: function() {
                 if (!(Prototype.Browser.IE6 = Prototype.Browser.IE  parseInt
 (navigator.userAgent.substring(navigator.userAgent.indexOf(MSIE) +
 5)) == 6)) {
                         $(document.body).addClassName('ajax');
                         new Effect.Appear($('mousepointer'));
                 }
         },
         onComplete: function() {
                 if (!(Prototype.Browser.IE6 = Prototype.Browser.IE  parseInt
 (navigator.userAgent.substring(navigator.userAgent.indexOf(MSIE) +
 5)) == 6)) {
                         new Effect.Fade($('mousepointer'));
                         $(document.body).removeClassName('ajax');
                 }
         }

 });

 function setMouseCursor(e) {

         if(!(Prototype.Browser.IE6=Prototype.Browser.IE  parseInt
 (navigator.userAgent.substring (navigator.userAgent.indexOf(MSIE)+5))
 ==6))
         $('mousepointer').setStyle({
                 left: (e.pointerX() + 13) + 'px',
                 top: (e.pointerY() - 5) + 'px'
         });

 }

 At the moment, I insert a new element (with id of mousepointer), which
 is styled with css to hold a background image (sort of a regular ajax
 spinner), which gets positioned next to the mouse. While this works
 fine in IE8/IE7, Firefox, Safari and Opera, IE6 just flickers around
 (You get the Hourglass first, then the custom cursor in the
 background, but the Hourglass comes back).

 Is there a way to fix that flickering behaviour for IE6?

 Thank you in advance for your replies.

 Greetings,
 Chris
--~--~-~--~~~---~--~~
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: writeAttribute problem

2009-03-06 Thread RobG



On Mar 6, 8:16 pm, Tobie Langel tobie.lan...@gmail.com wrote:
  writeAttribute does not fix cross browser differences in the
  implementation of setAttribute.

 How so? What's missing? File bugs! :)

The differences are in the browsers' implementation of setAttribute,
For example, using setAttribute with any of the intrinsic event
handlers.


  Feel free to recommend otherwise but I'd like to see some reasons why.

 There's one simple reason: forward compatibility.

 Prototype 2.0 will stop extending prototype's of HTMLElement,
 therefore, using the dot property to set or retrieve attributes will
 no longer work (that is, until getters and setters are supported in
 all browsers).

You'll have to fill me in on that, I have no idea what is in version
2.0.  There is no mention of it on the Prototype.js web site (a search
on Prototype 2.0 returns no results)

Are you saying Prototype.js will go the way of jQuery and return an
object that has a reference to an element or elements as one of its
properties?  That means jQuery shaddows all the DOM methods (which I
guess Prototype.js already does quite a bit of).


 On top of that, using a unified API is always a good thing.

You said in a previous post:

 The only area where you should not be using writeAttribute is:
 - When you want to store anything but a string (use the new storage
 API or expandos directly).
 - For setting or getting the value attribute of Form elements (use
 FormElement#(get|set)Value instead).

So there are now 3 APIs - these two plus writeAttribute - when no API
is necessary at all.  I could count the use of observe too to replace
the buggy setAttribute('onclick', fn) in IE but that's probably going
too far. :-)

 Premature
 optimization isn't.

The fact that it is faster is a pleasant side effect of using the most
reliable, well supported method.  It is not the sole criterion.


--
Rob
--~--~-~--~~~---~--~~
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: Slider handleImage and handleDisabled usage

2009-03-06 Thread david

I spaceage,

I try to answer to your question, and look at the code, but can't find
the two variable name in the code :((
Are they reall used ??

--
david

On 1 mar, 20:37, spaceage davi...@mac.com wrote:
 Can anybody explain how to use this functionality?

 The wiki indicates:

     handleDisabled: The id of the image that represents the disabled
 handle. This is used to change the image src when the slider is
 disabled.

 (note usage of 'id'...)

 But the demo code reads:

     handleDisabled: 'images/vsliderhandle_gray.gif'

 not an id but rather a url.  I've tried doing this a bunch of
 different ways (url and id) and can't seem to get it to work.  Any
 suggestions?
--~--~-~--~~~---~--~~
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 correct the following code?

2009-03-06 Thread david

Hi SamuelXiao,

about the bind or bindAsEventListener method, it does not help in your
case.
Those two functions are used to force the value of 'this', but you are
not inside a class, and do not use 'this' inside the gotopreview
function.

I made testiung with given code, but there is some elements missing,
is it possible to have a live exemple to see the problem

--
david

On 2 mar, 14:11, SamuelXiao foolsmart2...@gmail.com wrote:
 My code is to preview webpages when user move mouse over a/a.  At
 the same time, my code has other parts using Prototype
 periodicalupdater.
 The following code can work well independently:

 // javascript preview program start
 var ci;
 var xPos,yPos;
 Event.observe(window,'load',function(){
         var elms = document.getElementsByClassName(toplink);
         Event.observe(elms[0],'mouseover',function(ev){gotopreview(ev,
 0);});
         Event.observe(elms[1],'mouseover',function(ev){gotopreview(ev,1);});
         Event.observe(elms[2],'mouseover',function(ev){gotopreview(ev,2);});
         Event.observe(elms[3],'mouseover',function(ev){gotopreview(ev,3);});

 });

  function gotopreview(event,ci){
     alert(ci);
         xPos = Event.pointerX(event);
         yPos = Event.pointerY(event);
         var getpostid=document.getElementsByName(targetpid);
         var getsid = document.getElementsByName(stdid);
         var url = getOnePost.php;
         var pars = stdid=+getsid[ci].value + targetpid= + getpostid
 [ci].value;

         var myajax = new Ajax.Request(url,{
                 method:'get',
             parameters: pars,
                 asynchronous: true,
                 onSuccess: function(transport){
                         $('previewWin').update(transport.responseText);
                         $('previewWin').style.top = parseInt(yPos) + 2 + px;
                         $('previewWin').style.left = parseInt(xPos) + 2 + 
 px;
                         $('previewWin').style.visibility = visible;
                         $('previewWin').onmouseout =function(){ $
 ('previewWin').style.visibility = hidden;}

                 }
         });}

 // javascript preview program end
 // The above code can work well independently.

 And my html page is link:
 html
 head
 /head
 body
 a class=toplink value=XX/a
 a class=toplink value=XX/a
 a class=toplink value=XX/a
 a class=toplink value=XX/a
 div id=previewWin/div
 /body
 /html

 But when it comes to work with the periodical updater, it seems that
 periodicalupdater send request first, breaking down the preview code
 setting new Ajax.Request.  And the object is no longer refering to the
 gotopreview function.

 The following is my periodical code,

 obj = new Object();
 obj.f1 = eventHandler;
 window.onload = obj.f1;
 window.onunload = function(){};

 function eventHandler(){
         postUpdater();

 }

 function postUpdater() {
         var myAjax = new Ajax.PeriodicalUpdater(
                 recentPost,
                 recentPost.php,
                 {
                         method: 'get',
                         frequency: 50
                 });

 }

 I use firebug to check the program and found that before I move mouse
 over the toplink anchor, the postUpdater() function will send
 request to the Sever thus, my preview code is no longer work.  I know
 that there is bind and bindAsListener function to bind the gotopreview
 function.  I tried but it's not work also, could some one help me or
 tell me how to modify the code to make it work?  Is there any way stop
 the periodicalUpdater when it is loaded?  Or if I must to use bind or
 bindAsListener, how to write it correctly in the above code?  Any help
 would be 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: nested method calls?

2009-03-06 Thread david

Hi icarus.wings,

Check the MDC doc about functions at :
https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/Function

and more particulary the caller property inherited from
Functions.prototype. It is flagged at non-standard, but work in IE
andd FF, and I think, but can't test, in all other browser. it permit
to now if a function is directly call or if it is called inside a
function.

for the use of the wrapper function, it could be interresting, but
depending on the number of deprecated method, it can be very long !!

--
david

On 6 mar, 05:07, icarus.wings absentee.landl...@gmail.com wrote:
 i'm using the Function.wrap() method in a utility I am greating for my
 company that does something similar to the prototype update helper,
 but more specific to my companies needs.

 we are in the middle of a big move from a very messy pile of copy and
 pasted javascript functions to using prototype and I want to be able
 to notify users when they are using a deprecated method from our old
 codebase which i can easily do as per the update helper utility,

 BUT, i also want to be able to distinguish between direct calls to a
 method and nested calls to a method. because if i call a deprecated
 method that has nested calls to another deprecated method I end up in
 a loop and get all kinds of timeouts and 'too much recursion' errors.

 with JS, how can i reliably tell if my deprecated method is being
 called directly, or if it is being called from within another method?

 appreciate any help with this.
--~--~-~--~~~---~--~~
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 Problems

2009-03-06 Thread david

Hi John,

your problem is as you say normal, because both effects take place at
the same time.
The Queue add does not resolve it because you miss the way to write
it:

new Effect.Appear('pkgSearchFormLoading', {  { queue: 'end' }  });
should be write:

new Effect.Appear('pkgSearchFormLoading', {queue: 'end'}); or
new Effect.Appear('pkgSearchFormLoading', {  queue:
{ position:'end' }  });

--
david

On 5 mar, 18:55, John McGowan j...@steakfest.com wrote:
 As I said in my last post, I'm brand new to Proto and Scripty.  I apologize
 a head of time for this newbie question.

 I was just testing out a simple little page that uses Ajax.Updater to get
 new content and drop it into a div.  It works just fine, over and over
 again, without trouble.

 However, when I add some Effects to the mix, eventually, the container div
 ends up getting hidden, when it shouldn't be... I'm a programmer, so I
 understand that there's probably some sort of race condition occuring.

 Here's an example of what I'm doing, these calls are in the onChange for a
 drop down on the main page.

 new Effect.Appear('pkgSearchFormLoading', {{ queue: 'end' }});
 new Effect.Fade('pkgSearchForm', {{ queue: 'end' }});
 new Ajax.Updater('pkgSearchForm', 'main.taf', {{ evalScripts: true, method:
 'get', parameters: {{live:'live',p:'9,4,1',PackageID:$F('pspkgid')}} }});

 on the page that gets loaded and dropped into the pkgSearchForm container,
 this following script is returned...

 new Effect.Fade('pkgSearchFormLoading', {{ queue: 'end' }});
 new Effect.Appear('pkgSearchForm', {{ queue: 'end' }});

 I started out without the queue stuff, but adding it didn't really change
 anything.

 I'm sure that what's happening is that the Appear that's supposed to execute
 when the Updater loads the html fragment is either not executing, or it's
 executing in parallel with the Fade from the original OnChange event on
 the main page.

 Could someone just point me in the right direction as to the best practice
 in doing this sort of thing.

 Thanks,
 John
--~--~-~--~~~---~--~~
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 Problems

2009-03-06 Thread John McGowan
Sorry, I didn't notice the double brackets when I pasted those in there...

The double brackets are necessary, because I've copied the code from an XSL
stylesheet.  The double brackets are there to escape the curly brackets.
What gets outputted by the XSL Transformation, and therefore sent to the
browser is a single pair of curly brackets.

So, if you take the code below and turn all those double curlies into single
curlies Should that be correct?  If so, I've still got a problem.

/John

On Fri, Mar 6, 2009 at 6:51 AM, david david.brill...@gmail.com wrote:


 Hi John,

 your problem is as you say normal, because both effects take place at
 the same time.
 The Queue add does not resolve it because you miss the way to write
 it:

 new Effect.Appear('pkgSearchFormLoading', {  { queue: 'end' }  });
 should be write:

 new Effect.Appear('pkgSearchFormLoading', {queue: 'end'}); or
 new Effect.Appear('pkgSearchFormLoading', {  queue:
 { position:'end' }  });

 --
 david

 On 5 mar, 18:55, John McGowan j...@steakfest.com wrote:
  As I said in my last post, I'm brand new to Proto and Scripty.  I
 apologize
  a head of time for this newbie question.
 
  I was just testing out a simple little page that uses Ajax.Updater to get
  new content and drop it into a div.  It works just fine, over and over
  again, without trouble.
 
  However, when I add some Effects to the mix, eventually, the container
 div
  ends up getting hidden, when it shouldn't be... I'm a programmer, so I
  understand that there's probably some sort of race condition occuring.
 
  Here's an example of what I'm doing, these calls are in the onChange
 for a
  drop down on the main page.
 
  new Effect.Appear('pkgSearchFormLoading', {{ queue: 'end' }});
  new Effect.Fade('pkgSearchForm', {{ queue: 'end' }});
  new Ajax.Updater('pkgSearchForm', 'main.taf', {{ evalScripts: true,
 method:
  'get', parameters: {{live:'live',p:'9,4,1',PackageID:$F('pspkgid')}}
 }});
 
  on the page that gets loaded and dropped into the pkgSearchForm
 container,
  this following script is returned...
 
  new Effect.Fade('pkgSearchFormLoading', {{ queue: 'end' }});
  new Effect.Appear('pkgSearchForm', {{ queue: 'end' }});
 
  I started out without the queue stuff, but adding it didn't really change
  anything.
 
  I'm sure that what's happening is that the Appear that's supposed to
 execute
  when the Updater loads the html fragment is either not executing, or it's
  executing in parallel with the Fade from the original OnChange event on
  the main page.
 
  Could someone just point me in the right direction as to the best
 practice
  in doing this sort of thing.
 
  Thanks,
  John
 



-- 
/John

--~--~-~--~~~---~--~~
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: Array.without() problem

2009-03-06 Thread ColinFine



On Mar 5, 5:24 pm, webbear1000 normpo...@hotmail.com wrote:
 Hey peeps!

 I'm sure I'm missing something obvious here but I can't for the life
 of me figure out what's going wrong.

 I'm trying to use Array.without() to get rid of a number from an array
 in the fourth line of my code.
 The trouble is, it returns an array with all instances of the index
 set to zero.

Array.without() removes values, not indexes.

Use delete history[index];

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] Re: Creating a Submit Button

2009-03-06 Thread ColinFine



On Mar 6, 10:05 am, Michael Hauptmann mhauptm...@gmail.com wrote:
 Hi Tomaso,

 The submit is a input element.

 new Element('input', {'type' : 'submit'})

 should work.

 Miguel


Hang on, Miguel

HTML has both input type='submit' and button type='submit', so
Tommaso's expectation is reasonable.

Flanagan (the O'Reilly Javascript, The Definitive Guide) does not
discuss the 'Button' object in the reference section, but refers the
reader to the 'Input' object: I took that at first to mean that JS
doesn't implement a 'Button' object separate from the 'Input' object,
but that can't be right: all the DOM reference sites certainly list
HTMLButtonObject as an interface.

So, I don't know what is going wrong, but I don't see why it shouldn't
work.

In the meantime, using an 'input' object might be easiest :-)
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] Re: Array.without() problem

2009-03-06 Thread Jerod Venema


 Use delete history[index];


If you're trying to remove elements from a history array (not an object),
you probably want history.splice(index,1), or your indexes are going to be
all out of whack.

Using splice will cause your history array to have a length of n-1
(which is what you're probably after), whereas the delete will cause the
array to have length n with an undefined value at your index.

If history is an object, then the delete will work fine.
-- 
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
919-368-5105

--~--~-~--~~~---~--~~
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: Creating a Submit Button

2009-03-06 Thread Michael Hauptmann
Hi Colin,

I wasn't aware about these details, but the last time I had this problem 
I could solve it by using an input element :-)
As many times... this problem finally is an IE issue, it's not about 
standards :-)

Regards,
Miguel

ColinFine wrote:

 On Mar 6, 10:05 am, Michael Hauptmannmhauptm...@gmail.com  wrote:

 Hi Tomaso,

 The submit is a input element.

 new Element('input', {'type' : 'submit'})

 should work.

 Miguel

  

 Hang on, Miguel

 HTML has bothinput type='submit'  andbutton type='submit', so
 Tommaso's expectation is reasonable.

 Flanagan (the O'Reilly Javascript, The Definitive Guide) does not
 discuss the 'Button' object in the reference section, but refers the
 reader to the 'Input' object: I took that at first to mean that JS
 doesn't implement a 'Button' object separate from the 'Input' object,
 but that can't be right: all the DOM reference sites certainly list
 HTMLButtonObject as an interface.

 So, I don't know what is going wrong, but I don't see why it shouldn't
 work.

 In the meantime, using an 'input' object might be easiest :-)
 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] Re: $$ failing in FF3.1b3

2009-03-06 Thread kangax

On Mar 6, 5:49 am, Jim Higson j...@wikizzle.org wrote:
 On Thursday 05 March 2009 23:22:26 Tobie Langel wrote:

  Hi,

  Extending Object.prototype is regarded as a Bad Thing[1].

 Does Prototype state anywhere that it doesn't work if Object.prototype is
 extended? If this is a stated limitation then fair enough I guess.

I think not, but probably should. Mind creating a ticket?


 It seems like some parts of Prototype are designed to work with code that adds
 to Object.Prototype, for example in the Hash class we have:

     get: function(key) {
       // simulating poorly supported hasOwnProperty
       if (this._object[key] !== Object.prototype[key])
         return this._object[key];
     },

Not exactly. The fact that it works with augmented
`Object.prototype` is only a consequence of another workaround :) The
check is there to return only user-defined keys; Even without
`Object.prototype` modification, you would get unexpected result when
querying for, say, `toString` on a new Hash instance:

$H({ foo: 1, bar: 2 }).get('toString');

It's possible that we'll introduce a custom `hasOwnProperty` in later
revisions.


  The main reason being that cross-browser support for hasOwnProperty is
  fairly recent (Safari 2 doesn't have it for example).

 I didn't know that, thanks for the info. What happens if you use
 hasOwnProperty in Safari 2?

Use as in try to call it? IIRC, you get hasOwnProperty is not a
function error. In other words, it simply doesn't exist : )


 I don't have any usage statistics but I'd guess Safari 2 isn't used much now.
 According to Wikipedia the last version was 2.0.4, released 13th January 2006
 and was replaced with 3.0.0 on the 11th June 2007.

Yeah, Safari 2 is pretty close to being out.

[...]

--
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] Simulating focus

2009-03-06 Thread Lee Jenkins


Hi all,

Assume that I have 2 div's which each contain appropriate content to resemble 
desktop forms with caption, min/max/close buttons, etc. and that they are 
overlapping on the same z-index.

If I click on the form that appears behind the first, it should come to the 
front.  My idea was to place them all on the same z-index and then use event 
listeners to switch them back from say z-index 1 to 2 and then back again.

Assuming that is the way to go, my real question concerns catching the right 
events without using unnecessary observers.  Since each div that represents a 
form will have constituent elements like INPUT's, SELECT's, etc, I need to 
translate a click on one of these as a notification that the form ( the div) 
it's contained within is also clicked on and should be brought to the forefront 
if it is not already.

Switching each form's z-index in a synchronized ways seems trivial enough, but 
I 
am uncertain of the best path to take to bubble the events up the form div or 
associate it with the form div.

Thanks for any suggestions,

--
Warm Regards,

Lee

--~--~-~--~~~---~--~~
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: Processing Ajax.updater response before updating container

2009-03-06 Thread Richard Quadling

Or you could fix the server side code to not output anything except
the actual data?

2009/3/6 John McGowan j...@steakfest.com:
 Thanks for the reply, but the issues is that I have no control over the
 debug output.  It's appended to the html response by the application
 server.  I want to avoid it getting anywhere near the dom.

 The other suggestion, of writing my own Ajax.Updater sounds like what I need
 to do.

 /John


 On Fri, Mar 6, 2009 at 7:45 AM, ColinFine colin.f...@pace.com wrote:



 On Mar 5, 3:55 pm, Steakfest j...@steakfest.com wrote:
  I just started using prototype and scriptalicous yesterday. I was able
  to get an Ajax update call working with very little effort.  Thanks to
  the community for such great documentation.
 
  In my framework, sometimes there is debugging information dumped at
  the bottom of the page. I would like to know what the easiest way to
  scrub that debug output would be with prototype.  My framework
  outputs a very unique string before the debug output. So, a simple
  substring-before would do the trick.
 
  Thanks in advance for any advice

 I have hardly any idea what you are asking, but if you mean you want
 to be able to hide the debug output, put it in a div of its own and
 just hide the div.

 Colin





 --
 /John

 




-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
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: Processing Ajax.updater response before updating container

2009-03-06 Thread Alex Mcauley

is it php thats generating the reposnse ..

If so you can just tell php to not output warnings ..

example:

ini_set('display_errors','0');

HTH
Alex

- Original Message - 
From: Richard Quadling rquadl...@googlemail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Friday, March 06, 2009 3:34 PM
Subject: [Proto-Scripty] Re: Processing Ajax.updater response before 
updating container



Or you could fix the server side code to not output anything except
the actual data?

2009/3/6 John McGowan j...@steakfest.com:
 Thanks for the reply, but the issues is that I have no control over the
 debug output. It's appended to the html response by the application
 server. I want to avoid it getting anywhere near the dom.

 The other suggestion, of writing my own Ajax.Updater sounds like what I 
 need
 to do.

 /John


 On Fri, Mar 6, 2009 at 7:45 AM, ColinFine colin.f...@pace.com wrote:



 On Mar 5, 3:55 pm, Steakfest j...@steakfest.com wrote:
  I just started using prototype and scriptalicous yesterday. I was able
  to get an Ajax update call working with very little effort. Thanks to
  the community for such great documentation.
 
  In my framework, sometimes there is debugging information dumped at
  the bottom of the page. I would like to know what the easiest way to
  scrub that debug output would be with prototype. My framework
  outputs a very unique string before the debug output. So, a simple
  substring-before would do the trick.
 
  Thanks in advance for any advice

 I have hardly any idea what you are asking, but if you mean you want
 to be able to hide the debug output, put it in a div of its own and
 just hide the div.

 Colin





 --
 /John

 




-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!




--~--~-~--~~~---~--~~
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: Simulating focus

2009-03-06 Thread Lee Jenkins

Lee Jenkins wrote:
 
 Hi all,
 
 Assume that I have 2 div's which each contain appropriate content to resemble 
 desktop forms with caption, min/max/close buttons, etc. and that they are 
 overlapping on the same z-index.
 
 If I click on the form that appears behind the first, it should come to the 
 front.  My idea was to place them all on the same z-index and then use event 
 listeners to switch them back from say z-index 1 to 2 and then back again.
 

I quick test confirms that the form (div) will receive a click event even if a 
child element was clicked.

Thanks,

--
Warm Regards,

Lee

--~--~-~--~~~---~--~~
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 by use HTTPS, Google Adwords and Prototype Ajax.(Periodical)Updater

2009-03-06 Thread Webhopper



On 4 Mrz., 16:14, disccomp discc...@gmail.com wrote:
 Are you loading Prototype from an https:// location? Like:


I use it lokal with relativ path :
..
new Ajax.PeriodicalUpdater('zitate', '/global/ajax/zitat.asp',   {...

http request are no problem, https let the browser chrash.
--~--~-~--~~~---~--~~
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: writeAttribute problem

2009-03-06 Thread Tobie Langel

Hi again, Rob.

I don't really want to argue over the benefits of attributes versus
expandos, just wanted to outline that they weren't the same thing
although the specs mandate a mapping of specified expandos to their
attribute counterpart for backwards compatibility with DOM 0.

It is also the case that IE never really figured out the difference
between attributes and expandos which has added to the confusion.

In short, attributes are attributes of the HTML element itself, thus
can only be used to store and retrieve strings (HTML cannot
distinguish types of attributes).

Expandos are properties of the DOM node (that is of the JS object
itself).

The expando to attribute mapping only works for attributes specified
in HTML 4.01 spec (also note that expando can be of all the primitive
JS types, not only string, and that those are also specified) so it
won't work for custom attributes.

To illustrate this, consider the following in Firefox:

 var div = $$('div')[0];
 div.setAttribute('value', 'foo');
 div.getAttribute('value');
foo
 div.value;
 typeof div.value;
undefined
 var clone = div.cloneNode(true);
 clone.getAttribute('value');
foo

 div = $$('div')[1];
 div.value = 'foo';
 div.getAttribute('value');
null
 div.value;
foo
 clone = div.cloneNode(true);
 clone.value;
 typeof clone.value
undefined

Of course, the behaviour is different in IE which shares the same
attribute object between cloned nodes(!).

Hope this clarifies the picture a bit.

Best,

Tobie





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

2009-03-06 Thread John McGowan
Update...
I thought about this a little bit, and I realized that there were 2
different contexts where I was creating the Effect objects.  One of them
required the double curlies, and the other should have been single curlies.
 The reason for the doubles was to stop the xsl processor from thinking that
the code was an Attribute Value Template.

Anyway, I went back and double checked, and also made sure the generated
source in the browser was good, and I think that was the problem.  I've been
clicking around, and the transitions seem to be queueing up just fine now.

Thanks!
John

On Fri, Mar 6, 2009 at 7:55 AM, John McGowan j...@steakfest.com wrote:

 Sorry, I didn't notice the double brackets when I pasted those in there...

 The double brackets are necessary, because I've copied the code from an XSL
 stylesheet.  The double brackets are there to escape the curly brackets.
 What gets outputted by the XSL Transformation, and therefore sent to the
 browser is a single pair of curly brackets.

 So, if you take the code below and turn all those double curlies into
 single curlies Should that be correct?  If so, I've still got a problem.

 /John


 On Fri, Mar 6, 2009 at 6:51 AM, david david.brill...@gmail.com wrote:


 Hi John,

 your problem is as you say normal, because both effects take place at
 the same time.
 The Queue add does not resolve it because you miss the way to write
 it:

 new Effect.Appear('pkgSearchFormLoading', {  { queue: 'end' }  });
 should be write:

 new Effect.Appear('pkgSearchFormLoading', {queue: 'end'}); or
 new Effect.Appear('pkgSearchFormLoading', {  queue:
 { position:'end' }  });

 --
 david

 On 5 mar, 18:55, John McGowan j...@steakfest.com wrote:
  As I said in my last post, I'm brand new to Proto and Scripty.  I
 apologize
  a head of time for this newbie question.
 
  I was just testing out a simple little page that uses Ajax.Updater to
 get
  new content and drop it into a div.  It works just fine, over and over
  again, without trouble.
 
  However, when I add some Effects to the mix, eventually, the container
 div
  ends up getting hidden, when it shouldn't be... I'm a programmer, so I
  understand that there's probably some sort of race condition occuring.
 
  Here's an example of what I'm doing, these calls are in the onChange
 for a
  drop down on the main page.
 
  new Effect.Appear('pkgSearchFormLoading', {{ queue: 'end' }});
  new Effect.Fade('pkgSearchForm', {{ queue: 'end' }});
  new Ajax.Updater('pkgSearchForm', 'main.taf', {{ evalScripts: true,
 method:
  'get', parameters: {{live:'live',p:'9,4,1',PackageID:$F('pspkgid')}}
 }});
 
  on the page that gets loaded and dropped into the pkgSearchForm
 container,
  this following script is returned...
 
  new Effect.Fade('pkgSearchFormLoading', {{ queue: 'end' }});
  new Effect.Appear('pkgSearchForm', {{ queue: 'end' }});
 
  I started out without the queue stuff, but adding it didn't really
 change
  anything.
 
  I'm sure that what's happening is that the Appear that's supposed to
 execute
  when the Updater loads the html fragment is either not executing, or
 it's
  executing in parallel with the Fade from the original OnChange event
 on
  the main page.
 
  Could someone just point me in the right direction as to the best
 practice
  in doing this sort of thing.
 
  Thanks,
  John
 



 --
 /John




-- 
/John

--~--~-~--~~~---~--~~
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: writeAttribute problem

2009-03-06 Thread kangax

On Mar 6, 7:07 am, RobG rg...@iinet.net.au wrote:
[...]
 The differences are in the browsers' implementation of setAttribute,
 For example, using setAttribute with any of the intrinsic event
 handlers.

Setting intrinsic event handlers was never supported, as far as I
remember, although some users did indeed try to set them and wondered
why it wouldn't work. As much as I'd hate to have another exception,
this deficiency should simply be stated in a documentation. From the
API perspective, it would probably be nice to have such support, but
realistically it's pretty much impossible to implement; When a string
is passed to `writeAttribute` it's practically impossible to tell
whether this string corresponds to an event attribute (and so a simple
property assignment should be performed). MSHTML, for example, defines
a great deal of non-standard proprietary events; other browsers
probably do the same thing. This rules out the possibility of some
kind of static hash table to perform a test against. Determining event-
like attributes by testing attribute name against /^on/ obviously
fails miserable when given a custom property of the same pattern (e.g.
on_myapp_started). Gotta love browser scripting...

I personally almost always use simple property assignment, because I
know what works and what doesn't; the speed benefits of `element.title
= 'foo'` vs. $(element).writeAttribute('title', 'foo') are quite
noticeable - no need to extend an element (that's O(N) in MSHTML), no
need to call a method, no need to perform testing/translation/mapping
inside that method, and so on and so forth.

But then I miss on unified API, of course : )
Oh well.

[...]

--
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] script.aculo.us compare Jquery UI

2009-03-06 Thread vtsuper

Today I read the JQuery UI 1.7 http://jqueryui.com/demos/
I found that their document is clear, their demo has been cover most
of the cases. For example Draggable, Droppable. It is really
convenient for the developer.

I remeber that about 1 to 2 years before, script.aculo.us has been
developed the same things already. So I goto read script.aculo.us.
Sadly I found many broken link. 
http://wiki.github.com/madrobby/scriptaculous/style-guide
the wiki always show javascript error in IE7, the numbers of demo is
few, it haven't cover most of the case. I can't see any improvement of
the website.

I support Prototype espically their OO style but it let me down again.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---