Re: [Proto-Scripty] FixComputerpProblemsSite Surely Knows How to Fix Computer Problems!

2011-06-07 Thread Alex McAuley
die();



From: Fixcomputerproblems Site 
Sent: Tuesday, June 07, 2011 2:18 PM
To: prototype-scriptaculous@googlegroups.com 
Subject: [Proto-Scripty] FixComputerpProblemsSite Surely Knows How to Fix 
Computer Problems!


I was having problems with my laptop before. Good thing 
FixComputerpProblemsSite helped me fix it. And they are really the experts when 
it comes to solving any computer related issues. They can easily fix computer 
problems without breaking a sweat. 

FixComputerProblemsSite expert computer technicians are very well trained to 
fix computer problems that we as computer users encounter in our PC.  They know 
how to properly diagnose the issues with computers and then give exact 
solutions for the said PC issues. They surely did know how to fix computer 
problems!

So if you need any help with your computer you can always count on 
FixComputerProblemsSite to fix computer problems that you can have with your PC.

To know more about FixComputerProblemsSite computer support services call 
1-888-216-6589 or log on to http://www.fixcomputerproblemssite.com


-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/MlFuOUlMaGJwdTBK.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-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.



Re: [Proto-Scripty] help for a newbie with Ajax.PeriodicUpdater

2011-03-24 Thread Alex McAuley
have you tried appending a random number to the end of the URL - it will 
bypass IE's cache and thus get pass the decay.


HTH

Alex

--
From: John johndobso...@gmail.com
Sent: Wednesday, March 23, 2011 6:15 PM
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] help for a newbie with Ajax.PeriodicUpdater


Hi

I need an 'advert rotator' for a new site I'm working on, the idea is
that a page load triggers an ajax event to periodically request random
new ad banners from a PHP process on the server. Everything works fine
on Firefox3.6.16, Chrome 10.0.6 etc bit not on IE RC either full
strength or compatibility mode (Works just once, wont fetch  another
ad).

I'm at a loss as where to start debugging this set-up. The js code I'm
using is minimal and is as follows:

Event.observe(window, 'load', adserve);

function adserve(){
   new Ajax.PeriodicalUpdater( 'advert', '/ajax/adserve.php', {
method: 'get',
frequency: 5,
decay: 1}
)
};

This is included in an 'adserve.js' file which is included in my HTML
using a script tag. Any assistance will be greatly appreciated.

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





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



Re: [Proto-Scripty] help for a newbie with Ajax.PeriodicUpdater

2011-03-24 Thread Alex McAuley

Or make it post


--
From: John johndobso...@gmail.com
Sent: Wednesday, March 23, 2011 6:15 PM
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] help for a newbie with Ajax.PeriodicUpdater


Hi

I need an 'advert rotator' for a new site I'm working on, the idea is
that a page load triggers an ajax event to periodically request random
new ad banners from a PHP process on the server. Everything works fine
on Firefox3.6.16, Chrome 10.0.6 etc bit not on IE RC either full
strength or compatibility mode (Works just once, wont fetch  another
ad).

I'm at a loss as where to start debugging this set-up. The js code I'm
using is minimal and is as follows:

Event.observe(window, 'load', adserve);

function adserve(){
   new Ajax.PeriodicalUpdater( 'advert', '/ajax/adserve.php', {
method: 'get',
frequency: 5,
decay: 1}
)
};

This is included in an 'adserve.js' file which is included in my HTML
using a script tag. Any assistance will be greatly appreciated.

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





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



Re: [Proto-Scripty] Autocompleter, URL on different domain

2011-01-24 Thread Alex McAuley

It's cross domain browser restrictions.

You either need to proxy it with a wrapper or look at some other cross 
browser workaround like JsonP


HTH


Alex Mcauley



- Original Message - 
From: 2ge opensubtit...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Sunday, January 23, 2011 9:14 PM
Subject: [Proto-Scripty] Autocompleter, URL on different domain



Hi all,

I stumbled into unexpected problem. I got high loaded site, so I want
put URL for response on different subdomain. Problem is, it is not
working, I see:

(Request-Line) OPTIONS /libs/suggest.php HTTP/1.1
Host suggest.mydomain.org
User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:
1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en,cs;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Connection keep-alive
Origin http://www.mydomain.org
Access-Control-Request-Method POST
Access-Control-Request-Headers x-prototype-version,x-requested-with

when I put in URL just path to the script it is working, when I put
there full domain, it is not working.

Working example:
var a_c = new Ajax.Autocompleter('search_text','ac','/libs/
suggest.php',...)

Not Working example:
var a_c = new Ajax.Autocompleter('search_text','ac','http://
suggest.mydomain.org/libs/suggest.php',...)

I am using latest version of Prototype and Scriptaculous.

Any help, or workaround ?

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-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.



Re: [Proto-Scripty] Re: Microsoft announced new useful plugins on JQuery - what about prototype?

2010-10-05 Thread Alex McAuley
I dont know whether to be happy or sad that Microsoft are adding things to 
jQuery... They have a tendancy to mess things up on a grand scale!



Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: T.J. Crowder t...@crowdersoftware.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, October 05, 2010 5:54 PM
Subject: [Proto-Scripty] Re: Microsoft announced new useful plugins on 
JQuery - what about prototype?



Hi,

Well, Prototype's had templates for years:
http://api.prototypejs.org/language/template/

It's true, though, jQuery is seeing a lot of investment and interest.
These three Microsoft plugins themselves aren't all that much to write
home about (though the globalization is exciting), but the _fact_ of
them coming on the heels of Microsoft's recently re-upping their
commitment to jQuery is significant.
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Oct 5, 3:52 pm, buda www...@pochta.ru wrote:

jQuery is developing very quickly. Unfortunately it must be noted that
this development forced to move to jQuery although I prefer the
prototype.

On 5 окт, 17:14, buda www...@pochta.ru wrote:



http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-da...

 This is very useful - this must be in prototype too!


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Using Prototype

2010-07-07 Thread Alex McAuley

My two pennies for what it's worth.

I used to use prototype in everything and I loved it for AJAX and DOM 
manipulation. I have since moved everything I do to jQuery because it serves 
my purposes more with it's live bindings and garbage collection. I also love 
jquery's $.fn methods to easilt create functions and classes.


I write extensive User Interface applications - one of them being an open 
source web desktop (which is the reason I ported to jQuery) being that the 
code was 400 lines rather than 2000+ in prototype (probably my code but 
never the less!!)


jQuery has lovely chaining abilities making manipulation nice and straight 
forward.


Most of the stuff I miss from prototype I hack around or just make do 
without.


I am not in anyway saying one is better than the other for overall general 
usage - I just find jQuery alot faster to develop with.


Alex Mcauley
http://www.thevacancymarket.com



- Original Message - 
From: joe t. thooke...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Wednesday, July 07, 2010 2:31 AM
Subject: [Proto-Scripty] Re: Using Prototype


Expanding somewhat on T.J.'s point, i definitely couldn't work without
Prototype's data management utilities (Enumerable, Object extensions,
etc).

i love jQuery's compactness and efficiency, but with almost no
attention to Javascript data, i'd rather sacrifice it's DOM efficiency
to have Prototype's data/object manipulation skills.

For lightweight websites that don't require a lot of local data
treatment, i'll use jQuery because it's fairly easy to get used to,
and compact. For anything where i'm retrieving server data or managing
data within the client for an app, i stick to Prototype, and i've
rarely had occasion for them to overlap.

Just my thoughts. It's not a blog, i know, but since you asked... :)
joe t.


On Jul 6, 12:39 am, P.J. pjfontil...@gmail.com wrote:

Thanks T.J. The Language section is definitely a prime example of an
area Prototype excels at where jQuery does little in. My aim is to use
both libraries in a manner that complements each other. Just looking
for positive reinforcement in that idea; looking for specific
strengths each library has.

On Jul 5, 2:15 am, T.J. Crowder t...@crowdersoftware.com wrote:

 Hi,

 Just generally speaking, but: If you go to the API reference[1], most
 things in the Language section fall into the category of things
 Prototype provides that jQuery doesn't. jQuery has $.each, but most of
 the other stuff in Prototype's Enumerable isn't in jQuery.

 I _think_ Prototype 1.7 (currently at RC2) has better support for
 querying the layout of elements than jQuery does -- for instance,
 finding out the current pixel value of an auto margin.

 [1]http://api.prototypejs.org/

 FWIW,
 --
 T.J. Crowder
 Independent Software Consultant
 tj / crowder software / comwww.crowdersoftware.com

 On Jul 4, 6:24 pm, P.J. pjfontil...@gmail.com wrote:

  Hi guys,

  First off, here's a reference I'd like you to read so you'll
  understand where I'm coming from.http://jqueryvsmootools.com/

  It's written by Aaron Newton and it's about jQuery and MooTools. Short
  and sweet, jQuery focuses on the DOM, and does a pretty good job with
  it; and MooTools focuses on the entire JavaScript language.

  Aaron's MooTools is my Prototype. I have a library that uses both
  jQuery and Prototype. I'm not using Scriptaculous as jQuery can handle
  most of the UI. I've been using Prototype to parse JSON and retrieve
  data from external sources, and always consider using it first when I
  come across something difficult to code. I have both in my library
  because I wanted to be able to use widgets for both, thus netting me a
  large variety of widgets and functionality from both camps.

  Should I be treating Prototype similar to how Aaron views MooTools? As
  an extension of the entire JavaScript language as a whole?

  Does anyone have any examples of situations where Prototype provides
  functionality that jQuery doesn't? Mainly, anything outside the UI.
  jQuery also supports JSON usage, but by using Prototype I can not only
  parse JSON but XML and other arbitrary data types as well. I wish to
  re-evaluate my decision to use both in one library, especially if one
  of my reasons was the usage of plugins from both camps and the other
  was that Prototype and jQuery serve different purposes.

  Please help me out, I always attempt to contribute my findings back to
  the community and would greatly appreciate 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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed

Re: [Proto-Scripty] Sorting some spans.

2010-07-02 Thread Alex McAuley
But richard... Font sizes and styles aside... the span with the largest 
amount of text will still be the widest and vice versa!!...


ABCDEFG is still wider than ABCDE no matter the font size!!

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Richard Quadling rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, July 01, 2010 11:57 PM
Subject: Re: [Proto-Scripty] Sorting some spans.


On 1 July 2010 21:28, Alex McAuley webmas...@thecarmarketplace.com 
wrote:
If I was tackling this I would attach a class and id to the spans and 
select
them all then find out all of the widths of each span as a number then 
sort
them into high to low / low to high then redraw them all .. Prolly not 
the

most efficient but it would work.

If you are using php you could do this without javascript based on strlen 
of
the text that sits in the span and sort() / usort() the array then loop 
it

...


The widths are dependent upon the font, size and styling being used,
not under my control.

The size of the display isn't under my control.

So all of this is done in realtime on the client. Chrome is WAY the
fastest in this and is not really noticeable.

IE and FF are quite slow, but I've not yet optimized the code.

So once the client has tidied the display, I know how many columns I
can have to fill.

The example I provided is dummy data and without the JS to do the calc.

I'm stuck on the algorithm for sorting the data the way I want. I can
see that I need to tag the spans if I want to sort them, but I can't
work out what the sort mechanics need to be.

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Sorting some spans.

2010-07-01 Thread Alex McAuley
If I was tackling this I would attach a class and id to the spans and select 
them all then find out all of the widths of each span as a number then sort 
them into high to low / low to high then redraw them all .. Prolly not the 
most efficient but it would work.


If you are using php you could do this without javascript based on strlen of 
the text that sits in the span and sort() / usort() the array then loop it 
...



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Richard Quadling rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, July 01, 2010 4:04 PM
Subject: [Proto-Scripty] Sorting some spans.



Hi.

I've got a div containing a set of spancheckboxlabel/span
sort of thing.

Using some CSS and JS I've got all the checkboxes to line up in a grid
and it all looks very nice.

The labels are from a DB and are ordered alphabetically.

But when rendered, the list reads across and then down, rather than
down and then across.

e.g.

a b c d
e f g h
i j k l

rather than

a d g j
b e h k
c f i l

The grid (via the JS) auto sizes the spans to equally space the
elements. The number of columns is determined by the maximum size of
the labels, the size of the container and the screen size. None of
which is under my control, and therefore I'll never know up front how
many columns.

So, with that, is there a way to reorder the spans so they read in
columns first.

I've got a static mockup at http://pastebin.com/Sb5A83wh

Any ideas?

Regards,

Richard.

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Ajax.Autocompleter

2010-06-29 Thread Alex McAuley
you need to return the value in realt time ... for example in the auto 
completer


'the_select_box_value' : function () {return 
$('the-select-box-id').value()},


Hope this helps

Alex Mcauley
http://www.thevacancymarket.com

- Original Message - 
From: maxarbos maxar...@yahoo.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, June 28, 2010 8:25 PM
Subject: [Proto-Scripty] Ajax.Autocompleter



Hello,

I am trying to use Autocompleter to search through different tables.
Hardcoding a specific table returns expected results from that table,
so the script is working as expected.

What i want to do is, use a select box with an 'onchange' event that
passes the chosen value to the Ajax.Autocompleter object. the value is
use to create a 'parameters: id=+xxx'  string that should be used in
the Ajax.Autocompleter object.



Here is what i have:

   window.onload = function() {
   var cat_id=88;
 ac = new Ajax.Autocompleter(sterm,
autocomplete_choices,
/Property/search/
ajaxAutoComplete,
 { parameters:
'sid='+cat_id }  );

 alert('The value of ac parameters is: ' +
ac.options.parameters + ' and options are: ' + ac.options.toSource() +
'.');
   }

   function startAutocomplete(obj) {
   ac.options.parameters='sid='+obj.value;
 alert('The value of  sid is: ' + ac.options.parameters
+  '.');
 document.searchForm.sterm.value='';
  }


and on my select box: onchange=startAutocomplete(this)

All the alert boxes are showing the correct information, but when I
type anything in the textfield to be 'autocompleted',  parameters:
'sid=88' is only being sent.
if i leave out the 'parameters: 'sid='+cat_id'  no parameters string
is sent at all.

Is there any way to change the value on the fly of the parameters
being sent?

I tried creating a new Ajax.Autocompleter onchange, but that only
created new ones ever time i changed the list but still keep the
original ones, so multiple instances of Ajax.Autocompleter were being
submitted.

Thanks.

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Need an enhanced select type control.

2010-06-29 Thread Alex McAuley

Here is a link of what it looks like as a screeny...

http://www.thevacancymarket.com/resources/includes/images/help/employer/Employer-Register-Part1.png

Look to the Recruiting In bit... (that example has a fixed width too but 
you dont need one - was for styling only)


Or here is a link of what it looks and feels like in a functional page.

http://www.thevacancymarket.com/register-company

Scroll down to Recruiting In



Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: Richard Quadling rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 3:39 PM
Subject: Re: [Proto-Scripty] Need an enhanced select type control.


On 29 June 2010 15:37, Alex McAuley webmas...@thecarmarketplace.com 
wrote:

I tackled a similar problem with checkboxes and a fixed height size div
containing them...

My list is 200+ checkboxes with labels and only 5 or so are displayed 
until

you scroll

perhaps somehting like this ?


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - From: Richard Quadling 
rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 3:00 PM
Subject: [Proto-Scripty] Need an enhanced select type control.



Hi.

I'm looking for an alternative to a select multiple box which allows
for checkboxes against a table of items.

Ideally, I'd like it to look like a select tag that is seen on IE and
FireFox (a droplist), that, when you click to expand the list, you get
the bigger page of items with checkboxes and an accept/reject or
ok/cancel button to close the box.

The list of items is currently at 80 and grows by 1 or 2 every month.

So the list needs to flow in a nice size grid. Some items are a LOT
longer than others. I don't always know the display size and some
users will be using a mobile device (iPhone).

The lack of a hold for more type key on a touch device leads me to
need a checkbox setup.

Plus, this allows me to show all the options on the screen at once in
a much easier fashion.

There will be multiple instances of the grid on the page, each with
different checkboxes selected.

A nice touch would be to have the collapsed element show ...

Item A, Item B, ...

sort of thing.

Anyway, anyone know of such a beast before I spend any time on this?

Regards,

Richard.

--
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : 
http://zend.com/zce.php?c=ZEND002498r=213474731

ZOPA : http://uk.zopa.com/member/RQuadling

--
You received this message because you are subscribed to the Google 
Groups

Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.




--
You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Sounds good. Essentially anything that doesn't require a keypress to
select multiple entries.

--
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Ajax.Autocompleter

2010-06-29 Thread Alex McAuley
I have never used the AutoCompleter so I am assuming that when the auto 
completer sends its data to the server that something in POST or GET is 
sid on the other end


The function...

function startAutocomplete(obj) {
var blah = $(the-selectbox).value(); // add this
ac.options.parameters='sid='+obj.value+'select-box-value='blah; // change 
this

alert('The value of sid is: ' + ac.options.parameters
+ '.');
document.searchForm.sterm.value='';
}



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: maxarbos maxar...@yahoo.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 3:48 PM
Subject: [Proto-Scripty] Re: Ajax.Autocompleter


I'm not really following where this is to be used.
Within the Ajax.Autocompleter, there are a number of options that i
could set, one of them was 'parameters'
Where would your code be placed?
Also, i wanted the text box to be cleared each time the select was
changed, that is another reason for the 'onchange' function i have.

What I have is working now,but would like to see how this version
performs as well.
thanks.


On Jun 29, 10:35 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:

All you needed to do was query the value of the select box each time the
AutoCompleter was triggered - the psudeo code I provided does just that ;)

Good luck
Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: maxarbos maxar...@yahoo.com
To: Prototype  script.aculo.us 
prototype-scriptaculous@googlegroups.com

Sent: Tuesday, June 29, 2010 2:48 PM
Subject: [Proto-Scripty] Re: Ajax.Autocompleter

That is what my funciton : onchange=startAutocomplete(this) is
doing, the issue is that the parameters option was not changing on
submission even though if i ran tests to view the value after the
'onchange' , the new value was there.
I found the callback function and used that with some help from here.

Thanks for the response.

On Jun 29, 9:39 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 you need to return the value in realt time ... for example in the auto
 completer

 'the_select_box_value' : function () {return
 $('the-select-box-id').value()},

 Hope this helps

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: maxarbos maxar...@yahoo.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Monday, June 28, 2010 8:25 PM
 Subject: [Proto-Scripty] Ajax.Autocompleter

  Hello,

  I am trying to use Autocompleter to search through different tables.
  Hardcoding a specific table returns expected results from that table,
  so the script is working as expected.

  What i want to do is, use a select box with an 'onchange' event that
  passes the chosen value to the Ajax.Autocompleter object. the value is
  use to create a 'parameters: id=+xxx' string that should be used in
  the Ajax.Autocompleter object.

  Here is what i have:

  window.onload = function() {
  var cat_id=88;
  ac = new Ajax.Autocompleter(sterm,
  autocomplete_choices,
  /Property/search/
  ajaxAutoComplete,
  { parameters:
  'sid='+cat_id } );

  alert('The value of ac parameters is: ' +
  ac.options.parameters + ' and options are: ' + ac.options.toSource() +
  '.');
  }

  function startAutocomplete(obj) {
  ac.options.parameters='sid='+obj.value;
  alert('The value of sid is: ' + ac.options.parameters
  + '.');
  document.searchForm.sterm.value='';
  }

  and on my select box: onchange=startAutocomplete(this)

  All the alert boxes are showing the correct information, but when I
  type anything in the textfield to be 'autocompleted', parameters:
  'sid=88' is only being sent.
  if i leave out the 'parameters: 'sid='+cat_id' no parameters string
  is sent at all.

  Is there any way to change the value on the fly of the parameters
  being sent?

  I tried creating a new Ajax.Autocompleter onchange, but that only
  created new ones ever time i changed the list but still keep the
  original ones, so multiple instances of Ajax.Autocompleter were being
  submitted.

  Thanks.

--
You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype

Re: [Proto-Scripty] Need an enhanced select type control.

2010-06-29 Thread Alex McAuley

Of course!!...

You will have to port the jQuery into prototype but it shouldnt be that hard 
... Let me know if you want an uncompressed version of it...




Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Richard Quadling rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 4:09 PM
Subject: Re: [Proto-Scripty] Need an enhanced select type control.


On 29 June 2010 15:43, Alex McAuley webmas...@thecarmarketplace.com 
wrote:

Here is a link of what it looks like as a screeny...

http://www.thevacancymarket.com/resources/includes/images/help/employer/Employer-Register-Part1.png

Look to the Recruiting In bit... (that example has a fixed width too 
but

you dont need one - was for styling only)

Or here is a link of what it looks and feels like in a functional page.

http://www.thevacancymarket.com/register-company

Scroll down to Recruiting In



Alex Mcauley
http://www.thevacancymarket.com


- Original Message - From: Richard Quadling 
rquadl...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 3:39 PM
Subject: Re: [Proto-Scripty] Need an enhanced select type control.



On 29 June 2010 15:37, Alex McAuley webmas...@thecarmarketplace.com
wrote:


I tackled a similar problem with checkboxes and a fixed height size div
containing them...

My list is 200+ checkboxes with labels and only 5 or so are displayed
until
you scroll

perhaps somehting like this ?


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - From: Richard Quadling
rquadl...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 29, 2010 3:00 PM
Subject: [Proto-Scripty] Need an enhanced select type control.



Hi.

I'm looking for an alternative to a select multiple box which allows
for checkboxes against a table of items.

Ideally, I'd like it to look like a select tag that is seen on IE and
FireFox (a droplist), that, when you click to expand the list, you get
the bigger page of items with checkboxes and an accept/reject or
ok/cancel button to close the box.

The list of items is currently at 80 and grows by 1 or 2 every month.

So the list needs to flow in a nice size grid. Some items are a LOT
longer than others. I don't always know the display size and some
users will be using a mobile device (iPhone).

The lack of a hold for more type key on a touch device leads me to
need a checkbox setup.

Plus, this allows me to show all the options on the screen at once in
a much easier fashion.

There will be multiple instances of the grid on the page, each with
different checkboxes selected.

A nice touch would be to have the collapsed element show ...

Item A, Item B, ...

sort of thing.

Anyway, anyone know of such a beast before I spend any time on this?

Regards,

Richard.

--
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer :
http://zend.com/zce.php?c=ZEND002498r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
You received this message because you are subscribed to the Google
Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.




--
You received this message because you are subscribed to the Google 
Groups

Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Sounds good. Essentially anything that doesn't require a keypress to
select multiple entries.

--
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : 
http://zend.com/zce.php?c=ZEND002498r=213474731

ZOPA : http://uk.zopa.com/member/RQuadling

--
You received this message because you are subscribed to the Google 
Groups

Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.




--
You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype

Re: [Proto-Scripty] Re: how to pass array to .php script?

2010-05-13 Thread Alex McAuley
After trying many methods I found that sending it s json to php and using 
php to json_decode it is the best way of moving arrays accross languages,


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: T.J. Crowder t...@crowdersoftware.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, May 13, 2010 7:25 AM
Subject: [Proto-Scripty] Re: how to pass array to .php script?


Hi,

This may not be it, but: PHP has special handling of arrays, which is
triggered by your using a field name ending with [].

So for instance, if you have this:

new Ajax.Request('/ajax/name_of_function.php', {
   parameters: {foo: [one, two, three]},
   method: 'post'
}

try doing this:

new Ajax.Request('/ajax/name_of_function.php', {
   parameters: {foo[]: [one, two, three]},
   method: 'post'
}

to tell PHP to apply its magic. (I've added [] after the field name.
Note the quotes; otherwise it would be a syntax error.)

If that's not it, I'd suggest creating a minimal self-contained test
page and posting that.[1]

[1] http://proto-scripty.wikidot.com/self-contained-test-page

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


On May 12, 10:02 pm, Max inverse...@gmail.com wrote:

Hi all.
I'm new in work with prototype. Please,help me.

I need to pass an array to the .php script. I'm using such code:

new Ajax.Request('/ajax/name_of_function.php', {
parameters: {name_of_perameter: name_of_array},
method: 'post',

But as a result I get in $_POST['name_of_perameter'] only the last
element of array.

Please, explain me - how I can do it correctly

Thanks

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Binding functions to $$ directly

2010-05-10 Thread Alex McAuley
Jquery also references this inside the function as the object / element 
clicked..



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Walter Lee Davis wa...@wdstudio.com

To: prototype-scriptaculous@googlegroups.com
Sent: Monday, May 10, 2010 3:55 PM
Subject: Re: [Proto-Scripty] Binding functions to $$ directly


jQuery conflates the meaning of $ and $$ in a useful manner, but 
Prototype provides the invoke function to shortcut what you are doing 
here.


$$('#div1 p span.someclassName').invoke('observe','click', function(el)
{
   alert('b');
});

To my mind, it's a little less magic and a lot more intentional. Note 
also in this case that where you have el, the reference is really to  the 
click event, so I would write this as function(evt) just to note  that. 
Prototype also scopes 'this' inside of your looped function, so  if you 
wanted to alert(this), you would get the individual span  element as your 
value.


Walter

On May 10, 2010, at 10:43 AM, Phonethics wrote:


How come I got to this

$$('#div1 p span.someclassName').each(function(el)
{
   Event.observe(el, 'click', function(event)
   {
   alert('a');
   });
});

instead of something like this ?

$$('#div1 p span.someclassName').observe('click', function(el)
{
   alert('b');
});

Any way to get the latter to work like in jQuery ?

--
You received this message because you are subscribed to the Google 
Groups Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptaculous@googlegroups.com .
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com .
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en .




--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: readAttribute problem

2010-05-10 Thread Alex McAuley

what about innerText()  || textContent();
?

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Yaz yasm...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, May 10, 2010 4:13 PM
Subject: [Proto-Scripty] Re: readAttribute problem


I can't believe something so simple would be so... unintuitive.

Walter you're right. And I'm an idiot. :)

-yaz

On May 10, 11:10 am, Walter Lee Davis wa...@wdstudio.com wrote:

Okay. $('tag').innerHTML.stripTags() will get you the inner text of
the A tag in most browsers. Not sure if it's completely available on
every browser supported by Prototype, but it should be fairly
consistent.

Walter

On May 10, 2010, at 11:01 AM, Walter Lee Davis wrote:



 $F is only for form elements. You can't use it on an A or another
 non-form text container, as the OP would like. You could try maybe
 tag.toString().stripTags() to get the inner text in a cross-browser
 manner.

 Walter

 On May 10, 2010, at 10:54 AM, Yaz wrote:

 You are trying to get the value of that tag, not an attribute.

 To do that, use these:

 $('tag'),getValue();

 Or its shortcut:

 $F('tag');

http://api.prototypejs.org/dom/form/element/getvalue/

 -yaz

 On May 10, 6:40 am, vtsuper vtsu...@gmail.com wrote:
 Dear sir,

 the following is the offical example of read attribute. But would
 you
 tell me how to make it return the text 'Prototype'?

 a id=tag href=/tags/prototype rel=tag title=view related
 bookmarks. my_widget=some info.Prototype/a

 $('tag').readAttribute('href');
 // - '/tags/prototype'
 $('tag').readAttribute('title');
 // - 'view related bookmarks.'
 $('tag').readAttribute('my_widget');
 // - 'some info.'

 I have try

 $('tag').readAttribute('text');
 // - 'null'
 $('tag').readAttribute(innerHTML);
 // - 'null'

 but both of them not work.

 --
 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 
 athttp://groups.google.com/group/prototype-scriptaculous?hl=en

 .

 --
 You received this message because you are subscribed to the Google
 Groups Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptaculous@googlegroups.com

 .
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com

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

 .

 --
 You received this message because you are subscribed to the Google
 Groups Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptaculous@googlegroups.com

 .
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com

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

 .

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables (position offset bugs)

2010-04-05 Thread Alex McAuley

I think you have a Z-index problem if i am using the App correctly...

Also draggables / droppables sometimes dont play nice in tables - this is in 
the docs!..



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Jeff C car...@gmail.com

To: prototype-scriptaculous@googlegroups.com
Sent: Sunday, April 04, 2010 3:37 PM
Subject: Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed 
Sortables (position offset bugs)




Alex,

The original link he provided works fine. If you click the link within
the original post (and not copy and paste it) it works.

http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/a115f3052223a3f0?hl=en

I also shorted the link that was originally provided to make sure it
is not cut off.

http://bit.ly/dBjELX

- J e f f  C o n k l i n -
- http://www.getoutsidenj.com
- http://twitter.com/GetOutsideNJ
- http://www.carabs.com



On Sun, Apr 4, 2010 at 10:25 AM, Alex McAuley
webmas...@thecarmarketplace.com wrote:

the link from your post
(http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...
) doesnt work dude..

Alex Mcauley

http://www.thevacancymarket.com


- Original Message - From: Martin mu.smartbri...@gmail.com
To: Prototype  script.aculo.us 
prototype-scriptaculous@googlegroups.com

Sent: Sunday, April 04, 2010 2:31 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed 
Sortables

(position offset bugs)


thanks for the link.

login works fine, for all i can see (logs, try myself etc.)

still hoping someone here can help.


On Apr 4, 9:09 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:


cant even login dude..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: Martin mu.smartbri...@gmail.com
To: Prototype  script.aculo.us
prototype-scriptaculous@googlegroups.com
Sent: Saturday, April 03, 2010 1:35 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed
Sortables

(position offset bugs)

Hi everyone,

well, I'm still stuck with this.
I guess this isn't the right place, but I am eager to get an offer if
anyone thinks they are capable of tweaking scriptaculous (or fixing
this in whatever way). Where can i find the prototype/scriptaculous
cracks that will dig into this for some $$?

Thanks, Martin

On Mar 28, 3:09 pm, Martin mu.smartbri...@gmail.com wrote:
 Hello,

 I have drag-snap-offset problems when dragging between Sortables.

 My application involves dragging people from the 'available employees
 list', on the right, to projects the person has applied for.
 (unavailable targets are dimmed on drag start.)

 Have a look at it here:


 -http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

 username: gg
 password: gg

 There seem to be 2 positioning bugs:

 1) scrolling the main window causes weird offsets between the dragged
 item and the snap-location in droppables.
 2) scrolling within the 'available employee list' (when many employees
 available) causes a similar problem.

 Things work well only if when both of these are scrolled all the way
 up!

 Note that the 'available employee list' has position:fixed and is
 draggable itself (grab at top) !

 So far, I have tried dragdropextra.js and o few other patching
 suggestions, without success :(

 Any help is greatly appreciated!

 --Martin

 I am using using the latest version of scriptaculous, 1.8.2 i think

 I have ghosting off, and i manually clone a person dragged out of the
 'available employees list' back into it if he or she is still
 available for other projects, among other caveats. I suppose i could
 turn ghosting on and deal with these things differently, if that helps
 solve the offset problem.

 the sortables are created on the fly (li onmouseover).

 Sortable.create() code snipplet:

 if(targets.length2) return;

 for(i=0;itargets.length;i++) {
 srtbls[i]=$(targets[i]);
 Sortable.create(targets[i],
 {dropOnEmpty:true,
 containment:targets,
 constraint:false,
 scroll:window,
 }
 );
 }
 li.style.cursor='move';

--
You received this message because you are subscribed to the Google 
Groups

Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.


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

Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables (position offset bugs)

2010-04-05 Thread Alex McAuley

Couple of other things that sometimes make browsers behave weirdly...

A couple or more of your tables and tr have id's with spaces in them..


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Martin mu.smartbri...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, April 05, 2010 1:53 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables 
(position offset bugs)



yep, draggables are only visible when over droppables, i have not been
able to figure out why...  z-index of draggable is way high enough..

i did experiment a little and found i have the same offset problems
without tables. nevertheless i will get rid of the tables  (i
inherited them from the former dev) in the next haul.


On Apr 5, 10:00 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:

I think you have a Z-index problem if i am using the App correctly...

Also draggables / droppables sometimes dont play nice in tables - this is 
in

the docs!..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: Jeff C car...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Sunday, April 04, 2010 3:37 PM
Subject: Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed
Sortables (position offset bugs)

 Alex,

 The original link he provided works fine. If you click the link within
 the original post (and not copy and paste it) it works.

http://groups.google.com/group/prototype-scriptaculous/browse_thread/...

 I also shorted the link that was originally provided to make sure it
 is not cut off.

http://bit.ly/dBjELX

 - J e f f C o n k l i n -
 -http://www.getoutsidenj.com
 -http://twitter.com/GetOutsideNJ
 -http://www.carabs.com

 On Sun, Apr 4, 2010 at 10:25 AM, Alex McAuley
 webmas...@thecarmarketplace.com wrote:
 the link from your post
 (http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...
 ) doesnt work dude..

 Alex Mcauley

http://www.thevacancymarket.com

 - Original Message - From: Martin mu.smartbri...@gmail.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Sunday, April 04, 2010 2:31 PM
 Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed
 Sortables
 (position offset bugs)

 thanks for the link.

 login works fine, for all i can see (logs, try myself etc.)

 still hoping someone here can help.

 On Apr 4, 9:09 am, Alex McAuley webmas...@thecarmarketplace.com
 wrote:

 cant even login dude..

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: Martin mu.smartbri...@gmail.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, April 03, 2010 1:35 PM
 Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed
 Sortables

 (position offset bugs)

 Hi everyone,

 well, I'm still stuck with this.
 I guess this isn't the right place, but I am eager to get an offer if
 anyone thinks they are capable of tweaking scriptaculous (or fixing
 this in whatever way). Where can i find the prototype/scriptaculous
 cracks that will dig into this for some $$?

 Thanks, Martin

 On Mar 28, 3:09 pm, Martin mu.smartbri...@gmail.com wrote:
  Hello,

  I have drag-snap-offset problems when dragging between Sortables.

  My application involves dragging people from the 'available 
  employees

  list', on the right, to projects the person has applied for.
  (unavailable targets are dimmed on drag start.)

  Have a look at it here:

  -http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

  username: gg
  password: gg

  There seem to be 2 positioning bugs:

  1) scrolling the main window causes weird offsets between the 
  dragged

  item and the snap-location in droppables.
  2) scrolling within the 'available employee list' (when many 
  employees

  available) causes a similar problem.

  Things work well only if when both of these are scrolled all the way
  up!

  Note that the 'available employee list' has position:fixed and is
  draggable itself (grab at top) !

  So far, I have tried dragdropextra.js and o few other patching
  suggestions, without success :(

  Any help is greatly appreciated!

  --Martin

  I am using using the latest version of scriptaculous, 1.8.2 i think

  I have ghosting off, and i manually clone a person dragged out of 
  the

  'available employees list' back into it if he or she is still
  available for other projects, among other caveats. I suppose i could
  turn ghosting on and deal with these things differently, if that 
  helps

  solve the offset problem.

  the sortables are created on the fly (li onmouseover).

  Sortable.create() code snipplet:

  if(targets.length2) return;

  for(i=0;itargets.length;i++) {
  srtbls[i]=$(targets[i]);
  Sortable.create(targets[i],
  {dropOnEmpty:true,
  containment:targets,
  constraint:false,
  scroll:window,
  }
  );
  }
  li.style.cursor='move';

 --
 You received

Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables (position offset bugs)

2010-04-05 Thread Alex McAuley
I also think its something to do with your fixed table - that allows you to 
scroll behind things ..


I do believe if you change the layout the problem will go away..

Alex Mcauley


http://www.thevacancymarket.com


- Original Message - 
From: Martin mu.smartbri...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, April 05, 2010 1:53 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables 
(position offset bugs)



yep, draggables are only visible when over droppables, i have not been
able to figure out why...  z-index of draggable is way high enough..

i did experiment a little and found i have the same offset problems
without tables. nevertheless i will get rid of the tables  (i
inherited them from the former dev) in the next haul.


On Apr 5, 10:00 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:

I think you have a Z-index problem if i am using the App correctly...

Also draggables / droppables sometimes dont play nice in tables - this is 
in

the docs!..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: Jeff C car...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Sunday, April 04, 2010 3:37 PM
Subject: Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed
Sortables (position offset bugs)

 Alex,

 The original link he provided works fine. If you click the link within
 the original post (and not copy and paste it) it works.

http://groups.google.com/group/prototype-scriptaculous/browse_thread/...

 I also shorted the link that was originally provided to make sure it
 is not cut off.

http://bit.ly/dBjELX

 - J e f f C o n k l i n -
 -http://www.getoutsidenj.com
 -http://twitter.com/GetOutsideNJ
 -http://www.carabs.com

 On Sun, Apr 4, 2010 at 10:25 AM, Alex McAuley
 webmas...@thecarmarketplace.com wrote:
 the link from your post
 (http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...
 ) doesnt work dude..

 Alex Mcauley

http://www.thevacancymarket.com

 - Original Message - From: Martin mu.smartbri...@gmail.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Sunday, April 04, 2010 2:31 PM
 Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed
 Sortables
 (position offset bugs)

 thanks for the link.

 login works fine, for all i can see (logs, try myself etc.)

 still hoping someone here can help.

 On Apr 4, 9:09 am, Alex McAuley webmas...@thecarmarketplace.com
 wrote:

 cant even login dude..

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: Martin mu.smartbri...@gmail.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, April 03, 2010 1:35 PM
 Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed
 Sortables

 (position offset bugs)

 Hi everyone,

 well, I'm still stuck with this.
 I guess this isn't the right place, but I am eager to get an offer if
 anyone thinks they are capable of tweaking scriptaculous (or fixing
 this in whatever way). Where can i find the prototype/scriptaculous
 cracks that will dig into this for some $$?

 Thanks, Martin

 On Mar 28, 3:09 pm, Martin mu.smartbri...@gmail.com wrote:
  Hello,

  I have drag-snap-offset problems when dragging between Sortables.

  My application involves dragging people from the 'available 
  employees

  list', on the right, to projects the person has applied for.
  (unavailable targets are dimmed on drag start.)

  Have a look at it here:

  -http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

  username: gg
  password: gg

  There seem to be 2 positioning bugs:

  1) scrolling the main window causes weird offsets between the 
  dragged

  item and the snap-location in droppables.
  2) scrolling within the 'available employee list' (when many 
  employees

  available) causes a similar problem.

  Things work well only if when both of these are scrolled all the way
  up!

  Note that the 'available employee list' has position:fixed and is
  draggable itself (grab at top) !

  So far, I have tried dragdropextra.js and o few other patching
  suggestions, without success :(

  Any help is greatly appreciated!

  --Martin

  I am using using the latest version of scriptaculous, 1.8.2 i think

  I have ghosting off, and i manually clone a person dragged out of 
  the

  'available employees list' back into it if he or she is still
  available for other projects, among other caveats. I suppose i could
  turn ghosting on and deal with these things differently, if that 
  helps

  solve the offset problem.

  the sortables are created on the fly (li onmouseover).

  Sortable.create() code snipplet:

  if(targets.length2) return;

  for(i=0;itargets.length;i++) {
  srtbls[i]=$(targets[i]);
  Sortable.create(targets[i],
  {dropOnEmpty:true,
  containment:targets,
  constraint:false,
  scroll:window,
  }
  );
  }
  li.style.cursor='move

Re: [Proto-Scripty] facebook leftcol links, how they work?

2010-04-04 Thread Alex McAuley

They do have on click events but they are delegated and not inline.


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: kuldeep kuldeep.rathor...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, April 02, 2010 8:40 PM
Subject: [Proto-Scripty] facebook leftcol links, how they work?



hi everyone,
I never understood how facebook left column links eg welcome,
newsfeeds and photos, how this things wont open in a new page beside
it open #link, do they have any server side check or client side
check . and second thing how they open whole page in content div, yes
you can do this with javascript but they don't have onclick event on
that it just a simple link that also without # how they convert this
with # link. It will be great help if you know this and help me out to
explain 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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables (position offset bugs)

2010-04-04 Thread Alex McAuley

cant even login dude..


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: Martin mu.smartbri...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, April 03, 2010 1:35 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables 
(position offset bugs)



Hi everyone,

well, I'm still stuck with this.
I guess this isn't the right place, but I am eager to get an offer if
anyone thinks they are capable of tweaking scriptaculous (or fixing
this in whatever way). Where can i find the prototype/scriptaculous
cracks that will dig into this for some $$?

Thanks, Martin

On Mar 28, 3:09 pm, Martin mu.smartbri...@gmail.com wrote:

Hello,

I have drag-snap-offset problems when dragging between Sortables.

My application involves dragging people from the 'available employees
list', on the right, to projects the person has applied for.
(unavailable targets are dimmed on drag start.)

Have a look at it here:

-http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

username: gg
password: gg

There seem to be 2 positioning bugs:

1) scrolling the main window causes weird offsets between the dragged
item and the snap-location in droppables.
2) scrolling within the 'available employee list' (when many employees
available) causes a similar problem.

Things work well only if when both of these are scrolled all the way
up!

Note that the 'available employee list' has position:fixed and is
draggable itself (grab at top) !

So far, I have tried dragdropextra.js and o few other patching
suggestions, without success :(

Any help is greatly appreciated!

--Martin

I am using using the latest version of scriptaculous, 1.8.2 i think

I have ghosting off, and i manually clone a person dragged out of the
'available employees list' back into it if he or she is still
available for other projects, among other caveats. I suppose i could
turn ghosting on and deal with these things differently, if that helps
solve the offset problem.

the sortables are created on the fly (li onmouseover).

Sortable.create() code snipplet:

if(targets.length2) return;

for(i=0;itargets.length;i++) {
srtbls[i]=$(targets[i]);
Sortable.create(targets[i],
{dropOnEmpty:true,
containment:targets,
constraint:false,
scroll:window,
}
);
}
li.style.cursor='move';


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables (position offset bugs)

2010-04-04 Thread Alex McAuley
the link from your post 
(http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

) doesnt work dude..

Alex Mcauley

http://www.thevacancymarket.com


- Original Message - 
From: Martin mu.smartbri...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Sunday, April 04, 2010 2:31 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed Sortables 
(position offset bugs)



thanks for the link.

login works fine, for all i can see (logs, try myself etc.)

still hoping someone here can help.


On Apr 4, 9:09 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:

cant even login dude..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: Martin mu.smartbri...@gmail.com
To: Prototype  script.aculo.us 
prototype-scriptaculous@googlegroups.com

Sent: Saturday, April 03, 2010 1:35 PM
Subject: [Proto-Scripty] Re: Dragging between fixed and non-fixed 
Sortables


(position offset bugs)

Hi everyone,

well, I'm still stuck with this.
I guess this isn't the right place, but I am eager to get an offer if
anyone thinks they are capable of tweaking scriptaculous (or fixing
this in whatever way). Where can i find the prototype/scriptaculous
cracks that will dig into this for some $$?

Thanks, Martin

On Mar 28, 3:09 pm, Martin mu.smartbri...@gmail.com wrote:
 Hello,

 I have drag-snap-offset problems when dragging between Sortables.

 My application involves dragging people from the 'available employees
 list', on the right, to projects the person has applied for.
 (unavailable targets are dimmed on drag start.)

 Have a look at it here:

 -http://www.qasmartbr.nine.ch/unico/smartbridge/hr/indexgrp.php?action...

 username: gg
 password: gg

 There seem to be 2 positioning bugs:

 1) scrolling the main window causes weird offsets between the dragged
 item and the snap-location in droppables.
 2) scrolling within the 'available employee list' (when many employees
 available) causes a similar problem.

 Things work well only if when both of these are scrolled all the way
 up!

 Note that the 'available employee list' has position:fixed and is
 draggable itself (grab at top) !

 So far, I have tried dragdropextra.js and o few other patching
 suggestions, without success :(

 Any help is greatly appreciated!

 --Martin

 I am using using the latest version of scriptaculous, 1.8.2 i think

 I have ghosting off, and i manually clone a person dragged out of the
 'available employees list' back into it if he or she is still
 available for other projects, among other caveats. I suppose i could
 turn ghosting on and deal with these things differently, if that helps
 solve the offset problem.

 the sortables are created on the fly (li onmouseover).

 Sortable.create() code snipplet:

 if(targets.length2) return;

 for(i=0;itargets.length;i++) {
 srtbls[i]=$(targets[i]);
 Sortable.create(targets[i],
 {dropOnEmpty:true,
 containment:targets,
 constraint:false,
 scroll:window,
 }
 );
 }
 li.style.cursor='move';

--
You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] IE8

2010-02-13 Thread Alex McAuley
you dont need the quote before hand ...

$('leftPane').style.height = '' + ((.99 *ah)-20 ) + 'px';  //this is line 16
 
into

$('leftPane').style.height = Math.round(( ( .99 * ah )  -20 )) + 'px';  
//this is line 16


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Saturday, February 13, 2010 12:20 PM
  Subject: [Proto-Scripty] IE8


  IE 8 chokes on line 16:
  line 16 is the line after var aw = window.innerWidth;

  script type=text/javascript
  function setsize()   { // adjust divs
  var ah = window.innerHeight ;
  //alert (Setsize - ah = + ah);

  var aw = window.innerWidth;
  $('leftPane').style.height = '' + ((.99 *ah)-20 ) + 'px';  //this is line 
16
  //document.getElementById(leftPane).style.height =  + ((.99 *ah)-20 ) + 
px;

  If I replace the prototype code with the getElementById line, I get the same 
error.

  the error message in the IE8 developer tools is Invalid argument
  The right side of the assignment is single quote, single quote ((

  Anyone see the problem ?
  This works fine in firefox

  bill


-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] IE8

2010-02-13 Thread Alex McAuley
alert(ah);
 
and try 0.99 instead of .99

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Saturday, February 13, 2010 1:32 PM
  Subject: Re: [Proto-Scripty] IE8


  On 2/13/2010 8:05 AM, Alex McAuley wrote: 
you dont need the quote before hand ...

$('leftPane').style.height = '' + ((.99 *ah)-20 ) + 'px';  //this is 
line 16
 
into

$('leftPane').style.height = Math.round(( ( .99 * ah )  -20 )) + 'px';  
//this is line 16




  I thought the quotes were needed to force the argument to be a string.
  But, it doesn't like your suggestion any better.  I still get invalid 
argument

  It is having trouble with this line:

  var ah = window.innerHeight ;

  I guess innerHeight is not  accepted by IE8

  so I switched to screen.availHeight - 30;  and it works, although it is not 
quite the same thing, at least it works


-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] SSL and Ajax.updater

2010-02-04 Thread Alex McAuley
anything relative to the page without a protocol inherits the protocol and the 
URL iirc ...


To test .. use firebug and make an ajax request on the page and see what the 
url ends up as..

HTH


Alex Mcauley
http://www.thevacancymarket.com

  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Thursday, February 04, 2010 11:46 AM
  Subject: [Proto-Scripty] SSL and Ajax.updater


  Please pardon if this is a duplicate, but after 24 hours it had not come back 
to my mailbox

  If I load a page using https and then update a div using Ajax.updater, is 
this transaction also encrypted if I use relative addressing, eg: no https://

  url = 'profile.php';
  new Ajax.Updater('replyPane',url );  // get the requested message
  or do I need to use the complete URL including the protocol ?


-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] SSL and Ajax.updater

2010-02-04 Thread Alex McAuley
Open firebug, click the console tab and u see the URLS when the request is 
made!..


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Thursday, February 04, 2010 3:48 PM
  Subject: Re: [Proto-Scripty] SSL and Ajax.updater


  On 2/4/2010 7:48 AM, Alex McAuley wrote: 
anything relative to the page without a protocol inherits the protocol and 
the URL iirc ...


To test .. use firebug and make an ajax request on the page and see what 
the url ends up as..

HTH

  thanks, I have firebug but don't know how to see the url.


-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Sortable: can I reject a drag?

2010-01-28 Thread Alex McAuley

Thats exactly what it does ...

Reverse your thinking approach ...

accept:'.only-this-class-name'


Will reject anything that doesnt have the class name ...

I.E

div class=folder another-classBlah/div
script
draggable code.(
accept: 'folder'

Would reject anything thats not a folder

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: boson...@gmail.com instructi...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Wednesday, January 27, 2010 9:02 PM
Subject: [Proto-Scripty] Re: Sortable: can I reject a drag?


really?  I don't see it... there's only but that only accepts a
classname...

is there no way to programmaticly dictate whether or not a container
will accept a sort?

On Jan 27, 1:26 pm, Alex McAuley webmas...@thecarmarketplace.com
wrote:

there is an accept flag you can set in the setup .. consult the
documentation its in there somewhere..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: boson...@gmail.com instructi...@gmail.com
To: Prototype  script.aculo.us 
prototype-scriptaculous@googlegroups.com

Sent: Wednesday, January 27, 2010 4:11 PM
Subject: [Proto-Scripty] Sortable: can I reject a drag?

 so this is my situation:

 I am making an online link/file directory application where library
 items are in library folders. I can have nested folders so basically
 I'm working with a tree.

 ie:
 folder
 -item
 -folder
 --item
 -item

 etc...

 Using Sortable.create I managed to make everything sortable and its
 all dandy and good BUT..

 I need to be able to reject certain things... mainly on the top level
 of the library there can't be any items, just folders... I can
 reorder those folders but the main node can't have items...

 how would i accomplish this via scriptaculous?

 --
 You received this message because you are subscribed to the Google 
 Groups

 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Sortable: can I reject a drag?

2010-01-27 Thread Alex McAuley
there is an accept flag you can set in the setup .. consult the 
documentation its in there somewhere..




Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: boson...@gmail.com instructi...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Wednesday, January 27, 2010 4:11 PM
Subject: [Proto-Scripty] Sortable: can I reject a drag?



so this is my situation:

I am making an online link/file directory application where library
items are in library folders.  I can have nested folders so basically
I'm working with a tree.

ie:
folder
-item
-folder
--item
-item


etc...

Using Sortable.create I managed to make everything sortable and its
all dandy and good BUT..

I need to be able to reject certain things... mainly on the top level
of the library there can't be any items, just folders...  I can
reorder those folders but the main node can't have items...

how would i accomplish this via scriptaculous?

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.





--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Prototype and Galleria.js

2010-01-12 Thread Alex McAuley

try assigning jquery to a new variable..

$j=jQuery.noConflict();

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Mike Santini dwarfthem...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, January 12, 2010 6:26 AM
Subject: [Proto-Scripty] Prototype and Galleria.js



Greetings,
I'm still new at this, but here is my problem.

I'm currently using prototype and script.aculo.us for animations on my
a website. I want to use galleria.js for an image gallery, but i can't
seem to get them to cooperate. I've used   jQuery.noConflict(); and my
animations run, but none of the galleria code wants to work.

I looked around and all I could find was was information about
protosafe.js, but nothing else. Has anyone here been able to get
galleria.js to work with prototype and script.aculo.us?

Thank you very much.








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Collecting checked checkboxes

2010-01-11 Thread Alex McAuley

I use something like this ..
var array=new Array();
$$('.myClassName').each(function(e){

if(($e).checked==true) {
array.push($(e).value);
}

});

where

input type=checkbox class=myClassName value=I am checked /


HTH

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Hussein B hubaghd...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, January 11, 2010 8:11 AM
Subject: [Proto-Scripty] Collecting checked checkboxes



Hey,
I have a checkbox in front of each row in my table.
Upon clicking on submit button, I want to collect the checked boxes
and send values via Ajax request.
How to iterate over the checked boxes?
Thanks for help and time.








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Question on performance and SEO optimization regarding javascript to create elements

2010-01-08 Thread Alex McAuley
Some SEO experts will argue that google for example will mark you down for 
hidden content in a page as it may think you are trying to trick the search 
engine and some will argue that it doesnt matter.


I personaly do not know which way is faster  but i prefer the Dom approach 
as it does not load any html until something triggers it to - which 
increases load time and doesnt put an element somewhere that amy be 
displayed for browsers that dont use css or javascript.




Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: kimbaudi kimba...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, January 08, 2010 6:50 AM
Subject: [Proto-Scripty] Question on performance and SEO optimization 
regarding javascript to create elements




Hi, I have come up with 2 ways to create a modal dialog. The first way
is to statically create the html with a style of display:none; and
using event handlers to show/hide the html.  The second way is to
dynamically create the html using Prototype (new Element(tagName[,
attributes]). Which way is better?  Is there an argument for using
one method over the other or does it really not matter? Thanks for
your opinion.








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Finding the first form item of any type within a div

2010-01-06 Thread Alex McAuley

$('mydiv').select('input','select')[0];



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Tony Andrews tony.andrew...@googlemail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, January 05, 2010 3:17 PM
Subject: [Proto-Scripty] Finding the first form item of any type within a 
div




I have already posted a question about this on StackOverflow here
(http://stackoverflow.com/questions/2006432/finding-the-first-
focusable-item-of-any-type-within-a-div) so I won't repeat the whole
thing.  My issue is that I want to select the first form item of any
type (input, select etc.) within a div.  When I try $('mydiv').select
('input', 'select') for example, it returns all the inputs, then all
the selects.  So the first item it returns is not necessarily the
first item in document order: if the first item is a select and the
scond is an input, it will return the second item first.  Any ideas?








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: prototype.js with jquery-1.3.2.min.js is not working.

2010-01-06 Thread Alex McAuley

You can also assign jquery to a different variable

$j=jQuery.noConflict();


then you can use 
$j(#some-id).somejQueryFunction().css().html().next().chain


and $ becomes unpolluted


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Mence olgaysa...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Wednesday, January 06, 2010 9:17 AM
Subject: [Proto-Scripty] Re: prototype.js with jquery-1.3.2.min.js is not 
working.




thank for your reply








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: How to highlight the current slide's number

2010-01-06 Thread Alex McAuley
If you have the element as an object then you can easily traverse anything 
surrounding it right up to document level...


i'll take a look at the code in a while and see if i can come up with 
anything


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: MH m.lawrencehu...@gmail.com

To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Wednesday, January 06, 2010 11:17 AM
Subject: [Proto-Scripty] Re: How to highlight the current slide's number


I found the onmouseclick actions and they appear as:

function setOnMouseClick() {
var elements = document.getElementsByTagName(a);
for (var i = 0; i  elements.length; i++) {
switch(elements[i].className) {
case next:
elements[i].onclick = function() {
imgs.nextImg();
return false;
}
break;
case prev:
elements[i].onclick = function() {
imgs.prevImg();
return false;
}
break;
case s0:
elements[i].onclick = function() {
imgs.showImg(0);
return false;
$(this).style=font-weight:bold;
}
break;


Because they are a href's, I've also styled them with css. The 1, 2, 3
are all in a div. Does this conflict with the above? I hope I could
either choose to do font-weight: bold; or background-color: etc;

Mike








On Jan 6, 8:52 pm, Alex McAuley webmas...@thecarmarketplace.com
wrote:
You can check the source code as the href's have a click handler and add a 
style to them or remove one ...


find the line that handles it and add $(this).style=

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: julien Devouassoud
To: prototype-scriptaculous@googlegroups.com
Sent: Wednesday, January 06, 2010 9:30 AM
Subject: Re: [Proto-Scripty] How to highlight the current slide's number

Well, for your 0,1,2,3 you have :

a class=s0 href=#0/a

just give an id to the element (ids are unique in a page, be carefull with 
that or it can bug if you got duplicate ids)


a class=s0 href=# id=maLink_00/a

and you can change it's style with

$(maLink_+number).setStyle(.);

if you want to reset style of previously modified element, don't forget to 
save the last changed id in a global variable (global vars ain't the best 
but easy code):


var lastHighlight = ;

function HL(id){
$(lastHighlight).setStyle(); // set style @ null resets style to waht it 
was previously i think

$(maLink_+id).setStyle(.);
}

2010/1/6 MH m.lawrencehu...@gmail.com

I would like to ask a question in relation to Takashi's old MudCorp
Image Gallery. I have implemented his gallery but would like to ask
how I can further add functionality to it.

www.mudcorporation.com/code/js/MudFadeGallery-2.2.1/

If you check the above page for the online gallery, you can click on:
1, 2, 3 to go to the direct slide. I want to know if you can highlight
the current slide with its slide number? So for example, if Slide 2
will come in, the number 2 will be highlighted - by css or css styled
into the .js file. Please 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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.


--

--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en.








--
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Wow, really new at this

2010-01-04 Thread Alex McAuley
Can you show us the observer that calls submitAJAX(id) ?


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: E emiliano.jor...@templatecascade.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, January 04, 2010 12:50 AM
Subject: [Proto-Scripty] Wow, really new at this


 Taking my first tentative steps in JavaScript and I have a stumbling
 block I can't get past.  I'm trying to submit an HTML form using the
 Ajax.Updater().  I have multiple versions of very similar forms on the
 same page and would like to seperate them by using a unique ID.

 My Javascript function is:

 function submitAJAX(id){
 var url = 'product_process.php';
 var price = escape($('products_price'+id));
 var price_w = escape($('products_price_w'+id));
 var pars = 'product=' + price + 'price=' + price + 'wprice=' +
 price_w;
 var target = 'output-div' + id;
 var myAjax = new Ajax.Updater(target, url, {method: 'get',
 parameters: pars});

 }


 The working part of my form looks something like this.

 form name=product_update117 action=products.php method=post
 input type=text name=products_price117 value=25.
 id=products_price117
 input type=text name=products_price_w117 value=12.5000
 id=products_price117

 /form


 I can't pull the values from product_update117 using what I am. But I
 need to somehow have multiple forms for multiple IDs created
 dynamically.  My whole approach might be wrong.  Or it just might be
 my inexperience with JavaScript. But after two days I can't figure it
 out.  I'm in the deep end.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Alex McAuley
You can comma up your classes in the observer...

$$('.test_1','.test_2','#some_id','.test_3').each(...
});


HTH
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, December 31, 2009 10:30 AM
Subject: Re: [Proto-Scripty] How can I observe elements with class=test_1, 
test_2, test_3 or first_test, second_test, third_test?


On jeudi 31 décembre 2009, kimbaudi wrote:

 Hi, I know how to observe elements with class=test. However, I would
 like to know how I would be able to observe elements with
 class=test_1, class=test_2 and class=test_3 or
 class=first_test, class=second_test and class=third_test. Here
 is my pastie url that observes elements with class=test and alerts
 the innerHTML of these elements: http://pastie.org/762352. Can someone
 please show me a code that will alert the innerHTML of elements that
 have classes test_1, test_2, test_3 and elements that have
 classes first_test, second_test, third_test? I am familiar w/
 Javascript to know that this is possible but unfamiliar w/ Javascript
 to know how to achieve this.

A simple-but-not-smart way is to parse all dom elements and observe all id
containting 'test'...

-- 
Frédéric

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Alex McAuley
RE. post 1.
http://pastie.org/762383

There is a pastie to show u how!..
Re post 2.

I don't want -you- to do anything. You are the one with the problem and you 
asked how to get round it - so i showed you. It is up to you how you write your 
scripts / html in a way that does not require you to have 1000 listeners. 

For a start having 1000 click listeners on a page will eat memory on the client

Secondly. If you have to have 1000 elements on a single page that require 
observers -I- would go back to thee drawing board and rethink my application.

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Paul Kim 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Thursday, December 31, 2009 11:10 AM
  Subject: Re: [Proto-Scripty] How can I observe elements with class=test_1, 
test_2, test_3 or first_test, second_test, third_test?


  That is a great solution if I have a few elements with class that starts with 
test_ or ends with _test. But what if I have 1,000 elements that start with 
test_ or ends with _test? Do you really want me to do this: $$(.'test_1', 
'test_2', ... 'test_1000') or $$('first_test', 'second_test', ... 
'onethousand_test')? 


  On Thu, Dec 31, 2009 at 2:37 AM, Alex McAuley 
webmas...@thecarmarketplace.com wrote:

You can comma up your classes in the observer...

$$('.test_1','.test_2','#some_id','.test_3').each(...
});


HTH
Alex Mcauley
http://www.thevacancymarket.com

- Original Message -
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, December 31, 2009 10:30 AM
Subject: Re: [Proto-Scripty] How can I observe elements with class=test_1,
test_2, test_3 or first_test, second_test, third_test?


On jeudi 31 décembre 2009, kimbaudi wrote:

 Hi, I know how to observe elements with class=test. However, I would
 like to know how I would be able to observe elements with
 class=test_1, class=test_2 and class=test_3 or
 class=first_test, class=second_test and class=third_test. Here
 is my pastie url that observes elements with class=test and alerts
 the innerHTML of these elements: http://pastie.org/762352. Can someone
 please show me a code that will alert the innerHTML of elements that
 have classes test_1, test_2, test_3 and elements that have
 classes first_test, second_test, third_test? I am familiar w/
 Javascript to know that this is possible but unfamiliar w/ Javascript
 to know how to achieve this.

A simple-but-not-smart way is to parse all dom elements and observe all id
containting 'test'...

--
   Frédéric

--

You received this message because you are subscribed to the Google Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread Alex McAuley
you can regex in your class with []

There is documentation on how to do so on the prototype api website

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Paul Kim 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Thursday, December 31, 2009 11:49 AM
  Subject: Re: [Proto-Scripty] How can I observe elements with class=test_1, 
test_2, test_3 or first_test, second_test, third_test?


  Sorry, I was just suggesting a hypothetical. I don't have 1000 listeners and 
I understand that doing so will eat memory on the client. I was hoping that 
there was a solution where I can find all the elements that have a class that 
starts with test_ and Javascript will be able to add an onclick observer to 
those elements. This way, I wouldn't have to know the elements that start with 
test_ ahead of time.


  On Thu, Dec 31, 2009 at 3:14 AM, Alex McAuley 
webmas...@thecarmarketplace.com wrote:

RE. post 1.
http://pastie.org/762383

There is a pastie to show u how!..
Re post 2.

I don't want -you- to do anything. You are the one with the problem and you 
asked how to get round it - so i showed you. It is up to you how you write your 
scripts / html in a way that does not require you to have 1000 listeners. 

For a start having 1000 click listeners on a page will eat memory on the 
client

Secondly. If you have to have 1000 elements on a single page that require 
observers -I- would go back to thee drawing board and rethink my application.

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Paul Kim 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Thursday, December 31, 2009 11:10 AM
  Subject: Re: [Proto-Scripty] How can I observe elements with 
class=test_1, test_2, test_3 or first_test, second_test, third_test?


  That is a great solution if I have a few elements with class that starts 
with test_ or ends with _test. But what if I have 1,000 elements that start 
with test_ or ends with _test? Do you really want me to do this: 
$$(.'test_1', 'test_2', ... 'test_1000') or $$('first_test', 'second_test', ... 
'onethousand_test')? 


  On Thu, Dec 31, 2009 at 2:37 AM, Alex McAuley 
webmas...@thecarmarketplace.com wrote:

You can comma up your classes in the observer...

$$('.test_1','.test_2','#some_id','.test_3').each(...
});


HTH
Alex Mcauley
http://www.thevacancymarket.com

- Original Message -
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, December 31, 2009 10:30 AM
Subject: Re: [Proto-Scripty] How can I observe elements with 
class=test_1,
test_2, test_3 or first_test, second_test, third_test?


On jeudi 31 décembre 2009, kimbaudi wrote:

 Hi, I know how to observe elements with class=test. However, I would
 like to know how I would be able to observe elements with
 class=test_1, class=test_2 and class=test_3 or
 class=first_test, class=second_test and class=third_test. Here
 is my pastie url that observes elements with class=test and alerts
 the innerHTML of these elements: http://pastie.org/762352. Can someone
 please show me a code that will alert the innerHTML of elements that
 have classes test_1, test_2, test_3 and elements that have
 classes first_test, second_test, third_test? I am familiar w/
 Javascript to know that this is possible but unfamiliar w/ Javascript
 to know how to achieve this.

A simple-but-not-smart way is to parse all dom elements and observe all 
id
containting 'test'...

--
   Frédéric

--

You received this message because you are subscribed to the Google 
Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google 
Groups Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr

Re: [Proto-Scripty] error showing for prototype.js

2009-12-28 Thread Alex McAuley
I highly doubt it ...

They probably require the 2 libs


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: julien Devouassoud 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Monday, December 28, 2009 11:08 AM
  Subject: Re: [Proto-Scripty] error showing for prototype.js


  Effects.js and controls.js ..?  is that supposed to replace the lightbox.js ?



  2009/12/24 mc mactal...@gmail.com

Hi, Using Prototype.js for lightbox perposes

I'm getting an error message on page load in IE8.0--

Line: 3974 Object doesn't support this property or method

The call stack shows: fireContentLoadedEvent(); fires : document.fire
(dom:loaded); next : return __method.apply(null, [this].concat($A
(arguments))); finally : element.fireEvent(event.eventType, event);

event.eventType = ondataavailable event = [object]

I am including the scripts in the following order and in the same
directory:

/js/prototype.js   /js/scriptaculous.js  /js/effects.js /js/
controls.js


Any help greatly appreciated.

Thanks, Mc.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Ajax.Request

2009-12-22 Thread Alex McAuley
If i recall correctly ...

Failure only gets called on a server error ... like a 404 ...

The failure may be due to a javascript error and would not return the alert 
if that was the case.

On the back  success only calls when the server has responded...

Ergo there are many things that can go wrong - i've listed a couple below

1. Transit. To/From the server
2. Server side scripts (will return whitespace upon an error - if error 
reporting is turned off) and this is still considered a success by 
javascript.

Also i noticed in the original post that you had asynchronous: true...

It is true by default so you can save a few bites there.

As TJ said in an earlier reply, You cannot return out of the Ajax request as 
it is run asyncronously with the page (meaning [in easy terms] you can 
execute alot of javascript at the same time as the request without locking 
the browser]). To perform what you want to achieve (if i'm getting what you 
want to do correctly) you should create a response handler ... something 
akin to

onSuccess : function(data) {
myHandler({data:data.responseText.evalJSON,vars:someotherVars});
}

...

function myHandler(options) {
var ReposnseData=options.data;
$('someElement').update(ResponseData);


}


Hope this helps...

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: Al C al.caug...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, December 22, 2009 2:29 PM
Subject: [Proto-Scripty] Re: Ajax.Request


I wrestled with asynchronous calls like you have (and quite honestly,
found the structure associated with the onSuccess/onFailure lead to
confusing code)

I eventually settled on using
   var myAjax = new Ajax.Updater( target, url, {method: 'post',
parameters: pars, evalScripts: true} );
(AFAIK, 'evalScripts: true' does not seem to work with Ajax.Request...
someone please corrected me if I'm wrong)

I then code within the url to generate the scripts that should be
spawned on success or failure (and I can set things so that the
scripts don't get called until all of the prerequisite bits are
available).  Depending on the nature of the calls/results, I
occasionally set the target to a hidden div.

Once I settled on this approach, I had carefully (re-)structure my
code so that calls cascaded properly... i.e., I found that on
occasion, the same functions were getting spawned from
differenturl's (meaning that the pages could regenerating things
unnecessarily).

Hope this helps,

Al

On Dec 20, 6:35 am, kangur91 kangu...@gmail.com wrote:
 My code:

 function get_data_default() {
 new Ajax.Request('/adress',
 {
 method:'post',
 asynchronous:true,
 onSuccess: function(data){ return data.responseText.evalJSON
 (true); },
 onFailure: function(){ alert('Something went wrong...') }
 });}

 }
 function show(){alert(get_data_default());}

 I want to function get_data_default return data recived from OnSucces
 function. How do that?

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Ajax.Request

2009-12-22 Thread Alex McAuley
An alternative i sometimes use is to set a timeout on a function to check 
within a period of time - usually a hidden input with the time of the 
request - checking it until its complete

That way i can know if anyting failed in the request and send it again if it 
did ...

each to their own !

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Walter Lee Davis wa...@wdstudio.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, December 22, 2009 3:54 PM
Subject: Re: [Proto-Scripty] Re: Ajax.Request


 This is an important thing to work on. If I know I will be using
 onError on the client side, I make sure that my Ajax endpoint on the
 server will return a real error header using PHP's header() method.

 You can also get very fancy with different error header codes, too,
 throwing a distinctly different error depending on the nature of that
 error, and then handling it in the Ajax callback using one of the
 onNNN methods instead of onError (which covers any error between 400
 and 5NN, IIRC).

 Walter

 On Dec 22, 2009, at 10:21 AM, Alex McAuley wrote:

 2. Server side scripts (will return whitespace upon an error - if
 error
 reporting is turned off) and this is still considered a success by
 javascript.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] sortable

2009-12-19 Thread Alex McAuley
in draggable there is a parameter handle witch if i recall correctly takes 
a classname...

SO add a classname to each image of the same name (img class=drag-me ... 
/ img class=drag-me  / )

In your draggable code
new Draggable('containerDiv),{
handle:'.drag-me'
// other options
}); //

untested but i dont see why not


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: wonderpix wonder...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, December 19, 2009 1:17 AM
Subject: [Proto-Scripty] sortable


 Hi

 Maybe this is a simple task, or maybe it is an impossible one, I dont
 know. But here it goes:

 Assume you have

 div id=containerDiv
 div id=div_1img src=arrow.gif a href=page.htmlpage/a/
 div
 div id=div_1img src=arrow.gif a href=page.htmlpage/a/
 div
 div id=div_1img src=arrow.gif a href=page.htmlpage/a/
 div
 /div

 I want the img tag to be the only draggable element. So when you are
 with the mouse over the image, it will be possibile to drag. But then
 ALL THE DIV should be dragged. Is that clear?

 I dont know how to do this. If I add the option tag: img to Sortable,
 it doesnt help. I then tried also to give the images an id, like
 img_1, img_2 and so on. Is this possible to solve?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Firefox's inline JS execution order

2009-12-16 Thread Alex McAuley
Why not attach the widget code to dom:ready

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: JoJo tokyot...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, December 15, 2009 8:57 PM
Subject: [Proto-Scripty] Firefox's inline JS execution order


 I'm creating a widget where I tell people to copy and paste this code
 onto their site:

   script type=text/javscript src=http://www.site.com/script.js;/
 script
   div class=widget/div

 Script.js looks for all the widget divs on the page by using $$ and
 dynamically fills them up.  Now, I'm not catering to nerd programmers
 who know that it's better to do this when they need to embed multiple
 widgets:

   head
  script
   /head
   body
  div class=widget/div
  div class=widget/div
  div class=widget/div
   /body

 Instead, I'm expecting stupid people to be doing this:

   body
  script
  div class=widget/div
  script
  div class=widget/div
  script
  div class=widget/div
   /body

 So I've tried to only execute my script once using:

   if (typeof(RAN_ONCE) === 'undefined') {
  RAN_ONCE = true;
  // minified Prototype code here
  // minified my widget code here
   }

 This code works well in IE, but not in FF. FF always reports an error
 saying $A is undefined. I'm guessing that FF actually ran my code in
 parellel and thus Prototype got redefined and screwed up?  Does anyone
 know how execution order is different in IE and FF with inline JS?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Issues selecting checkboxes in FF

2009-12-15 Thread Alex McAuley
iirc
$(element).checked==true;


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Rick.Wellman rick.well...@kiewit.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, December 15, 2009 8:26 PM
Subject: RE: [Proto-Scripty] Issues selecting checkboxes in FF


 Um,... I am pretty sure if you see that a checkbox is checked then it is
 checked.  You gotta suspect your validation code ('cause it sounds like
 your validation code is checking a group of checkboxes to make sure that
 at least one is checked).

 -Original Message-
 From: prototype-scriptaculous@googlegroups.com
 [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of
 smartcookie
 Sent: Tuesday, December 15, 2009 2:18 PM
 To: Prototype  script.aculo.us
 Subject: [Proto-Scripty] Issues selecting checkboxes in FF

 Hey there:

 Does anyone know a good way to programmably select or click on a
 checkbox input in FF?

 I have tried :
 el.down('input').checked = 'checked';

 and
 el.down('input').onclick();

 In the first code, I can see the checkboxes being checked, but when I
 submit, my error validation alerts that nothing is selected...

 Does anyone know another method..

 Thanks

 --

 You received this message because you are subscribed to the Google
 Groups Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Uploading an image with Ajax.request

2009-12-13 Thread Alex McAuley
You cannot access binary data with javascript - it is server side only - Ergo 
you cannot upload files with Ajax style comms.

Post to an Iframe to get round this or use flash uploaders (there are many) to 
interact directly to the client.

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Vladimir Tkach 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Sunday, December 13, 2009 1:58 PM
  Subject: Re: [Proto-Scripty] Uploading an image with Ajax.request


  Like this one solution:
  http://github.com/markcatley/responds_to_parent


  2009/12/12 Andy Daykin daykina...@gmail.com

Hello,

I was wondering if this is possible to do:

I want to upload an image using Ajax.request like such:

var form = $('addimage');
 new Ajax.Request('http://myurl.com/uploadImage.php', {
method: 'post',
parameters: { image: $(form['image']).getValue() }
 }

So far I haven't been able to access the image with php, I have been using 
$_FILES['file']['name'] to try and access the image, but I can't get it.

Do I have to use an iframe for this, or will it work somehow using 
Ajax.request and trying to get the file in the form?

Thanks,

-Andy Daykin

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




  -- 
  Best Regards, 
  Vladimir Tkach

  +972-54-7574166
  tea...@gmail.com

  http://teamco-anthill.blogspot.com/

  
http://www.google.com/search?q=teamco-anthillpov=113485037116411478549usg=__MJmWqpqtgaTxQA8ZMBvE3etiB1Q=


  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Progressive update messages from single request

2009-12-13 Thread Alex McAuley
Joe.

Certainly in winblows the output buffering may not work due to the modules 
and the way memory is managed in winblows differs to *nix.

I have tested it on CentOs, Debian, BSD, HP UNIX,Solaris and it works fine 
but not tested it on Wamp...


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: joe t. thooke...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Sunday, December 13, 2009 12:49 AM
Subject: [Proto-Scripty] Re: Progressive update messages from single request


My crude-imentary tests are on my Win7 laptop using Wamp, which means
mod_deflate. Work server is Cent, but i don't know whether it's got
any compression modules enabled (i've tried with the admin, he
slacks).
-joe t.


On Dec 12, 4:17 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 Joe.

 Are you using ob_gz_handler(); or mod_defalte / mod_gzip ?

 Also is it a winblows or *nix server

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: joe t. thooke...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, December 12, 2009 2:24 AM
 Subject: [Proto-Scripty] Re: Progressive update messages from single 
 request

 Alex,
 Thanks for the sample. i must be missing a piece somewhere 
 though...http://pastie.org/739926

 From that single Ajax.Request, the client delays, and after the PHP is
 done running, i get the complete output in one block. What i'd
 anticipated was that in each loop, the flush() would somehow send that
 output to the client where it could be used, then the next loop's
 flush would send another output to the client...

 If i'm understanding it, Ajax is a single-request-single-response. i
 can't output the current step a process is in as it happens. i can
 accumulate them, as your model shows, and dump that out as a log, of
 sorts. But in order to monitor progress of one request's processing on
 the server, a series of follow-ups have to get feedback which the
 original is providing on the side (as T.J. recommended).

 Unless i'm missing something, which would be great if you could help
 me fill that in. :)
 -joe t.

 On Dec 11, 3:29 am, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
  in your ajax request file

  ?php
  ini_set('output_buffering',0); // make sure the output_buffering 
  directive
  is not set high
  ob_start(); // before anything is echoed to the screen

  for($i=0;$i10;$i++)
  {
  echo('liPrinting Line '.$i.'/li');
  ob_flush();
  flush();

  sleep(1); // sleep for one second

  }

  ?
  this will output a line every second for 10 seconds

  Hope this helps

  P.S if you use ob_gz_handler this may not work (untested using it)

  Alex Mcauleyhttp://www.thevacancymarket.com

  - Original Message -
  From: joe t. thooke...@gmail.com
  To: Prototype  script.aculo.us
  prototype-scriptaculous@googlegroups.com
  Sent: Friday, December 11, 2009 1:00 AM
  Subject: [Proto-Scripty] Re: Progressive update messages from single
  request

  david:
  The buffer/flush path seems to be where this solution is heading.
  Don't ask me why, but iframes rub me the wrong way. With the evolving
  needs for more streamlined connections, iframes feel like soggy
  bandaids to me. Given they have a place where nothing else seems to
  work (Ajax-ish file uploads), but i'd prefer to steer away from them
  in this case if i can.

  TJ:
  That seems like a fairly solid idea. Same general concept of having a
  second request object checking in on progress that the server reports
  back, it just gets it from a relatively more reliable source (instead
  of $_SESSION).

  Alex:
  Could you elaborate a bit, or point me to where i can follow up on
  that? i'm intrigued, but i'm not deeply familiar with using the output
  buffer effectively.

  Thanks for the replies!
  -joe t.

  On Dec 10, 3:45 am, Alex McAuley webmas...@thecarmarketplace.com
  wrote:
   I noticed you were using PHP on the server side ... you can also use
   output
   buffering to achieve this in one request

   Alex Mcauleyhttp://www.thevacancymarket.com

   - Original Message -
   From: T.J. Crowder t...@crowdersoftware.com
   To: Prototype  script.aculo.us
   prototype-scriptaculous@googlegroups.com
   Sent: Thursday, December 10, 2009 8:38 AM
   Subject: [Proto-Scripty] Re: Progressive update messages from single
   request

   Hi Joe,

   It seems to me the simple way to do this is have the first request
   initiate a process on the server that keeps running when the request
   completes; the request returns an indicator of the current status and
   an identifier for the action.

   Your subsequent requests supply the identifer, which allows the 
   server-
   side page to check the progress of the ongoing work matching that ID
   and report back the (new) status.

   People use things like this for showing progress bars for file uploads
   without using Flash, that kind of thing.

   HTH

Re: [Proto-Scripty] Re: Autocompleter does not work in FireFox 3.5.5

2009-12-13 Thread Alex McAuley
Everyone seems to have missed a solid point on this ...


The scripts are loded localhost:4402

and the server= localhost:8080

Thats an XDR as the ports differ ...

Perhaps 3.5.5 has some different security protocol in place that wont allow 
it but earlier did



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: joe t. thooke...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Sunday, December 13, 2009 1:49 AM
Subject: [Proto-Scripty] Re: Autocompleter does not work in FireFox 3.5.5


U, right, sure, yeah, of COURSE i saw that... (didn't).

i tend to agree with you on [not] placing the active script block at
the end of the document and trusting it to work 100% of the time. Like
you, i haven't seen any hard data on why NOT to, but just don't fully
trust it.

i don't see any obvious reason the script would be failing. Tracing
back #clearWhitespace from Prototype, it only occurs in Autocompleter
in the #onComplete callback. i don't use the class that much, so i'm
not the best one to ask. i just happened across your initial response
in my digest email. :O

Sorry i couldn't be more help on this one.
-joe t.



On Dec 12, 6:05 am, T.J. Crowder t...@crowdersoftware.com wrote:
  Just tossing in: Alternately, the script block that has the active
  part can be placed at the end of the document, so the DOM elements are
  loaded by the time the browser reaches that script tag.

 I've never been comfortable relying on that. I've heard people say it,
 some of them even people who seem like they know what they're doing,
 but I've never been comfortable *relying* on it. I really should find
 (or do) some really robust tests, probably a point of ignorance for
 me.

 Good catch that his script block *is* at the end. If you can count on
 elements being in place at that point, any idea why it's failing?

 -- T.J.

 On Dec 12, 2:00 am, joe t. thooke...@gmail.com wrote:

   Always makes me eager to jump in and spend my time helping. ;-)

  Nice.

  Just tossing in: Alternately, the script block that has the active
  part can be placed at the end of the document, so the DOM elements are
  loaded by the time the browser reaches that script tag. You knew
  that, but OP maybe didn't.
  -joe t.

  On Dec 11, 11:02 am, T.J. Crowder t...@crowdersoftware.com wrote:

   Hi,

I have not really tried to debug this.

   Always makes me eager to jump in and spend my time helping. ;-)

   But the error is obvious enough in this case: You're trying to access
   the DOM from inline script, which won't work; the DOM doesn't exist
   when that script is executed. You need to use the window.load or
   dom:loaded event.

   document.observe('dom:loaded', function() {
   // Create the autocompleter

   });

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

   On Dec 11, 3:10 pm, mjk mj.kelle...@gmail.com wrote:

The error must be coming from another method that retrieves
'element'. I have not really tried to debug this. Wondering if
anyone else has had this problem, and how they remedied it.

The HTML

html
head
meta http-equiv=Content-Type content=text/html; charset=utf-8/
script type=text/javascript src=http://localhost:4402/author/js/
prototype.js/script
script type=text/javascript src=http://localhost:4402/author/js/
effects.js/script
script type=text/javascript src=http://localhost:4402/author/js/
controls.js/script
style type=text/css
div.autocomplete {
position:absolute;
width:250px;
background-color:white;
border:1px solid #888;
margin:0;
padding:0;}

div.autocomplete ul {
list-style-type:none;
margin:0;
padding:0;}

div.autocomplete ul li.selected { background-color: #ffb;}
div.autocomplete ul li {
list-style-type:none;
display:block;
margin:0;
padding:2px;
height:32px;
cursor:pointer;}

/style
/head
body
label for=inputAutotext:/label
input type=text id=input name=input size=15 /
div id=results class=autocomplete style=display: none;
position:relative;/div
script type=text/javascript
var txtid = 'input';
var divid = 'results';
var server = 'http://localhost:8080/ewcmtestbed/autocomplete';
new Ajax.Autocompleter(txtid, divid, server, { tokens: ','});
/script
/body
/html

The error:
In prototype.js
element is null

The method:
cleanWhitespace: function(element) {
element = $(element);
var node = element.firstChild;
while (node) {
var nextNode = node.nextSibling;
if (node.nodeType == 3  !/\S/.test(node.nodeValue))
element.removeChild(node);
node = nextNode;
}
return element;
},



--

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

Re: [Proto-Scripty] Re: Progressive update messages from single request

2009-12-12 Thread Alex McAuley
Joe.

Are you using ob_gz_handler(); or mod_defalte / mod_gzip ?

Also is  it a winblows or *nix server

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: joe t. thooke...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, December 12, 2009 2:24 AM
Subject: [Proto-Scripty] Re: Progressive update messages from single request


Alex,
Thanks for the sample. i must be missing a piece somewhere though...
http://pastie.org/739926

From that single Ajax.Request, the client delays, and after the PHP is
done running, i get the complete output in one block. What i'd
anticipated was that in each loop, the flush() would somehow send that
output to the client where it could be used, then the next loop's
flush would send another output to the client...

If i'm understanding it, Ajax is a single-request-single-response. i
can't output the current step a process is in as it happens. i can
accumulate them, as your model shows, and dump that out as a log, of
sorts. But in order to monitor progress of one request's processing on
the server, a series of follow-ups have to get feedback which the
original is providing on the side (as T.J. recommended).

Unless i'm missing something, which would be great if you could help
me fill that in. :)
-joe t.


On Dec 11, 3:29 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 in your ajax request file

 ?php
 ini_set('output_buffering',0); // make sure the output_buffering directive
 is not set high
 ob_start(); // before anything is echoed to the screen

 for($i=0;$i10;$i++)
 {
 echo('liPrinting Line '.$i.'/li');
 ob_flush();
 flush();

 sleep(1); // sleep for one second

 }

 ?
 this will output a line every second for 10 seconds

 Hope this helps

 P.S if you use ob_gz_handler this may not work (untested using it)

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: joe t. thooke...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Friday, December 11, 2009 1:00 AM
 Subject: [Proto-Scripty] Re: Progressive update messages from single 
 request

 david:
 The buffer/flush path seems to be where this solution is heading.
 Don't ask me why, but iframes rub me the wrong way. With the evolving
 needs for more streamlined connections, iframes feel like soggy
 bandaids to me. Given they have a place where nothing else seems to
 work (Ajax-ish file uploads), but i'd prefer to steer away from them
 in this case if i can.

 TJ:
 That seems like a fairly solid idea. Same general concept of having a
 second request object checking in on progress that the server reports
 back, it just gets it from a relatively more reliable source (instead
 of $_SESSION).

 Alex:
 Could you elaborate a bit, or point me to where i can follow up on
 that? i'm intrigued, but i'm not deeply familiar with using the output
 buffer effectively.

 Thanks for the replies!
 -joe t.

 On Dec 10, 3:45 am, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
  I noticed you were using PHP on the server side ... you can also use
  output
  buffering to achieve this in one request

  Alex Mcauleyhttp://www.thevacancymarket.com

  - Original Message -
  From: T.J. Crowder t...@crowdersoftware.com
  To: Prototype  script.aculo.us
  prototype-scriptaculous@googlegroups.com
  Sent: Thursday, December 10, 2009 8:38 AM
  Subject: [Proto-Scripty] Re: Progressive update messages from single
  request

  Hi Joe,

  It seems to me the simple way to do this is have the first request
  initiate a process on the server that keeps running when the request
  completes; the request returns an indicator of the current status and
  an identifier for the action.

  Your subsequent requests supply the identifer, which allows the server-
  side page to check the progress of the ongoing work matching that ID
  and report back the (new) status.

  People use things like this for showing progress bars for file uploads
  without using Flash, that kind of thing.

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

  On Dec 9, 4:11 pm, joe t. thooke...@gmail.com wrote:
   i think i've seen examples of this, but can't recall where, and could
   use some guidance.

   Obviously it's easy to handle a 1:1 Request/Response

   How can i do a true 1:many process? For instance:
   Client takes a single action which requires the server to perform 3
   tasks:
   * Query database
   * Generate PDF
   * Generate email, attach PDF, and send

   How can i respond to the client as EACH task is accomplished without
   ending the request chain?
   Looking up your data . . . (time-based dots as delay indicator)
   Creating PDF . . .
   Email sent (or failed, as the case may be)

   Is this done with HTTP 2xx headers? Recursive callbacks? If anyone can
   point me in the right direction (which include samples), i'd be
   grateful.

   Thanks

Re: [Proto-Scripty] Re: Progressive update messages from single request

2009-12-11 Thread Alex McAuley
in your ajax request file

?php
ini_set('output_buffering',0); // make sure the output_buffering directive 
is not set high
ob_start(); // before anything is echoed to the screen

for($i=0;$i10;$i++)
{
echo('liPrinting Line '.$i.'/li');
ob_flush();
flush();

sleep(1); //  sleep for one second
}

?
this will output a line every second for 10 seconds

Hope this helps

P.S if you use ob_gz_handler this may not work (untested using it)


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: joe t. thooke...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, December 11, 2009 1:00 AM
Subject: [Proto-Scripty] Re: Progressive update messages from single request


david:
The buffer/flush path seems to be where this solution is heading.
Don't ask me why, but iframes rub me the wrong way. With the evolving
needs for more streamlined connections, iframes feel like soggy
bandaids to me. Given they have a place where nothing else seems to
work (Ajax-ish file uploads), but i'd prefer to steer away from them
in this case if i can.

TJ:
That seems like a fairly solid idea. Same general concept of having a
second request object checking in on progress that the server reports
back, it just gets it from a relatively more reliable source (instead
of $_SESSION).

Alex:
Could you elaborate a bit, or point me to where i can follow up on
that? i'm intrigued, but i'm not deeply familiar with using the output
buffer effectively.

Thanks for the replies!
-joe t.


On Dec 10, 3:45 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 I noticed you were using PHP on the server side ... you can also use 
 output
 buffering to achieve this in one request

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: T.J. Crowder t...@crowdersoftware.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Thursday, December 10, 2009 8:38 AM
 Subject: [Proto-Scripty] Re: Progressive update messages from single 
 request

 Hi Joe,

 It seems to me the simple way to do this is have the first request
 initiate a process on the server that keeps running when the request
 completes; the request returns an indicator of the current status and
 an identifier for the action.

 Your subsequent requests supply the identifer, which allows the server-
 side page to check the progress of the ongoing work matching that ID
 and report back the (new) status.

 People use things like this for showing progress bars for file uploads
 without using Flash, that kind of thing.

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

 On Dec 9, 4:11 pm, joe t. thooke...@gmail.com wrote:
  i think i've seen examples of this, but can't recall where, and could
  use some guidance.

  Obviously it's easy to handle a 1:1 Request/Response

  How can i do a true 1:many process? For instance:
  Client takes a single action which requires the server to perform 3
  tasks:
  * Query database
  * Generate PDF
  * Generate email, attach PDF, and send

  How can i respond to the client as EACH task is accomplished without
  ending the request chain?
  Looking up your data . . . (time-based dots as delay indicator)
  Creating PDF . . .
  Email sent (or failed, as the case may be)

  Is this done with HTTP 2xx headers? Recursive callbacks? If anyone can
  point me in the right direction (which include samples), i'd be
  grateful.

  Thanks.
  -joe t.

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: File output

2009-12-11 Thread Alex McAuley
Ajax cannot process a file download in the same way it cannot process a file 
upload...

You have to output the link and make the user click it


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: speedpac...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, December 11, 2009 2:43 PM
Subject: [Proto-Scripty] Re: File output


I'm not sure if it's the right way to do, but I just do an http call
(just link to the url), and make sure that my PHP script returns the
appropiate headers for the browser to download the file rather than
open it inline...

I don't think you need ajax for this...

On Dec 11, 3:10 pm, bill will...@techservsys.com wrote:
 I am a relative AJAX neophyte and a complete newbe to prototype.

 I have an application that successively loads a series of php pages into
 the same div without problem using Ajax.updater.
 The last php script, instead of generating html, writes a file to the
 output in OpenOffice Writer format (with the appropriate headers) so
 instead of displaying the result I want it to do a file download.
 (http://www.phpclasses.org/browse/package/5797.html)

 Now we get to the place I am lost.

 I presume that instead of Ajax.updater I want to do something else
 (Ajax Request ?) but I am not sure how to do this.

 --
 Bill Drescher
 william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: File output

2009-12-11 Thread Alex McAuley
I'm not often wrong but i am right this time !!!

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Brian Williams 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Friday, December 11, 2009 2:52 PM
  Subject: Re: [Proto-Scripty] Re: File output


  you would be exactly right.


  and to protect from hot linking then check the http referrer or a session 
variable and if that fails then redirect to a landing page.


  you want to investigate the following header info


  //cache controlling
  header(Cache-Control: public);
  //force download
  header(Content-Description: File Transfer);
  //set filename
  header(Content-Disposition: attachment; filename=export.csv);


  there are others of course




  On Fri, Dec 11, 2009 at 9:43 AM, speedpac...@gmail.com 
speedpac...@gmail.com wrote:

I'm not sure if it's the right way to do, but I just do an http call
(just link to the url), and make sure that my PHP script returns the
appropiate headers for the browser to download the file rather than
open it inline...

I don't think you need ajax for this...


On Dec 11, 3:10 pm, bill will...@techservsys.com wrote:
 I am a relative AJAX neophyte and a complete newbe to prototype.

 I have an application that successively loads a series of php pages into
 the same div without problem using Ajax.updater.
 The last php script, instead of generating html, writes a file to the
 output in OpenOffice Writer format (with the appropriate headers) so
 instead of displaying the result I want it to do a file download.  
 (http://www.phpclasses.org/browse/package/5797.html)

 Now we get to the place I am lost.

 I presume that instead of Ajax.updater I want to do something else  
 (Ajax Request ?) but I am not sure how to do this.

 --
 Bill Drescher
 william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: File output

2009-12-11 Thread Alex McAuley
Not always m8 but thanks for the confidence!
Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Friday, December 11, 2009 9:38 PM
  Subject: Re: [Proto-Scripty] Re: File output


  speedpac...@gmail.com wrote: 
he replied to my mail :p  I guess we're all right this time - what a
wonderful world it is ;
  I haven't replied at all, until now.

On Dec 11, 4:08 pm, Alex McAuley webmas...@thecarmarketplace.com
wrote:
  I'm not often wrong but i am right this time !!!
I feel much better about not being able to do what I couldn't do.
  I guess I will open the last script in a new window and go from there.
  Thanks all.

  Alex is always right, as far as I know.


-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Progressive update messages from single request

2009-12-10 Thread Alex McAuley
I noticed you were using PHP on the server side ... you can also use output 
buffering to achieve this in one request


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: T.J. Crowder t...@crowdersoftware.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, December 10, 2009 8:38 AM
Subject: [Proto-Scripty] Re: Progressive update messages from single request


Hi Joe,

It seems to me the simple way to do this is have the first request
initiate a process on the server that keeps running when the request
completes; the request returns an indicator of the current status and
an identifier for the action.

Your subsequent requests supply the identifer, which allows the server-
side page to check the progress of the ongoing work matching that ID
and report back the (new) status.

People use things like this for showing progress bars for file uploads
without using Flash, that kind of thing.

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


On Dec 9, 4:11 pm, joe t. thooke...@gmail.com wrote:
 i think i've seen examples of this, but can't recall where, and could
 use some guidance.

 Obviously it's easy to handle a 1:1 Request/Response

 How can i do a true 1:many process? For instance:
 Client takes a single action which requires the server to perform 3
 tasks:
 * Query database
 * Generate PDF
 * Generate email, attach PDF, and send

 How can i respond to the client as EACH task is accomplished without
 ending the request chain?
 Looking up your data . . . (time-based dots as delay indicator)
 Creating PDF . . .
 Email sent (or failed, as the case may be)

 Is this done with HTTP 2xx headers? Recursive callbacks? If anyone can
 point me in the right direction (which include samples), i'd be
 grateful.

 Thanks.
 -joe t.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Check a mouse button

2009-12-10 Thread Alex McAuley
MouseMove tracks the mouse. 


A drag for example uses Left Mouse Click (down) plus Mouse Move

Click simply detects the click on an element or page..

If you want to observe mousemove into an element then setup an observer once 
it has entered for click .. this seems a slight waste of time and memory to 
setup observers ad hoc..

What exactly are you trying to acheive - perhaps one of us can point you in 
the right direction...





Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, December 10, 2009 8:24 AM
Subject: Re: [Proto-Scripty] Re: Check a mouse button


Le mercredi 9 décembre 2009 17:35, Frédéric a écrit :

 I have to check again, but in my previous tests, the isLeftClick() always
 returned true, and other always returned false...

I confirm that isLeftClick() always return true, and isMiddleClick() and
isRightClick() always return false...

Could it be because I have only one 'mousemove' callback for several
elements?

-- 
   Frédéric

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Check a mouse button

2009-12-08 Thread Alex McAuley
...observe('mousemove',function(e) {

$('SomeElement').observe('click',function() {
doSomethingWIthyourClick();

});
});
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, December 08, 2009 1:15 PM
Subject: [Proto-Scripty] Check a mouse button


Hi,

Is there a way to check if a mouse button is pressed in an
Event.observe('mousemove') callback ?

Thanks,

-- 
   Frédéric

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Custom signal

2009-12-07 Thread Alex McAuley
use Json to put the args in ...

emit: function(options) {
options.arguments.each(function(
}

emit({arguments : [ a1:Arg1,a2:Arg2,a3:Arg3]});



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, December 07, 2009 8:52 AM
Subject: [Proto-Scripty] Custom signal


I would like to raise signals between some of my application
 components (mainly between the model and the controller).

 I'm thinking of something like this:

 var Signal = Class.create({
initialize: function () {
self._slots = new Array();

emit: function(arg1, arg2, ..., argn):
// ???
},

def connect(self, slot):
if (!self._slots.include(slot)) {
self._slots.push(slot);
}
},

def disconnect(self, slot):
if (self._slots.include(slot)) {
self._slots.splice(self._slots.indexOf(slot, 1);
}
},

def disconnectAll(self):
self._slots = new Array();

 but I don't know how to implement the emit method. As each slot has a
 different number of arguments, how can retreive them in a generic way?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Alex McAuley
the global variable arguments will give u an array of arguments...

https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/arguments


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, December 07, 2009 9:31 AM
Subject: [Proto-Scripty] Re: Custom signal


 I'm not sure it will do what I'm looking for. If I understand, your
 code will call the same func with all arguments, but one by one. What
 I want to do is to call each slot with all arguments.

 Here is an example:

 function func1(arg1, arg2) {
 ...
 }

 function func2(arg1, arg2) {
 ...
 }

 mySignal = new Signal();
 mySignal.connect(func1);
 mySignal.connect(func2);

 The call:

 mySignal.emit('a', 3);

 will in fact do:

 func1('a', 3);
 func2('a', 3);

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Alex McAuley
There is a known bug in IE8 regarding new Element and adding the class toit 
in the scope...

To overcome it simply use addClassName('My-Class'); after or instead of the 
scope

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: ColinFine colin.f...@pace.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, December 07, 2009 10:53 AM
Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild()




On Dec 4, 10:36 pm, fma f...@gbiloba.org wrote:
 Ok, I found something...

 If I look at the HTML tree in the IE debugger, on the left panel I
 can't see any 'class' attribute. However, it does appear on the right
 panel (called Attributs), with the correct value. But IE does not
 seems to use it. I found that I can add an attribute to the div in the
 left panel. So I tried to add an attribute named 'class', and I set
 its value: this fixes the problem, and IE can apply the CSS!!!

 Then, I tried something else... I used the old-style to build the DOM
 tree:

 this.content = document.createElement('div');
 Element.extend(this.content);
 this.content.setAttribute('id', this._name + _content);
 this.content.setAttribute('class', fullContent);
 document.body.appendChild(this.content);

I don't know if this is relevant to the problem, but you don't need to
use 'setAttribute' for built-in attributes of HTML element:

this.content.id = this._name + _content;

avoids an unnecessary function call.

For the DOM attribute 'class', the Javascript binding requires you to
use 'className', because 'class' is a reserved word in Javascript:

this.content.class = fullContent;

(or, using a Prototype method)
this.content.addClassName('fullContent');
This is not quite the same, because if you already have a class on the
element, this will add the new class, whereas the simple assignment
will replace it. But since you have just created the element, there is
no difference.

 instead of the new-style:

 this.content = new Element('div', {'id': this._name + _content,
 'class': fullContent});

 and it worked!!!

 At first, I didn't put the quotes arround the attributes names, in the
 hash:

 this.content = new Element('div', {id: this._name + _content,
 class: fullContent});

 but IE does not like this syntax (it asks for an int or a string). But
 as you can see, giving a string does not seems to work well.

IE objects (correctly) to your using the Javascript reserved word
'class' as an object key: Firefox is more lax and lets it through.
'id' will work without quotes.

 Am I doing something wrong with the new-style method? Or is it a known
 issue in Prototype?

I don't know. Your example seems to match that in the Prototype
documentation. I would try it with 'className' instead of 'class' and
see whether this works.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Custom signal

2009-12-07 Thread Alex McAuley
arguments is global...

consider this ...

function foo('one','two','three')  {
alert(arguments[0]); // one
alert(arguments[1]); // two
alert(arguments[2]); // three
}


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, December 07, 2009 11:53 AM
Subject: [Proto-Scripty] Re: Custom signal


 Good!

 Is it possible to pass again this var to another function? What if I
 do:

 function func2(arguments) {
 ...
 }

 function func1() {
func2(arguments);
 }

 func1(a, b);

 Does it work?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-07 Thread Alex McAuley
No problem ... it got me in a pickle too till i googled a bit... then had to 
go change every function in an application!
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Frédéric f...@gbiloba.org
To: prototype-scriptaculous@googlegroups.com
Sent: Monday, December 07, 2009 1:21 PM
Subject: Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()


Le lundi 7 décembre 2009 11:00, Alex McAuley a écrit :

 There is a known bug in IE8 regarding new Element and adding the class
 toit in the scope...

 To overcome it simply use addClassName('My-Class'); after or instead of
 the scope

Ok, thank you all for your help. I just added a call to addClassName, and
wll works fine.

-- 
   Frédéric

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to 
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Using Ajax.Request to fetch an image

2009-12-04 Thread Alex McAuley
You cant .. simply fetch HTML and have the image in the html with css or 
img /
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, December 04, 2009 6:59 AM
Subject: [Proto-Scripty] Using Ajax.Request to fetch an image


 Hello,

 Could someone explain me how to fetch an image using Ajax.Request?
 I can only find how to retreive text/xml datas, but not binary
 datas...

 Thanks,

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: document.write() vs Element/appendChild()

2009-12-04 Thread Alex McAuley
There  isn't one
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, December 04, 2009 7:09 AM
Subject: [Proto-Scripty] Re: document.write() vs Element/appendChild()


 BTW, what is the tag to format code on this group?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Using Ajax.Request to fetch an image

2009-12-04 Thread Alex McAuley
I can see alot of security issues with that!


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: fma f...@gbiloba.org
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, December 04, 2009 9:34 AM
Subject: [Proto-Scripty] Re: Using Ajax.Request to fetch an image


 Ok, I see. Someone on the web proposed to encode images in base64 to
 be able to fetch them using text answer. Do you think it is a good
 idea?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Queueing actions

2009-11-28 Thread Alex McAuley
the effects all have a property called onFinish :

Just queue things that way if you dont want to get complicated


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: speedpac...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 28, 2009 2:25 PM
Subject: [Proto-Scripty] Queueing actions


 Hello,

 I got a question that I don't seem to be able to find a solution for :
 (

 Please consider the following code:

 new Ajax.Request(url, {
  onSuccess: function(response) {
Effect.BlindUp('promocontainer', { duration: 1, queue: 'front' });
$('promocontainer').update(response.responseText);
Effect.BlindDown('promocontainer', { duration: 1 , queue: 'end'});
  }
 });

 This works like a charm, and as you can see I already managed to make
 sure the BlindUp doesn't interfere with the BlindDown by queueing
 these effects.

 The idea behind the above however is to have the div BlindUp, update
 the contents WITHOUT SOMEONE NOTICING, and then calling the BlindDown,
 so you have a nice effect where the old contents goes away, and the
 new one nicely blinds in.

 Unfortunately, as it sems, the update on the div already happens
 while the blindup is still running...
 Is there a way to manage this as well?  and queue the update as well?

 I already tried moving the blindup BEFORE creating the Ajax Request,
 but it didn't work - the ajax request was faster than the blindup, and
 in the end I still had updating content prior to the blindup effect to
 finish...

 If someone on this list has a nice idea, I'd very much appreciate it.


 Thanks a lot!
 David.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-27 Thread Alex McAuley
I'll dig out the testbed that i made for it as it was a long time ago now 
that i did it and i cant remeber if i wrapped it in a periodicalupdater or 
an AjaxPeriodicalUpdater...

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Eric lefauv...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, November 27, 2009 3:48 PM
Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request


 And next, because an array is much more flexible than variables. you

 I am sorry David, but I don't agree with you on this :o)

 An object variable is ways more flexible than an array. Especially if
 you add some methods to its prototype to fit your needs.

 And it is probably overkill in this case, where an incremented int
 would do it unless you actually need the result objects of every
 previous requests (which is not the same thing than need to be
 executed after every previous requests which is the need expressed by
 maalek).

 Alex: That's weird, but I was thinking the xhr object was stored in
 the closure of the Ajax.Request object, and garbage collected after
 the last callback was called (unless you store a reference to this
 object in another variable of course).
 It seems I am obviously wrong here I guess I'll have to have a
 look in the source again :o)

var request=new Ajax.Periodical...({});

request=null;

 If you nullify the Periodical thingy, will it continue to be called?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-24 Thread Alex McAuley
Arrays are stored in memory, they are not a cookie so they do not get stored 
on the client machine .. (and  you yourself say that even if it was its not 
cross browser)

To test .. Do 100 requests with large responses and save them all into an 
array and see how much memory the web browser is eating each time you do 
one...

In fact the actal request stays in memory unless you null the object - i 
wrote a post on this in TJ's proto scripty wiki which has test cases to 
prove  it.

I dont see any reason ever to save the response of multiple requests in an 
object that is saved in memory of the client's browser  what happens if 
they are on an iPhone or somehting with not alot of memory ?


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: david david.brill...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 24, 2009 7:24 AM
Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request


 I'm sorry Alex, but I definitely not agree with you !
 First because there is existing method to cache the Ajax request and
 they use local object to save the result (we have now some new way to
 save locally a variable but it's not cross-browser).

 And next, because an array is much more flexible than variables. you
 could access each element independantly and have the length method (In
 our exemple, to know how much elements have been saved). And if each
 request should have a specific position in the array, length is no
 more working, but Prototype have sugaristic method that help you
 playing with Array the way you need.

 But there is I think plenty way to do this.

 --
 david


 On 23 nov, 23:44, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
 It would polute the variable and seriously eat RAM to save every result
 response in an array, i would highly recommend staying away from it..

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: david david.brill...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Monday, November 23, 2009 8:00 PM
 Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

  Hi all,

  if you need to save all returned value, just save each request result
  in an array.
  Check the length of the result list to know when all request are
  finished.

  But we still turn around the same idea.
  --
  david

  On 23 nov, 15:59, Alex McAuley webmas...@thecarmarketplace.com
  wrote:
  The main problem is that due to the ansynchronous and the wait times 
  /
  serverside processing times ... you never know which will finish first 
  nd
  if
  the last request relies on the first one completing then its going to
  hard
  fail !!...

  Each one needs to set a variable to say its complete !

  Alex Mcauleyhttp://www.thevacancymarket.com

  - Original Message -
  From: Eric lefauv...@gmail.com
  To: Prototype  script.aculo.us
  prototype-scriptaculous@googlegroups.com
  Sent: Monday, November 23, 2009 2:30 PM
  Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

  Hi,

  I'd launch all Ajax.Request except the last one with a onSuccess
  handler that:
  - set a flag
  - if all flags are set, launch the last Ajax.Request

  This way, you don't have to use timer, or loop calling yourself
  recursively.

  Eric

  NB: I didn't test it, but you may increment a counter instead of using
  many flags

  On 21 nov, 23:31, T.J. Crowder t...@crowdersoftware.com wrote:
   Hi,

Synchronous is simple way but object create time increses x3. How
function use to wait until all object is ready ? setInterval ?

   Probably setTimeout, but yeah; or setTimeout's Prototype wrappers
   Function#defer / Function#delay. Have the code in question check its
   preconditions, and if they're not met, setTimeout/defer/delay 
   itself.
   --
   T.J. Crowder
   Independent Software Consultant
   tj / crowder software / comwww.crowdersoftware.com

   On Nov 21, 2:33 pm, maalek maaa...@gmail.com wrote:

Synchronous is simple way but object create time increses x3. How
function use to wait until all object is ready ? setInterval ?

maaalek

On 21 Lis, 14:32, Alex McAuley webmas...@thecarmarketplace.com
wrote:

 Ask it to check a variable that is set as ready by all the 
 others
 ..
 or make
 it defer and be synchronous ..

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: maalek maaa...@gmail.com
 To: Prototype  script.aculo.us
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, November 21, 2009 12:59 PM
 Subject: [Proto-Scripty] Sychronize many asynchronous 
 Ajax.Request

  Hello

  I have problem. When my page is load I build many objects 
  (aprox
  15)
  by Ajax.Request (asynchronous : true) but last object I can
  create
  when all previous object is ready. Any idea

Re: [Proto-Scripty] Re: element.attachEvent is not a function error in Prototype with Low Pro

2009-11-24 Thread Alex McAuley
Evidently not  else it wouldn't be conflicting !

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: david david.brill...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 24, 2009 7:00 AM
Subject: [Proto-Scripty] Re: element.attachEvent is not a function error in 
Prototype with Low Pro


 Hi Alex,

 Low Pro 0.5 supports Prototype 1.6.
 so should have no conflict with both inclusion.

 --
 david

 On 24 nov, 00:15, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
 Its probably conflicting with each other ...

 I use Jquery and Prototype together in alot of apps and i get the same 
 error
 unless i tell jQuery to not conflict

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: darth darthd...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, November 21, 2009 8:03 AM
 Subject: [Proto-Scripty] element.attachEvent is not a function error in
 Prototype with Low Pro

  I'm having problem with Prototype working together with Low Pro. Just
  by adding Low Pro, I get JS error in prototype element.attachEvent is
  not a function on line 4536. When I remove Low Pro, there is no
  error.

  The lin in Prototype where error occurs is

  element.attachEvent(on + actualEventName, responder);

  where actualEventName contains unload

  I'm using Prototype 1.6.1 and Low Pro 0.5, the same error occured also
  with Prototype 1.6.0.3

  --

  You received this message because you are subscribed to the Google 
  Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-24 Thread Alex McAuley
Yes...

Objects and thier properties are built and stored in memory (how else would 
they get built) - the CPU does the calculations and outputs the opcode to 
the browser (which reads from memory) what it needs to do with the object 
(In very simple terms)... So it stands to reason that if you dont remove the 
Object from memory it will just add to the memory bracket.

To test...

Build a test page with a periodical ajax request and (on winblows) watch the 
RAM that for instance firefox uses in the task manager go up and up and up.

Then close the whole browser (so it starts clean again) and assign the 
periodical updater to a variable

var request=new Ajax.Periodical...({});

request=null;

And watch the difference between what happend in the first test and the 
second...

In the second test the browser frees up 60-80% of the memory that it used to 
make/process the request by nulling the object back to a null byte

If you look on TJ's proto scripty wikidot my results are there and the code 
that accompanies it.

I assumed it was common knowledge that people garbage collected ajax 
requests... Its not just prototypejs but every ajax style library that does 
not garbage collect these requests


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: david david.brill...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 24, 2009 11:54 AM
Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request


Yes your right Alex, but the case of maalek did not mention such
numbers of request.
I think in his case using one array is better than using a lot (~14
differents variables).

btw, I'm interrest in In fact the actal request stays in memory
unless you null the object and after reflexion, that is logical, but
is it normal ??

--
david

On 24 nov, 09:37, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 Arrays are stored in memory, they are not a cookie so they do not get 
 stored
 on the client machine .. (and you yourself say that even if it was its not
 cross browser)

 To test .. Do 100 requests with large responses and save them all into an
 array and see how much memory the web browser is eating each time you do
 one...

 In fact the actal request stays in memory unless you null the object - i
 wrote a post on this in TJ's proto scripty wiki which has test cases to
 prove it.

 I dont see any reason ever to save the response of multiple requests in an
 object that is saved in memory of the client's browser  what happens 
 if
 they are on an iPhone or somehting with not alot of memory ?

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: david david.brill...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Tuesday, November 24, 2009 7:24 AM
 Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

  I'm sorry Alex, but I definitely not agree with you !
  First because there is existing method to cache the Ajax request and
  they use local object to save the result (we have now some new way to
  save locally a variable but it's not cross-browser).

  And next, because an array is much more flexible than variables. you
  could access each element independantly and have the length method (In
  our exemple, to know how much elements have been saved). And if each
  request should have a specific position in the array, length is no
  more working, but Prototype have sugaristic method that help you
  playing with Array the way you need.

  But there is I think plenty way to do this.

  --
  david

  On 23 nov, 23:44, Alex McAuley webmas...@thecarmarketplace.com
  wrote:
  It would polute the variable and seriously eat RAM to save every result
  response in an array, i would highly recommend staying away from it..

  Alex Mcauleyhttp://www.thevacancymarket.com

  - Original Message -
  From: david david.brill...@gmail.com
  To: Prototype  script.aculo.us
  prototype-scriptaculous@googlegroups.com
  Sent: Monday, November 23, 2009 8:00 PM
  Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

   Hi all,

   if you need to save all returned value, just save each request result
   in an array.
   Check the length of the result list to know when all request are
   finished.

   But we still turn around the same idea.
   --
   david

   On 23 nov, 15:59, Alex McAuley webmas...@thecarmarketplace.com
   wrote:
   The main problem is that due to the ansynchronous and the wait 
   times
   /
   serverside processing times ... you never know which will finish 
   first
   nd
   if
   the last request relies on the first one completing then its going 
   to
   hard
   fail !!...

   Each one needs to set a variable to say its complete !

   Alex Mcauleyhttp://www.thevacancymarket.com

   - Original Message -
   From: Eric lefauv...@gmail.com
   To: Prototype  script.aculo.us
   prototype-scriptaculous

Re: [Proto-Scripty] Safari complains of unsafe X-JSON

2009-11-24 Thread Alex McAuley
Ouch !


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Walter Lee Davis wa...@wdstudio.com
To: prototype-scriptaculous@googlegroups.com
Sent: Wednesday, November 25, 2009 12:02 AM
Subject: Re: [Proto-Scripty] Safari complains of unsafe X-JSON


 Google is my friend. Naturally, the next result I hit upon told me
 that there might be a mismatch between the URL requested by the form's
 Action and the rest of the page. Sure enough, I had used PHP's
 $_SERVER['SERVER_NAME'] to construct the URL, and it wasn't the same
 as the request (missing the WWW part) so this error cropped up. I
 chopped down the Action to just the script name, and it works like a
 big dog.

 Walter

 On Nov 24, 2009, at 6:31 PM, Walter Lee Davis wrote:

 I have a form with an Ajax request() to update the form with survey
 results. It works great in Firefox, but when I submit it from Safari
 4.latest on Mac OS X, I get nothing at all in the browser for results,
 and the console says Refused to get unsafe header X-JSON. I've
 tested this on two different Macs.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Asynchronous : false in IE gives problem

2009-11-23 Thread Alex McAuley
Does IE throw an error at all ...

Possibly its somehting in your code pastebin your code so we can check 
it out


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: dip joyofkolk...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, November 20, 2009 8:04 AM
Subject: [Proto-Scripty] Asynchronous : false in IE gives problem


 Hi,

 We  are using prototype.js for our site.
 Whenever we issue an ajax request , we show an image (wait...) in
 onCreate function and
 remove this image in onSuccess() function.
 Now for some reason,we need to make ajax request synchoronous,so that
 until the call
 ended ,user should not do anything.
 So, we made aasynchronous:false.
 This is working fine in FireFox but in IE(7) the image is just not
 displaying.
 what will the possible solution?

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-23 Thread Alex McAuley
It would polute the variable and seriously eat RAM to save every result 
response in an array, i would highly recommend staying away from it..

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: david david.brill...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, November 23, 2009 8:00 PM
Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request


 Hi all,

 if you need to save all returned value, just save each request result
 in an array.
 Check the length of the result list to know when all request are
 finished.

 But we still turn around the same idea.
 --
 david

 On 23 nov, 15:59, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
 The main problem is that due to the ansynchronous and the wait times /
 serverside processing times ... you never know which will finish first nd 
 if
 the last request relies on the first one completing then its going to 
 hard
 fail !!...

 Each one needs to set a variable to say its complete !

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: Eric lefauv...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Monday, November 23, 2009 2:30 PM
 Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

 Hi,

 I'd launch all Ajax.Request except the last one with a onSuccess
 handler that:
 - set a flag
 - if all flags are set, launch the last Ajax.Request

 This way, you don't have to use timer, or loop calling yourself
 recursively.

 Eric

 NB: I didn't test it, but you may increment a counter instead of using
 many flags

 On 21 nov, 23:31, T.J. Crowder t...@crowdersoftware.com wrote:
  Hi,

   Synchronous is simple way but object create time increses x3. How
   function use to wait until all object is ready ? setInterval ?

  Probably setTimeout, but yeah; or setTimeout's Prototype wrappers
  Function#defer / Function#delay. Have the code in question check its
  preconditions, and if they're not met, setTimeout/defer/delay itself.
  --
  T.J. Crowder
  Independent Software Consultant
  tj / crowder software / comwww.crowdersoftware.com

  On Nov 21, 2:33 pm, maalek maaa...@gmail.com wrote:

   Synchronous is simple way but object create time increses x3. How
   function use to wait until all object is ready ? setInterval ?

   maaalek

   On 21 Lis, 14:32, Alex McAuley webmas...@thecarmarketplace.com
   wrote:

Ask it to check a variable that is set as ready by all the others 
..
or make
it defer and be synchronous ..

Alex Mcauleyhttp://www.thevacancymarket.com

- Original Message -
From: maalek maaa...@gmail.com
To: Prototype  script.aculo.us
prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 21, 2009 12:59 PM
Subject: [Proto-Scripty] Sychronize many asynchronous Ajax.Request

 Hello

 I have problem. When my page is load I build many objects (aprox 
 15)
 by Ajax.Request (asynchronous : true) but last object I can 
 create
 when all previous object is ready. Any idea how do that ?

 maaalek

 --

 You received this message because you are subscribed to the 
 Google
 Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=.

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/prototype-scriptaculous?hl=.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] element.attachEvent is not a function error in Prototype with Low Pro

2009-11-23 Thread Alex McAuley
Its probably conflicting with each other ...

I use Jquery and Prototype together in alot of apps and i get the same error 
unless i tell jQuery to not conflict


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: darth darthd...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 21, 2009 8:03 AM
Subject: [Proto-Scripty] element.attachEvent is not a function error in 
Prototype with Low Pro


 I'm having problem with Prototype working together with Low Pro. Just
 by adding Low Pro, I get JS error in prototype element.attachEvent is
 not a function on line 4536. When I remove Low Pro, there is no
 error.

 The lin in Prototype where error occurs is

 element.attachEvent(on + actualEventName, responder);

 where actualEventName contains unload

 I'm using Prototype 1.6.1 and Low Pro 0.5, the same error occured also
 with Prototype 1.6.0.3

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Sychronize many asynchronous Ajax.Request

2009-11-21 Thread Alex McAuley
Ask it to check a variable that is set as ready by all the others .. or make 
it defer and be synchronous ..


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: maalek maaa...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 21, 2009 12:59 PM
Subject: [Proto-Scripty] Sychronize many asynchronous Ajax.Request


 Hello

 I have problem. When my page is load I build many objects (aprox 15)
 by Ajax.Request (asynchronous : true) but last object I can create
 when all previous object is ready. Any idea how do that ?

 maaalek

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request

2009-11-21 Thread Alex McAuley
You need to set variables in the objects/ requests  and check them



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: maalek maaa...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 21, 2009 2:33 PM
Subject: [Proto-Scripty] Re: Sychronize many asynchronous Ajax.Request


 Synchronous is simple way but object create time increses x3. How
 function use to wait until all object is ready ? setInterval ?

 maaalek

 On 21 Lis, 14:32, Alex McAuley webmas...@thecarmarketplace.com
 wrote:
 Ask it to check a variable that is set as ready by all the others .. or 
 make
 it defer and be synchronous ..

 Alex Mcauleyhttp://www.thevacancymarket.com

 - Original Message -
 From: maalek maaa...@gmail.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 Sent: Saturday, November 21, 2009 12:59 PM
 Subject: [Proto-Scripty] Sychronize many asynchronous Ajax.Request

  Hello

  I have problem. When my page is load I build many objects (aprox 15)
  by Ajax.Request (asynchronous : true) but last object I can create
  when all previous object is ready. Any idea how do that ?

  maaalek

  --

  You received this message because you are subscribed to the Google 
  Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=.

 --

 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To post to this group, send email to 
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Limit number of draggables allowed in a droppable

2009-11-19 Thread Alex McAuley
If i recall correctly there is an onDrop function that you can call when 
initialising the droppable...

So what i would do is ondrop count the elements with the classname that are 
inside the droppable... or even easier .. ondrop update a hidden element on 
the page to the value of the number of dropped elemenets in it and ondrop 
also check that hidden value and not let it drop if its more than 1

Both will work

HTH




Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Jason Whitmer jwhit...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, November 19, 2009 9:45 PM
Subject: [Proto-Scripty] Limit number of draggables allowed in a droppable


 How do I limit a Droppable to contain only 1 Draggable?

 I have a Droppable:

 div id=myDroppable
  div id=staticTextDescription/div
 /div

 And a Draggable:

 div id=myDraggable
  DRAG ME
 /div

 Which I setup like this:

 Droppables.add('myDroppable');

 new Draggable('myDraggable');


 Thank you,
 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-scriptacul...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=.


 

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-18 Thread Alex McAuley

myInstance=new Ajax.PeriodicalUpdater(



TO check it ...

If(myInstace)  {
do some code here

}
Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Wednesday, November 18, 2009 11:11 AM
  Subject: Re: [Proto-Scripty] Re: instanting and reinstanting a function: 
Ajax.PeriodicalUpdater


  Alex McAuley wrote: 
No need to worry about multiple instances ... just check the variable 
before you initialise it...
Alex Mcauley
http://www.thevacancymarket.com

  Thanks again david and Alex.
  I looked but could not find the code to check to see if the variable held an 
instance or was null.
  Might I beg for one line of code to show me how to check the variable ?

  bill

  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Tuesday, November 17, 2009 3:18 PM
  Subject: [Proto-Scripty] Re: instanting and reinstanting a function: 
Ajax.PeriodicalUpdater


  david wrote: 
Bill,

just a precision (in Fact I did not understand that you still need to
get every minutes the result):
the stop() method is at 
http://api.prototypejs.org/ajax/ajax/periodicalupdater.html#stop-instance_method

normally, you could stop  start the peridical updater at will.

--
david
  Thanks david and Alex,

  So what is the best practice:
  1) create the periodicalupdater when the page loads, stopping it 
immediately and then start it when the div becomes visible and stop it when the 
div becomes invisible.

  2) create the periodicalupdater when it becomes visible and stop it when 
it becomes invisible 

  Or is there any difference ?
  (I worry about multiple instanting the periodicalupdater )


-- 
Bill Drescher
william {at} TechServSys {dot} 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
  -~--~~~~--~~--~--~---





-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-18 Thread Alex McAuley
Not sure what u mean Bill...

Are you reffering to somehting like the onComplete of Ajax.Updater...

If so there is 2 ways to do it..

1. onComplete: myFunction (then somewhere else)

function myFunction() {
alert('i got called');
}

OR
2. (Anonymous Function)
onComplete : function() {
alert('I Got called');
}


HTH

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Wednesday, November 18, 2009 2:20 PM
  Subject: [Proto-Scripty] Maybe OT: passing a function name to a function


  I suspect this is not a prototype question, but then again, every time I turn 
around I am learning new capabilities of the framework.

  I need to pass a function name as an argument to a function for a call-back 
function.
  Do I just pass the function name as a quoted text argument ?
  If I do, do I need to eval the function when I want to execute it.

  or...

  what is the best way of doing this ?

  My apologies in advance if prototype does not have a nifty way of doing this 
and my thanks in advance for any suggestions.

-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




Re: [Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-18 Thread Alex McAuley
Sorry i get what u mean now!..

Example:

function myFunction(options) {
alert(options.id);
eval(mySecondFunction);// Be very aware that evaluation is bad as JS can be 
injected if you do not sanitise strings correctly
}

myFunction({id:1234,callback:'mySecondFunction'});
// alerts 1234 then evals mySecondFunction();


Not using eval EVER i cant remember if you need to add () or not... but its a 
quick trial and error fix!!

HTH


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Alex McAuley 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Wednesday, November 18, 2009 2:38 PM
  Subject: Re: [Proto-Scripty] Maybe OT: passing a function name to a function


  Not sure what u mean Bill...

  Are you reffering to somehting like the onComplete of Ajax.Updater...

  If so there is 2 ways to do it..

  1. onComplete: myFunction (then somewhere else)

  function myFunction() {
  alert('i got called');
  }

  OR
  2. (Anonymous Function)
  onComplete : function() {
  alert('I Got called');
  }


  HTH

  Alex Mcauley
  http://www.thevacancymarket.com
- Original Message - 
From: bill 
To: prototype-scriptaculous@googlegroups.com 
Sent: Wednesday, November 18, 2009 2:20 PM
Subject: [Proto-Scripty] Maybe OT: passing a function name to a function


I suspect this is not a prototype question, but then again, every time I 
turn around I am learning new capabilities of the framework.

I need to pass a function name as an argument to a function for a call-back 
function.
Do I just pass the function name as a quoted text argument ?
If I do, do I need to eval the function when I want to execute it.

or...

what is the best way of doing this ?

My apologies in advance if prototype does not have a nifty way of doing 
this and my thanks in advance for any suggestions.

-- 
Bill Drescher
william {at} TechServSys {dot} 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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.


  --

  You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
  To post to this group, send email to prototype-scriptacul...@googlegroups.com.
  For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.




[Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-17 Thread Alex McAuley
No need to worry about multiple instances ... just check the variable before 
you initialise it...
Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Tuesday, November 17, 2009 3:18 PM
  Subject: [Proto-Scripty] Re: instanting and reinstanting a function: 
Ajax.PeriodicalUpdater


  david wrote: 
Bill,

just a precision (in Fact I did not understand that you still need to
get every minutes the result):
the stop() method is at 
http://api.prototypejs.org/ajax/ajax/periodicalupdater.html#stop-instance_method

normally, you could stop  start the peridical updater at will.

--
david
  Thanks david and Alex,

  So what is the best practice:
  1) create the periodicalupdater when the page loads, stopping it immediately 
and then start it when the div becomes visible and stop it when the div becomes 
invisible.

  2) create the periodicalupdater when it becomes visible and stop it when it 
becomes invisible 

  Or is there any difference ?
  (I worry about multiple instanting the periodicalupdater )


-- 
Bill Drescher
william {at} TechServSys {dot} 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: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-16 Thread Alex McAuley
Bill.

You can assign the periodical to a variable and call stop on it if you wish
..

EG.

var myperiodical=new Ajax.Periodical..



myperiodical.stop(); // stops it ...

All this is defined but IMO unclear in the documentation 

HTH

Alex Mcauley

http://www.thevacancymarket.com
  - Original Message - 
  From: bill 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Monday, November 16, 2009 2:31 PM
  Subject: [Proto-Scripty] Re: instanting and reinstanting a function: 
Ajax.PeriodicalUpdater


  david wrote: 
Hi Bill,

Isn't it just an Ajax.Request that you need, because the periodical
executer is used 'generally' without the need of a user click. I mean,
in your exemple, it's like you start at the begginning the periodical
updater, and after it reload every time there is new message the
target DIV.

But in your case, it seems that the call is done only once on a uxer
click. So just use AJAX.Request, and on click launch it. The only
think you will do is to manually update the div with the result of the
AJAX call.

  no, actually I want the div to be loaded when the user clicks, and reloaded 
every minute it is visible.

--
david

On 15 nov, 15:36, bill will...@techservsys.com wrote:
  When the user clicks a link it executes this function:
function fPendingMail() { //set the mail div to show
document.getElementById (maildiv).style.display = block;
new Ajax.PeriodicalUpdater('maildiv', 'mail/pending_mail.php',
   {
   method: 'get',
frequency: 60,
decay: 1
  });
return false; //inhibit the href

}

and the maildiv appears and loads a list of pending mail messages and
all is good.

When they are done the script executes
document.getElementById (maildiv).style.display = none;

I know the div is still updating and I don't need it to so:
  1) how do I stop the periodicalUpdater.
  2) should I be de-instanting (whatver the correct verb is) the object
so that when the user clicks the link again it will not just keep
creating more instances of the Ajax.PeriodicalUpdater ?

bill

--
Bill Drescher
william {at} TechServSys {dot} com


  


-- 
Bill Drescher
william {at} TechServSys {dot} 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: Ajax.Updater: alter retrieved content

2009-11-16 Thread Alex McAuley

You would have to modify the source as it does not push the object into the 
onComplete callback...

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Lox laurent.dincl...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, November 16, 2009 12:36 PM
Subject: [Proto-Scripty] Ajax.Updater: alter retrieved content



 Hello,

 I use Ajax.Updater to update a div content.

 I need to add scriptvarname = content/script to every content
 retreived with Ajax.Updater. Is there a way to do it with Responders ?

 I tried:

 Ajax.Responders.register({
 onSuccess: function(r) {
r.transport.responseText = 'test';
   }
 });

 With no sucess.

 Any idea?

 Regards.
 
 


--~--~-~--~~~---~--~~
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: Working Demo?

2009-11-16 Thread Alex McAuley

You do know these projects are done for free dont you?

I am sorry to point out that your comments are a little demanding against an 
open source project ..

It takes minutes to setup your own demo so i would advise you experiment and 
see if it works for you.



Alex Mcauley
http://www.thevacancymarket.com

- Original Message - 
From: Thomas.Paine tpa...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, November 16, 2009 7:35 PM
Subject: [Proto-Scripty] Working Demo?



 Before investing time and energy into implementing your auto complete
 addon I would like to see a working demo of it. The links I have found
 to your demo (http://demo.script.aculo.us/ajax/autocompleter) are all
 dead links. It appears that the demo sub-sub domain is not valid.
 Searching this group shows there has been discussion of this issue but
 no resolution. Comments like dead links should have been removed
 smack of someone who has not actually looked at the page which in fact
 has dead links : http://wiki.github.com/madrobby/scriptaculous/demos


 
 


--~--~-~--~~~---~--~~
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: beforeunload event help

2009-11-14 Thread Alex McAuley

The reason that it doubles up on firefox is because you call it twice ..

to fix...


if(!confirm('')) {
Event.stop(evt);
}

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: BillSaysThis bstgro...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, November 13, 2009 6:27 PM
Subject: [Proto-Scripty] beforeunload event help



  document.observe('dom:loaded', function() {
Event.observe(window, 'beforeunload', function(evt) {
  if( !( $F('verifiedURL') ) ) {
var r= confirm(You have not tested your medallion, a step
 required for activation. You can return later by clicking the Manage
 button for this site.\n\nDo you still wish to leave?);
if(!r) {
  Event.stop(evt);
}
  }
});
  });

 Having two problems with this code:

 1. Ignores the value of $F('verifiedURL') and never shows the confirm
 dialog

 2. If I comment out the if($F('verifiedURL')) test on Firefox a
 Confirm dialog is shown twice if I click Cancel, once with my message
 and then again with a generic message (but only once if click OK)--in
 both cases the browser takes the right action in the end.

 On Safari the dialog is only shown once but unloads the page no matter
 which answer is clicked.

 Generic message shown is:

 Are you sure you want to navigate away from this page?

 Press OK to continue, or Cancel to stay on the current page.

 Using the Prototype lib shipped with Rails 2.3.4 on OS X 10.5.x.

 Thanks,
 Bill

 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: loop effects?

2009-11-14 Thread Alex McAuley

All the effects have an afterFinish property - so you could just 
functionise the effect and call itself again after finish ..
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Hugo Nieto hugofabian...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Saturday, November 14, 2009 3:59 PM
Subject: [Proto-Scripty] Re: loop effects?



Hi, i think its a good one, and if u just wanna put a simple effect
that works fine.

On Nov 14, 1:36 am, patrick patrick99...@gmail.com wrote:
 hi,

 Is the best way to loop an effect to just do:

 setInterval(function() {

 new Effect.pulsate('my_div', {duration: 1})

 }, 1000);

 ?

 -patrick




--~--~-~--~~~---~--~~
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: Stupid me cannot make Ajax.Request work

2009-11-10 Thread Alex McAuley

Ajax.Request will not follow XDR

You have to make the request on the same domain and port else you will have 
to use a wrapper on the server side to go off domain



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: FourBrane men...@mentalware.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 6:15 AM
Subject: [Proto-Scripty] Stupid me cannot make Ajax.Request work



 I am bumfuzzled by what should be a simple thing. I'm using
 prototype 1.6.1. The server side is working. The chkCardNum function
 gets called...but  nothing fires.

 script type=text/javascript
 !--
 function chkCardNum() {
 var notice = $('notice');
 notice.update('Checking card number');
 new Ajax.Request('https://www.somesite/cgi-bin/ajax.cgi',
 {
   method: 'post',
   onSuccess: function(transport) {
 if (transport.responseText.match(/OK/)) {
 notice.update('Card number passes').setStyle({ background:
 '#dfd' });
 }
 else if (transport.responseText.match(/N0/)) {
 notice.update('The card number provided seems to have an
 error.').setStyle({ background: '#fdd' });
 }
   },
   onFailure: function(transport) {
   alert('Something went wrong');
   }
 });
 }
 //--
 /script

 /head
 body
 div
 form name=testform method=post action=#
 pNumber: input align=bottom id=cardnum name=cardnum
 type=text size=20 value= class=monospc onchange=chkCardNum
 ()/p
 p id='notice'/p
 /form
 /div
 /body
 /html

 On the server end, this is all I'm using for this test.
 #!/usr/bin/perl

 print Content-type: text/html\n\n;
 print 'OK';

 Why won't it work?

 
 


--~--~-~--~~~---~--~~
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: ajax request

2009-11-10 Thread Alex McAuley

Could be the web server ...

Alot of web servers have a max number of paralell  requests per user


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: ziva znibers...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 4:05 AM
Subject: [Proto-Scripty] ajax request



 hi everybody
 i have an issue with ajax requests, when i send two requests one after
 the other the second one waits for the first one to finish , and of
 course i specify that they are asynchronous.
 anybody has an explanation for that ?

 
 


--~--~-~--~~~---~--~~
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: PeriodicalExecuter that doesn't stack

2009-11-10 Thread Alex McAuley

I wasn't aware that PeriodicalExecuter did call a URL...

Ajax.PeriodicalUpdater does...


If you want to just call a request every X seconds and change things just 
use PeriodicalExecutor or simply setTimeout

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: williamt willi...@rebelfactions.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 7:55 AM
Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack



 Im looking for a way to make PeriodicalExecuter not stack plus add in
 a max period setting.

 If PeriodicalExecuter could call a function instead of a url I could
 set/clear some flags
 so it would or wouldn't make the call depending on the flags.
 But I don't see how I could do that unless I could make it call a
 function and not a url.

 I think a max period would have to be hacked into prototype. I'm not
 sure on that one though.

 Anyone have any thoughts on how I could achieve this?
 Basically PeriodicalExecuter that doesn't stack plus a max period
 setting.

 Thanks,
 William

 
 


--~--~-~--~~~---~--~~
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: ajax request

2009-11-10 Thread Alex McAuley

And identical (almost) answers !! - how bizarre!!!
Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: T.J. Crowder t...@crowdersoftware.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 11:51 AM
Subject: [Proto-Scripty] Re: ajax request



Hi,

Nearly identical questions at almost the same time. :-)

Here's the other one, where I've posted an answer:
http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/6af62cd45d76f06e

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

On Nov 10, 4:05 am, ziva znibers...@gmail.com wrote:
 hi everybody
 i have an issue with ajax requests, when i send two requests one after
 the other the second one waits for the first one to finish , and of
 course i specify that they are asynchronous.
 anybody has an explanation for that ?



--~--~-~--~~~---~--~~
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: PeriodicalExecuter that doesn't stack

2009-11-10 Thread Alex McAuley

You have answered your own question...

In your original post you said that you could fix the problem if you could 
get Periodical to call a function instead of a url .. and what i suggested 
does just that ...

I am not sure i understand what you mean by stacking

As for frequency: you dont need to worry about it if you are usig periodical 
executor and opposed to updater

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: William Taylor willi...@rebelfactions.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 2:06 PM
Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack



 wow I must have been tired when I wrote that.
 I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater

 So ya is there a way to make Ajax.PeriodicalUpdater not stack and to
 possibly give it
 a maximum frequency limit?

 -William

 On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote:


 I wasn't aware that PeriodicalExecuter did call a URL...

 Ajax.PeriodicalUpdater does...


 If you want to just call a request every X seconds and change things
 just
 use PeriodicalExecutor or simply setTimeout

 Alex Mcauley
 http://www.thevacancymarket.com
 - Original Message -
 From: williamt willi...@rebelfactions.com
 To: Prototype  script.aculo.us 
 prototype-scriptaculous@googlegroups.com
 
 Sent: Tuesday, November 10, 2009 7:55 AM
 Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack



 Im looking for a way to make PeriodicalExecuter not stack plus add in
 a max period setting.

 If PeriodicalExecuter could call a function instead of a url I could
 set/clear some flags
 so it would or wouldn't make the call depending on the flags.
 But I don't see how I could do that unless I could make it call a
 function and not a url.

 I think a max period would have to be hacked into prototype. I'm not
 sure on that one though.

 Anyone have any thoughts on how I could achieve this?
 Basically PeriodicalExecuter that doesn't stack plus a max period
 setting.

 Thanks,
 William





 


 
 


--~--~-~--~~~---~--~~
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: PeriodicalExecuter that doesn't stack

2009-11-10 Thread Alex McAuley
To stop the stacking just use asynchronous flag and set it to false...

Though it does go against the AJAX it will work...

Perhaps you can get around the decay/frequency with somehting else

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: William Taylor 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Tuesday, November 10, 2009 2:48 PM
  Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack


This will call a function and not a url ?  new 
Ajax.PeriodicalUpdater(container, url[, options])stacking: ie multiple request 
will stack on top of each other whether or not the previous one
  has completed or not.
  If this is making a request say every second there is the possibility that 
the request may not finish in time before the
  next one gets fired off. I need a way to prevent that.


  Im using PeriodicalUpdater not PeriodicalExecutor.  I need the frequency and 
decay that Updater provides.


  Thanks,
   William




  On Nov 10, 2009, at 6:17 AM, Alex McAuley wrote:



You have answered your own question...

In your original post you said that you could fix the problem if you could 
get Periodical to call a function instead of a url .. and what i 
suggested 
does just that ...

I am not sure i understand what you mean by stacking

As for frequency: you dont need to worry about it if you are usig 
periodical 
executor and opposed to updater

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: William Taylor willi...@rebelfactions.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 2:06 PM
Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack





  wow I must have been tired when I wrote that.

  I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater



  So ya is there a way to make Ajax.PeriodicalUpdater not stack and to

  possibly give it

  a maximum frequency limit?



  -William



  On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote:





I wasn't aware that PeriodicalExecuter did call a URL...



Ajax.PeriodicalUpdater does...





If you want to just call a request every X seconds and change things

just

use PeriodicalExecutor or simply setTimeout



Alex Mcauley

http://www.thevacancymarket.com

- Original Message -

From: williamt willi...@rebelfactions.com

To: Prototype  script.aculo.us 

prototype-scriptaculous@googlegroups.com



Sent: Tuesday, November 10, 2009 7:55 AM

Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack







  Im looking for a way to make PeriodicalExecuter not stack plus add in

  a max period setting.



  If PeriodicalExecuter could call a function instead of a url I could

  set/clear some flags

  so it would or wouldn't make the call depending on the flags.

  But I don't see how I could do that unless I could make it call a

  function and not a url.



  I think a max period would have to be hacked into prototype. I'm not

  sure on that one though.



  Anyone have any thoughts on how I could achieve this?

  Basically PeriodicalExecuter that doesn't stack plus a max period

  setting.



  Thanks,

  William




























  

--~--~-~--~~~---~--~~
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: PeriodicalExecuter that doesn't stack

2009-11-10 Thread Alex McAuley
It makes the call asynchronous (it will only do one thing at a time) .. so if 
you had a stack of 8 ajax calls it would go through them one by one in 
synchronous fashion until they are done...

If you have other ajax calls going on in the page from different functions - 
this one would sit in the stack until the interpreter is ready and execute then 
(AFAIK)

setting the flag on  one function will not mess with other ajax calls on the 
page..

If you need to check other calls (the number of) use Ajax.ActiveRequestCount - 
it holds a variable (integer) of how many Ajax requests are going on in the 
page at any one time.

HTH


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: William Taylor 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Tuesday, November 10, 2009 4:01 PM
  Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack


  If I turn off async will that only block on that one call or will it block
  other calls from happening also?


  On Nov 10, 2009, at 7:27 AM, Alex McAuley wrote:


To stop the stacking just use asynchronous flag and set it to false...

Though it does go against the AJAX it will work...

Perhaps you can get around the decay/frequency with somehting else

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message -
  From: William Taylor
  To: prototype-scriptaculous@googlegroups.com
  Sent: Tuesday, November 10, 2009 2:48 PM
  Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack


This will call a function and not a url ?  new 
Ajax.PeriodicalUpdater(container, url[, options])stacking: ie multiple request 
will stack on top of each other whether or not the previous one
  has completed or not.
  If this is making a request say every second there is the possibility 
that the request may not finish in time before the
  next one gets fired off. I need a way to prevent that.


  Im using PeriodicalUpdater not PeriodicalExecutor.  I need the frequency 
and decay that Updater provides.


  Thanks,
   William




  On Nov 10, 2009, at 6:17 AM, Alex McAuley wrote:



You have answered your own question...

In your original post you said that you could fix the problem if you 
could 
get Periodical to call a function instead of a url .. and what i 
suggested 
does just that ...

I am not sure i understand what you mean by stacking

As for frequency: you dont need to worry about it if you are usig 
periodical 
executor and opposed to updater

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: William Taylor willi...@rebelfactions.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, November 10, 2009 2:06 PM
Subject: [Proto-Scripty] Re: PeriodicalExecuter that doesn't stack





  wow I must have been tired when I wrote that.

  I said PeriodicalExecuter but I really meant Ajax.PeriodicalUpdater



  So ya is there a way to make Ajax.PeriodicalUpdater not stack and to

  possibly give it

  a maximum frequency limit?



  -William



  On Nov 10, 2009, at 4:00 AM, Alex McAuley wrote:





I wasn't aware that PeriodicalExecuter did call a URL...



Ajax.PeriodicalUpdater does...





If you want to just call a request every X seconds and change things

just

use PeriodicalExecutor or simply setTimeout



Alex Mcauley

http://www.thevacancymarket.com

- Original Message -

From: williamt willi...@rebelfactions.com

To: Prototype  script.aculo.us 

prototype-scriptaculous@googlegroups.com



Sent: Tuesday, November 10, 2009 7:55 AM

Subject: [Proto-Scripty] PeriodicalExecuter that doesn't stack







  Im looking for a way to make PeriodicalExecuter not stack plus 
add in

  a max period setting.



  If PeriodicalExecuter could call a function instead of a url I 
could

  set/clear some flags

  so it would or wouldn't make the call depending on the flags.

  But I don't see how I could do that unless I could make it call a

  function and not a url.



  I think a max period would have to be hacked into prototype. I'm 
not

  sure on that one though.



  Anyone have any thoughts on how I could achieve this?

  Basically PeriodicalExecuter that doesn't stack plus a max period

  setting.



  Thanks,

  William



































  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group

[Proto-Scripty] Re: Some basic basic stuff

2009-11-08 Thread Alex McAuley
Its happening because (as someone pointed out in a previous reply) the DOM node 
does not exist yet .

you need to wrap the code in observers...

for example...

Event.observe(window,'load',function() {

$('TheElementToHideObserver').observe('click',function() {
$('firstname').hide();


});
});

//Then your html


input type=submit id=TheElementToHideObserver value=Hide First Name /
hr /
input type=text name=firstname id=firstname /




Simple as that

HTH


Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Eugene Hourany 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Monday, November 09, 2009 7:04 AM
  Subject: [Proto-Scripty] Re: Some basic basic stuff


  I never put in a name attribute, that could be part of the problem.

  I solved it by putting it in a function that's called by onclick, and it 
worked. I was able to reference it the old fashioned JS way, and prototype's 
way.

  Now all I want to know is how to load and parse a JSON file using the same 
method.

  Thanks!

  Eugene


  On Sat, Nov 7, 2009 at 1:45 PM, kstubs kst...@gmail.com wrote:


Try naming the ID attribute different than the NAME attribute.


On Nov 7, 12:49 pm, bill will...@techservsys.com wrote:
 Eugene Hourany wrote:
  Hi all,

  I'm tearing my hair out trying to figure out why I keep getting a
  element is null error. Here's what my code looks like:

  $('firstname').hide();

  and I have

  input id=firstname name=firstname value= /

  and I get

  Error: $(firstname) is null
  Source File:
  file:///C:/Documents%20and%20Settings/142253/Desktop/test/index.html#
  Line: 14

  I'm doing this locally from my desktop. I'm using prototype 1.6.1.

 do you have the input declaration before the execution of the
 $('firstname').hide();

 If you execute the js before the input is declared, the id will not exist.

 bill

 --
 Bill Drescher
 william {at} TechServSys {dot} 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: Ajax.Request not sending request to server in IE8, but processing continues with stale/cached response

2009-11-07 Thread Alex McAuley
IE and a couple of other browsers cache get requests...

If you want to fix it either use TJ's suggestion or use post and not get

Alex Mcauley
http://www.thevacancymarket.com
  - Original Message - 
  From: Brad Whitaker 
  To: prototype-scriptaculous@googlegroups.com 
  Sent: Friday, November 06, 2009 11:02 PM
  Subject: [Proto-Scripty] Re: Ajax.Request not sending request to server in 
IE8, but processing continues with stale/cached response


  T.J.,

  Thank you very much for the response. The problem is reproducible in my 
development environment where I verified using Firebug that no Expires header 
is set on the Ajax response.

  I tried your last resort suggestion and the problem goes away. (I know it 
is a hack but I'm going to deploy it because I need a quick fix).

  I'll see if I can produce and submit a minimalist example that reproduces the 
problem.

  Thanks,

  Brad


  T.J. Crowder wrote: 
Hi Brad,

Can you produce a minimalist, self-contained example[1] demonstrating
the problem?  It sounds a bit like an IE8 issue, as I thought all XHR
requests were supposed to bypass local cache, but perhaps I'm wrong
about that.

Are you sure you're setting the cachability of the result correctly?
E.g., that it should not be cached?  (This would be in the headers of
the result.)  You might want to check your cache-control headers.

In the worst case (and this really should be a last resort), you
should be able to defeat caching by adding a query parameter that's
constantly changing, e.g.:

new Ajax.Request(url + ?foo= + (new Date().getTime()), ...);

[1] http://proto-scripty.wikidot.com/self-contained-test-page

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


On Nov 3, 8:46 pm, Brad Whitaker b...@agilemark.com wrote:
  I'm having a problem with Ajax.Request in IE8 that I can't understand.
My code is working fine in other browsers. If I use the IE8 menu to
clear the browser cache to my domain then my next Ajax.Request() works
properly. But when Ajax.Request is invoked again this problem arises:
1) no request is actually sent to my server; 2) processing continues
normally but the content I see is from the previous request (in other
words, it is old content).

Any suggestions about how I might resolve this issue would be greatly
appreciated. onSuccess and onComplete are both being invoked even when
the server request is not issued. (In case additional details are
helpful: I'm invoking Ajax.Request() from within Prototype-UI
window.js setAjaxContent() function, and the content is used to fully
populate a modal window).

Thanks,

Brad


  

--~--~-~--~~~---~--~~
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: Mouseenter mouseleave aren't working correctly under FF.

2009-11-07 Thread Alex McAuley

Its more than likely the findElement() that isnt working as the console.log 
without using it works fine...

What about somehting like this...

var el=event.element(event);
$(el).addClassName('doesntwork');



Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: indigo indigomarf...@hotmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, November 06, 2009 1:13 AM
Subject: [Proto-Scripty] Mouseenter  mouseleave aren't working correctly 
under FF.



 When you have some text input fields and you observe it for
 mouseenters or leaves, it doesn't work correctly under Firefox 2.0+.
 Everything works great under Safari, IE and Chrome.
 I guess this problem has something to do with the famous Firefox
 cursor bug.

 This works incorrect (only when you move very slowly over the input
 fields, and event will fire):

 [CODE]

 $$('input').each(function(current) {

 Event.observe(current,'mouseenter',function(event) {
 event.findElement().addClassName('doesntwork');
 });

 Event.observe(current,'mouseleave',function(event) {
 event.findElement().removeClassName('doesntwork');
 });

 });

 [/CODE]


 This works correct:

 [CODE]

 $$('input').each(function(current) {

 Event.observe(current,'mouseenter',function(event) {
 console.log('enter');
 });

 Event.observe(current,'mouseleave',function(event) {
 console.log('leave');
 });

 });

 [/CODE]


 If someone could find a fix for this, that would really help me out.

 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: Ajax.Request with JSON response

2009-10-31 Thread Alex McAuley

If its Json then the alert would be...

alert(jsonObj.success);

HTH

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: mjhaston mjhas...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, October 30, 2009 1:21 PM
Subject: [Proto-Scripty] Re: Ajax.Request with JSON response



 The success alert fires off, but not the feeling ok alert.



function ajaxRequest2(){
var url = /cgidev2p/r_chgpwd.pgm;
var pars = 'v_current=' + escape($F('v_current')) +
 'v_new=' + escape($F('v_new')) + 'v_confirm=' + escape($F
 ('v_confirm')) + 'sessionid=' + escape($F('sessionid'));
//var submitObj = document.getElementById('goButton');
new Ajax.Request(url, {
method: 'get',
contentType: 'application/json',
parameters: pars,

onSuccess: function(transport){
alert(Success);
var jsonObj = transport.responseJSON;
alert('feelingOk:' + jsonObj['success']);
},
onComplete: function(transport){
alert(Complete);
}
});
}

 
 


--~--~-~--~~~---~--~~
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 do you emulate what rjs does in rails with form.request?

2009-10-30 Thread Alex McAuley

Split the response or make it a JSON response and loop it or...

evalScripts:true

and have the serverside do the updating

Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: patrick patrick99...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Friday, October 30, 2009 4:33 PM
Subject: [Proto-Scripty] how do you emulate what rjs does in rails with 
form.request?



 Hi,

 So, if I have a controller action with an rjs template that does
 page.replace_html on several different elements, how can I accomplish
 this same update of multiple elements in my regular js functions?

 For example, I have a controller: and in it I do:
 def some_action
  render :partial = 'some_path/blah'
 end

 ...  Then in my js code, I do:
 $('my_form').request({onComplete:
 function(r) {
 $('some_div').update(r.responseText);
 }
 });

 But how could I do the same thing but update 3 or 4 divs with
 different partials?

 Is rjs really the best way to deal with this sort of thing?

 -patrick
 
 


--~--~-~--~~~---~--~~
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] Event....

2009-10-29 Thread Alex Mcauley

Is there a way to spoof the window event ...

Basically i have  script where the core relies on event being passed
to it to work some stuff out but in one particular script i cant pass
the event object because it goes to a server side script then back
again... is it possible to spoof it - or even collect it as post/get
data so i can pass it back along to the script...

i tried

var e=window.event

but its returned as undefined

Thanks in advance
--~--~-~--~~~---~--~~
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: Event....

2009-10-29 Thread Alex McAuley

Sorry -  disregard

The function before the one called (the callee) has an event so i just did 
window.lastEvent=event instead so i can now access it

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: Alex Mcauley webmas...@thecarmarketplace.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, October 29, 2009 1:29 PM
Subject: [Proto-Scripty] Event



 Is there a way to spoof the window event ...

 Basically i have  script where the core relies on event being passed
 to it to work some stuff out but in one particular script i cant pass
 the event object because it goes to a server side script then back
 again... is it possible to spoof it - or even collect it as post/get
 data so i can pass it back along to the script...

 i tried

 var e=window.event

 but its returned as undefined

 Thanks in advance
 
 


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

2009-10-29 Thread Alex McAuley

because it gets values from anything (selects that can have multiples 
aswell) ...

Where as value on a multiple select would not.!!


Alex Mcauley
http://www.thevacancymarket.com
- Original Message - 
From: Russell Keith russell.ke...@aacreditunion.org
To: prototype-scriptaculous@googlegroups.com
Sent: Thursday, October 29, 2009 3:27 PM
Subject: [Proto-Scripty] Re: Forms



Then how is $F() any different than $()?

Also, any idea why I can't get my form to submit.  I have been all over
Google and can't figure it out.

-Original Message-
From: prototype-scriptaculous@googlegroups.com
[mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of Walter
Lee Davis
Sent: Thursday, October 29, 2009 10:24 AM
To: prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Re: Forms


Try giving your form elements IDs to match their NAME property. I have
always needed the ID to be set in order to get a value out of $F.

Walter

On Oct 29, 2009, at 11:08 AM, Russell Keith wrote:

 Ok, maybe I'm just being dense, but I am reading the API for forms
 and I am getting nothing from it.

 What is proper use of the $F utility and what can it do for me?  I
 have read the Form.Element.getValue and it means nothing to me.

 I have this form:

 form name=createPDF action=/pdf/pdf_process.php
 method=POST
 input type=hidden name=A_NAME value=John /
 input type=hidden name=APPLY_DATE value=?=date(m/d/Y)?
  /
 input type=hidden name=A_BIRTH_DATE value=01/01/01 /
 input type=hidden name=L_NAME value=Jane /
 input type=hidden name=L_BIRTH_DATE value=01/01/01 /
 input type=hidden name=A_ACCOUNT value=1 /
 /form

 When I try to do alert($F('A_NAME')); I get an 'Object does not
 support this property or method' error.  I get the same error when I
 try to submit the form with 'document.createPDF.submit();' is there
 something wrong with my form?

 








--~--~-~--~~~---~--~~
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: resource information - navigation menu

2009-10-27 Thread Alex McAuley

I wrote a quick and dirty windows style start menu for an application the 
other day..

If you want to learn the concepts check out the code at 
http://pastie.org/671380

Some of it is only relevant to my application but thats easy enough to pick 
out...

Each time somehting in my start menu is hovered (if it has a certain 
classname) it makes an Ajax Request to my server to get the latest possible 
sub menu's for that menu item (you wont need to do this if your application 
is static) ..

There is probably a better way to do this but i needed flexability and i had 
not written a menu before so i thought i would have a crack at it... It took 
about 15 minutes to write so it isn't all that complicated - if you need any 
explination please ask.

HTH

Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: MEM tal...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, October 27, 2009 9:38 AM
Subject: [Proto-Scripty] resource information - navigation menu



Hello all,

I'm on my way for building a menu using javascript.

If I search for js menu on google, I get 23523523 free build now menus
etc...
But I would like to understand and see, the process involving the creation
of a js menu that needs to be unobtrusive.

For this database menu I need to:
Have a menu that, when the user clicks:
a) show the child elements of that clicked parent.
b) change the URL.
I don't mind about reloading.

The server side part:
1) Construct an array from a query.
2) Build a ul/li List based on that array
3) Print it out to the page.

The client-side part:
4) I suppose I should I give to the li and ul some ids, so that we can show
child elements only when a specific parent is clicked? But we add this ul/li
ids on the server side code, or on the client-side code?

5) Each time the user clicks on a menu item, the URL must change. How to
preserve the menu estates over this url changes?


Some questions may not make too much sense for an experimented look, and are
related with my confusion, but what I really like to understand is the
procedures for creating something like this.

Could I have your help on this?


Thanks a lot,
Márcio





--~--~-~--~~~---~--~~
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: resource information - navigation menu

2009-10-27 Thread Alex McAuley

Sorry Marcio i am not sure i understand fully what you need ...

Do you have an example from a site that maybe you have seen somewhere that i 
can visualise on?


Alex Mcauley
http://www.thevacancymarket.com


- Original Message - 
From: MEM tal...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, October 27, 2009 10:46 AM
Subject: [Proto-Scripty] Re: resource information - navigation menu



Thanks Alex... well... sometimes, I get some comments that just kills my
orientation mood:

Here's a reply from a php list:

Quoting:

essentially what you are saying is:

1) user is presented with the basic navigation menu
2) user clicks an item and page navigates somewhere else
3) because of the item user clicked in 2) display some extra menu items

That's not a menu, it's just a navigation bar that changes slightly
depending on where you are in the site...

So maybe my focus should not be on the click event but on the url changes?


Putting the thinks like this, should I still think on js for this job?

What do you think?


Thanks a lot,
Márcio




 -Original Message-
 From: prototype-scriptaculous@googlegroups.com [mailto:prototype-
 scriptacul...@googlegroups.com] On Behalf Of Alex McAuley
 Sent: terça-feira, 27 de Outubro de 2009 10:09
 To: prototype-scriptaculous@googlegroups.com
 Subject: [Proto-Scripty] Re: resource information - navigation menu


 I wrote a quick and dirty windows style start menu for an application
 the
 other day..

 If you want to learn the concepts check out the code at
 http://pastie.org/671380

 Some of it is only relevant to my application but thats easy enough to
 pick
 out...

 Each time somehting in my start menu is hovered (if it has a certain
 classname) it makes an Ajax Request to my server to get the latest
 possible
 sub menu's for that menu item (you wont need to do this if your
 application
 is static) ..

 There is probably a better way to do this but i needed flexability and
 i had
 not written a menu before so i thought i would have a crack at it... It
 took
 about 15 minutes to write so it isn't all that complicated - if you
 need any
 explination please ask.

 HTH

 Alex Mcauley
 http://www.thevacancymarket.com


 - Original Message -
 From: MEM tal...@gmail.com
 To: prototype-scriptaculous@googlegroups.com
 Sent: Tuesday, October 27, 2009 9:38 AM
 Subject: [Proto-Scripty] resource information - navigation menu



 Hello all,

 I'm on my way for building a menu using javascript.

 If I search for js menu on google, I get 23523523 free build now menus
 etc...
 But I would like to understand and see, the process involving the
 creation
 of a js menu that needs to be unobtrusive.

 For this database menu I need to:
 Have a menu that, when the user clicks:
 a) show the child elements of that clicked parent.
 b) change the URL.
 I don't mind about reloading.

 The server side part:
 1) Construct an array from a query.
 2) Build a ul/li List based on that array
 3) Print it out to the page.

 The client-side part:
 4) I suppose I should I give to the li and ul some ids, so that we can
 show
 child elements only when a specific parent is clicked? But we add this
 ul/li
 ids on the server side code, or on the client-side code?

 5) Each time the user clicks on a menu item, the URL must change. How
 to
 preserve the menu estates over this url changes?


 Some questions may not make too much sense for an experimented look,
 and are
 related with my confusion, but what I really like to understand is the
 procedures for creating something like this.

 Could I have your help on this?


 Thanks a lot,
 Márcio










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



  1   2   3   4   5   >