Re: [Proto-Scripty] Re: problem with Prototye and linux/apache2, php

2019-01-25 Thread Alastair Young
If you enter the URL of the php script directly into the browser address
bar does the server parse it as php?
Can you share the javascript that is making the ajax request?
In developer mode on your browser do you see any javascript errors?

cheers al

On Fri, 25 Jan 2019 at 11:26, william drescher 
wrote:

> On 1/24/2019 6:36 PM, Walter Lee Davis wrote:
> > Can you try adding a debug page in your web root? Something like  phpinfo(); ?>. Name that debug.php and visit it in a browser. See if it
> loads as php, and if it does, see if it runs as php. It sounds to me as
> though your apache server is not currently configured to use mod_php and
> interpret the code.
> >
> > Walter
>
> Thank you.  The login page is php and the main page is php and
> both load and are interpreted.  The pages loaded through AJAX are
> the ones not being interpreted.
> bill
> >
> >> On Jan 24, 2019, at 8:05 AM, william drescher 
> wrote:
> >>
> >> I have a large application that runs on a Ubuntu server and uses
> prototype 1.7 and scriptaculous.js 1.9.0.
> >>
> >> I just updated The OS from ubuntu 16.04 LTS to ubuntu 18.04 LTS. The
> login page loads fine, but when the main page loads it displays the php
> script that is loaded via AJAX as text, ie it is not interpreted.
> >> Then. after about 1 second, the page exits and goes back to the login
> page.
> >>
> >> A login failure redirects to the login page without displaying any of
> the main page.  So this is not a login failure.
> >>
> >> Everything was fine under ubuntu 16.04 LTS.
> >>
> >> Any thought as to what might be happening and/or any thoughts on
> debugging it.
> >>
> >> Here is the Apache2 error log:
> >> ...
> >> [Wed Jan 23 09:50:18.803176 2019] [core:notice] [pid 1603] AH00094:
> Command line   : '/usr/sbin/apache2'
> >> [Wed Jan 23 14:53:09.818285 2019] [mpm_prefork:notice] [pid 1603]
> AH00169: caugh   t SIGTERM, shutting down
> >> [Wed Jan 23 14:53:09.949489 2019] [mpm_prefork:notice] [pid 2933]
> AH00163: Apach   e/2.4.29 (Ubuntu)
> configured -- resuming normal operations
> >> [Wed Jan 23 14:53:09.949550 2019] [core:notice] [pid 2933] AH00094:
> Command line   : '/usr/sbin/apache2'
> >> [Wed Jan 23 15:02:24.216059 2019] [mpm_prefork:notice] [pid 2933]
> AH00169: caugh   t SIGTERM, shutting down
> >> [Wed Jan 23 15:03:17.252870 2019] [mpm_prefork:notice] [pid 1426]
> AH00163: Apach   e/2.4.29 (Ubuntu)
> configured -- resuming normal operations
> >>
> >> -bill
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups "Prototype & script.aculo.us" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> >> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> >> Visit this group at
> https://groups.google.com/group/prototype-scriptaculous.
> >> For more options, visit https://groups.google.com/d/optout.
> >
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> Visit this group at
> https://groups.google.com/group/prototype-scriptaculous.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at https://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.


Re: [Proto-Scripty] Re: Is it vulnerable to Code Injection ? How is the risk level here?

2014-02-06 Thread Phil Petree
If I understand your question correctly,  prototype doest actually render
anything all it does is manipulate the page elements.  All the rendering is
done by the browser.

Im also not aware of any strings that would need to be internationalized.
If something goes wrong you get a JavaScript error.
On Feb 6, 2014 12:02 AM,  wrote:

> Hello,
> I have been working with Prototype.js these days and beside the project i
> am working in i also need some " theoritical " answers...since i am new i
> hope someone out there can help me.
> I need to know about the rendering technology the PrototypeJS uses and
> something about Internationalization
>
> Thank you in advance :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> Visit this group at http://groups.google.com/group/prototype-scriptaculous
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Proto-Scripty] Re: addClassName and removeClassName don´t work

2013-07-17 Thread Joseph Lust
Ran into this issue on Prototype 1.5.1 and IE8.

The error is in the array without() function in IE8. without() should 
return an empty array if the array sans element is empty, or the array with 
that element removed.

In IE8, if there are no elements left in the array after the target element 
is removed, *undefined* is returned, breaking anything chained after that.

  remove: function(classNameToRemove) {
if (!this.include(classNameToRemove)) return;
this.set($A(this).*without(classNameToRemove)*.join(' '));
  },

The actual source was that without() internally uses each() to iterate 
across the elements, but the DOMAssistant library have overwritten 
Element.each(). The new version could not catch the breaks that are thrown 
by Prototype to escape from deep nested iterators, and hence the error. 
Thus, the two libs should not be used in conjunction. It seems that other 
browsers don't overwrite the Element.each() method when loading the two 
libs like IE does.



Sincerely,
Joseph

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Proto-Scripty] Re: Need Help With Prototype Selectors API

2013-07-16 Thread Jason Westbrook
If you want to select any elements that are child of a specific element you
can do so like this

$('myparentelement').select('span');

will select all spans that are children of the element with id
myparentelement

Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com


On Tue, Jul 16, 2013 at 1:13 AM, Ubik  wrote:

> I guess you need to include Prototype in the parent document too.
> BTW, use $$ to select elements in your document: $$('div') will give you
> any DIV element in your current document, almost like
> document.querySelectorAll; use $( id ) as a replacement of
> document.getElementById( id )
>
>
> On Monday, July 15, 2013 10:14:05 PM UTC+2, Balaram Das Mahant wrote:
>>
>> I am new to Prototype, I have a webpage and an iframe in it. I am loading
>> Prototype in my iframe and am trying to use Selector API to get DOM
>> references for elements of my parent window.
>> Eg:
>> Selector.findChildElements(**document,['div']) is returning references
>> to DIV elements of iframe's document. But,Selector.**
>> findChildElements(parent.**document,['div']) is not returning any
>> references to DIV elements of parent's document. Instead, giving an error 
>> "TypeError:
>> Cannot call method 'identify' of null". When I deep dive into code, I
>> find 'Element' is actually adding 'identify' method (which is in my iframe
>> context, which is addigning a dummy 'id' attribute). First of all my
>> understanding of Prototype and its Selector API is poor, please suggest a
>> way I can use Selector API to fetch references to DOM elements of my parent
>> document.
>>
>> Thanks in Advance.
>> -Balaram.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> Visit this group at http://groups.google.com/group/prototype-scriptaculous
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Proto-Scripty] Re: Draggables inside div with overflow:scroll

2013-05-08 Thread Phil Petree
Neither the original example or Jasons worked in IE9 with or without
compatibility view

On Tue, May 7, 2013 at 8:48 PM,  wrote:

> Thank you both! I will give it a try. The example in jsfiddle is basic. I
> have more functionality in my actual script and will look how the solution
> interferes with other parameters. But the Jason's example in jsfiddle looks
> very promising ;)
>
> Am Dienstag, 7. Mai 2013 13:30:01 UTC+2 schrieb ayso...@gmail.com:
>
>> I have created two divs. One is for draggable objects. Another for the
>> area where they should be dropped.
>> The both divs should have the same height and if there are large number
>> of draggables to have scrollbar.
>>
>> When I add *overflow: scroll* to the div with draggable objects, then
>> drag-and-drop functionality is screwed up.
>> Please see an example here 
>> http://jsfiddle.net/**nB8PC/1/
>> To reproduce my issue just enable *overflow:scroll* in CSS window (upper
>> right, it is commented out) and run the script again.
>>
>> Is there any solution for it?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: [Proto-Scripty] Re: How to prevent doubleclicking on links

2013-03-15 Thread Jason Westbrook
What you are probably detecting is not just the double click event but a
second click event that is delayed enough from the original click to cause
a new click event

so what I propose is to identify if you are currently running the click
handler then either stop() the 2nd event or return inside the handler




Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com


On Fri, Mar 15, 2013 at 4:38 AM, Maciej Zaleski wrote:

>
> Ok, seems to be fixed in about 80%.
>>
>I added line ondblclick = "javascript:location.reload()" to my div,
> and every time user is doubleclicking on menu, page doesn't break but
> its being refreshed instead.
> It's not perfect solution but it works. If u have better one , plese write.
>
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prototype-scriptaculous+unsubscr...@googlegroups.com.
> To post to this group, send email to
> prototype-scriptaculous@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: [Proto-Scripty] Re: Prototype Ajax.Request POST failure in Internet Explorer 8

2013-03-15 Thread Rachid B.
Hi Parikshit Tiwari ,

Have you found a solution to this problem? I searched on the web for 2 days 
but I found nothing.
I'm completely stuck.

Thx



Le jeudi 6 décembre 2012 02:58:30 UTC+1, Parikshit Tiwari a écrit :
>
> epoch,
> How were you able to send the handshake? what did you do to send out 
> the handshake was it something in the json packet that caused the browser 
> to think that it was a response from the auth server? Please let me know, 
> because I am facing a similar issue with IE8 and my server also uses LDAP 
> server for authentication. 
>
> Thanks,
> Parik
>
> On Thursday, April 22, 2010 1:58:07 AM UTC-7, epoch wrote:
>>
>> Hi Again 
>>
>> I have finally completed my debugging session and found the problem, 
>> the problem was the NTLM authentication, seems like IE 
>> needs a handshake from the server when it sends the blank request, as 
>> soon as i send the handshake, the original Ajax.Request gets executed 
>> again automatically 
>>
>> So consider this question closed, hope this thread helps other people 
>> aswell. 
>>
>> Cheers everyone 
>>
>> On Apr 21, 9:58 am, epoch  wrote: 
>> > Hi Again 
>> > 
>> > Just an update, i have done further debugging and have finally found 
>> > the problem after looking at the request headers with fiddler. 
>> > the problem is that our system uses LDAP, the server is challenged 
>> > with WWW-Authenticate at the login page only once. 
>> > 
>> > now only in internet explorer if I wait more than 30 seconds IE seems 
>> > to add an "Authorization" header to the Prototype request and drops 
>> > the query string. 
>> > So in other words i do not think that this is a prototype error but 
>> > rather a server side error, i will now try to remove that header 
>> > before the request. 
>> > 
>> > If anybody else has any input, please share. 
>> > 
>> > Thanks guys! 
>> > 
>> > On Apr 20, 4:12 pm, epoch  wrote: 
>> > 
>> > 
>> > 
>> > > Hi Guys 
>> > 
>> > > This is my first post. firstly i would like to congratulate everyone 
>> > > who helped make prototype awesome! 
>> > 
>> > > Secondly I have a very strange problem, I would consider myself very 
>> > > well versed with Prototype (been using it more than one year) 
>> > 
>> > > It appears my ajax request's stop executing after 20-30 seconds of 
>> the 
>> > > previous ajax request (not page load). 
>> > > I have debugged this and found out that prototype does indeed have 
>> the 
>> > > parameters and sends it successfully (without errors), but my server 
>> > > side handler (a jsp) returns all request.getParameter("variable") 
>> > > calls null. 
>> > 
>> > > if I then start clicking the button that makes the ajax request 
>> > > quickly in succession, it starts receiving the parameters again? 
>> > 
>> > > this only happens when using the post method which in turn sends 
>> using 
>> > > xmlhttp.send(postBody). also if i manually append the parameters to 
>> > > the url and use xmlhttp.send(null), everything works as expected 
>> > 
>> > > This only affects internet explorer, other browsers work perfectly. 
>> > > this made me think that the underlying XMLHttpRequest object has a 
>> > > problem. 
>> > 
>> > > Unfortuntally i do not have the neccesarry skill to continue 
>> debugging 
>> > > further. Can anyone please assist me with this? 
>> > 
>> > > here is a code example of how I can create the problem automatically 
>> > > (with IE) : 
>> > 
>> > > var xu = function(o) { 
>> > > new Ajax.Request('AjaxComponentServlet', { 
>> > > parameters: { 
>> > > action: 'TESTER ' + o + ' ' + new Date(), 
>> > > random: Math.random() 
>> > > }, 
>> > > method: 'post' 
>> > > }); 
>> > > window.setTimeout('xu(' + (o + 1) + ')', (o*1)); 
>> > > } 
>> > 
>> > > Event.observe(window, 'load', function() { 
>> > > window.setTimeout('xu(1)', 1 * (1000 * 10)); 
>> > > }); 
>> > 
>> > > -- 
>> > > You received this message because you are subscribed to the Google 
>> Groups "Prototype & script.aculo.us" group. 
>> > > To post to this group, send email to prototype-s...@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-s...@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 subscr

Re: [Proto-Scripty] Re: Prototype Ajax.Request POST failure in Internet Explorer 8

2013-03-15 Thread Rachid B.
Hi Epoch,

I have the same problem with IE8. I use NTLM authentication. All my POST 
request are just ignored by the server.

Please what did you do to solve this ?

Thx.

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




Re: [Proto-Scripty] Re: Toggle opacity

2013-01-24 Thread Phil Petree
I might be late to this show but this is what I use:

// get the form DOM
var form = $('myform');
// Now, disable the form!
form[form.disabled ? 'enable' : 'disable']();
// now show it as visually disabled
$('myform').setStyle({opacity: 0.5});

On Wed, Jan 23, 2013 at 11:15 AM, Köd  wrote:

> Thanks for your replies. I will look into them, though I have tried to get
> multiple to work - without success. I was wondering if you had read my post
> on stackoverflow? Maybe you could see if there was a different solution to
> my little issue, it's driving me mad!
>
> Den onsdag den 23. januar 2013 13.48.43 UTC+1 skrev Köd:
>>
>> Hi guys
>> *
>> To get a full view of my problem, please read: http://stackoverflow.com/
>> questions/14478903/script-aculo-us-toggle-appear-on-multiple-divs
>> *__**___
>>
>> *I have a simple question to ask you:*
>> Is it possible to use effect.opacity as a toggle effect?
>>
>> The reason why I'm asking this is because when using effect.opacity the
>> assigned function can be spammed, hence making the div appear/fade over and
>> over. I was thinking that it might would be possible to do so by changing
>> something in the scriptaculous.js or effects.js file.
>>
>>
>> If this is not possible, I would like to ask how you can use
>> Effect.Toggle (appear) on multiple div's within an  containing an
>> onclick. An example:
>>
>> 
>>
>>
>> Thanks.
>>
>  --
> 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/-/4HT0A3QJPDYJ.
> 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.
Visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Proto-Scripty] Re: Object doesn't support property or method but then kinda works...

2013-01-17 Thread Phil Petree
Hi Greg!

Thanks for looking at this...

Turns out that if I remove the submit handler from the wizard class and
stop trapping the submit button it works just fine...

Not sure why this oddity is but it is and it works...

P~

On Wed, Jan 16, 2013 at 8:57 PM, greg  wrote:

> Off the top of my head, I think the target of your form should be the id
> of the iframe.
>
>  --
> 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/-/sJgH4TRvAu8J.
> 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: event on leaving page

2013-01-10 Thread sreekala . a
I tried this code before window close.But again i get a pop up like " This 
page is asking you to confirm that you want to leave - data you have 
entered may not be saved".Two pop-ups are not needed.
window.onbeforeunload = function() {
var r=confirm("Are you sure you want to navigate away?");
if (r==false)
  {
 return false;
  }
 
 }

>

-- 
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/-/o0lXyGlNh4cJ.
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: AJAX Tabs Widget

2012-12-31 Thread Phil Petree
Victor,

Thanks for the links... I'd already seen control.tabs and it doesn't appear
to support ajax (if it does its not documented and the api makes no
reference to it).

The one on sourceforge appears to be a fork of the control.tabs and also I
do see references to ajax in the source, it has no documentation or
examples and I'm afraid its beyond my abilities to decipher it.

The tabs.js I was using was working well but I hit a snag in it in that it
has no callback after the ajax onSuccess so I have no ability to trigger
other events... not sure what the workaround is... the author has an
afterOpen: callback but it doesn't get called on new tabs with an ajax load.

Not sure where I will go from here... may switch the entire project to
jq... may have to in order to meet the lauch date (2/1/2013) this seems
to be the sticking point however as all the other functionality is stubbed
in.



On Sun, Dec 30, 2012 at 4:49 PM, Victor  wrote:

>
>
>> I'm now looking for/at tab controls that support ajax calls.  The few
>> that I've found are pretty static in that you can assign tab "A" to a
>> specific AJAX request but you have no ability to dynamically create/destroy
>> tabs.
>>
>
> LivePipe Control.Tabs: http://livepipe.net/control/tabs + somewhere on
> github is extended AJAXified version
>
> or (based on LivePipe, added possibility to load content into tab via AJAX
> request)
>
> http://javascripts.svn.sourceforge.net/viewvc/javascripts/javascripts/js.ui/js/ui/control.tabs.js?revision=322&view=markup
> (it isn't self-sufficient, it requires CSS and other JS files from the
> same project - ask me for details if you want)
>
>>  --
> 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/-/e6ESu2NmfY4J.
> 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: Future of Prototyp.js

2012-12-31 Thread Jason Westbrook
I was able to dig this one out of archive.org and I rewrote it a bit -
added a jsfiddle so that people can play with it etc


https://github.com/jwestbrook/Prototype.3DImageReflection


Just look at all of my github repos - they are all PrototypeJS libraries



Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com


On Sun, Dec 30, 2012 at 4:22 PM, Phil Petree  wrote:

> Amen... that would definately be a good move!  There are a number of
> things on scripteka that are dead and gone (broken links)
>
>
> On Sun, Dec 30, 2012 at 5:37 PM, Victor  wrote:
>
>>
>>> I'm actually planning on taking whatever is still available on scripteka
>>> and rehosting it on github so that others can find it, see examples of it
>>> working, post issues and comment on the scripts
>>>
>>> Good idea! Do you have something to show already? Examples and issue
>> tracking sounds good.
>>
>> --
>> 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/-/OvY44Z4adecJ.
>> 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.
>

-- 
You received 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: Future of Prototyp.js

2012-12-30 Thread Phil Petree
Amen... that would definately be a good move!  There are a number of things
on scripteka that are dead and gone (broken links)

On Sun, Dec 30, 2012 at 5:37 PM, Victor  wrote:

>
>> I'm actually planning on taking whatever is still available on scripteka
>> and rehosting it on github so that others can find it, see examples of it
>> working, post issues and comment on the scripts
>>
>> Good idea! Do you have something to show already? Examples and issue
> tracking sounds good.
>
> --
> 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/-/OvY44Z4adecJ.
> 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: Future of Prototyp.js

2012-12-30 Thread Victor

>
>
> I'm actually planning on taking whatever is still available on scripteka 
> and rehosting it on github so that others can find it, see examples of it 
> working, post issues and comment on the scripts
>
> Good idea! Do you have something to show already? Examples and issue 
tracking sounds good.

-- 
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/-/OvY44Z4adecJ.
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: Prototype Ajax.Request POST failure in Internet Explorer 8

2012-12-16 Thread Parikshit Tiwari
epoch,
How were you able to send the handshake? what did you do to send out 
the handshake was it something in the json packet that caused the browser 
to think that it was a response from the auth server? Please let me know, 
because I am facing a similar issue with IE8 and my server also uses LDAP 
server for authentication. 

Thanks,
Parik

On Thursday, April 22, 2010 1:58:07 AM UTC-7, epoch wrote:
>
> Hi Again 
>
> I have finally completed my debugging session and found the problem, 
> the problem was the NTLM authentication, seems like IE 
> needs a handshake from the server when it sends the blank request, as 
> soon as i send the handshake, the original Ajax.Request gets executed 
> again automatically 
>
> So consider this question closed, hope this thread helps other people 
> aswell. 
>
> Cheers everyone 
>
> On Apr 21, 9:58 am, epoch  wrote: 
> > Hi Again 
> > 
> > Just an update, i have done further debugging and have finally found 
> > the problem after looking at the request headers with fiddler. 
> > the problem is that our system uses LDAP, the server is challenged 
> > with WWW-Authenticate at the login page only once. 
> > 
> > now only in internet explorer if I wait more than 30 seconds IE seems 
> > to add an "Authorization" header to the Prototype request and drops 
> > the query string. 
> > So in other words i do not think that this is a prototype error but 
> > rather a server side error, i will now try to remove that header 
> > before the request. 
> > 
> > If anybody else has any input, please share. 
> > 
> > Thanks guys! 
> > 
> > On Apr 20, 4:12 pm, epoch  wrote: 
> > 
> > 
> > 
> > > Hi Guys 
> > 
> > > This is my first post. firstly i would like to congratulate everyone 
> > > who helped make prototype awesome! 
> > 
> > > Secondly I have a very strange problem, I would consider myself very 
> > > well versed with Prototype (been using it more than one year) 
> > 
> > > It appears my ajax request's stop executing after 20-30 seconds of the 
> > > previous ajax request (not page load). 
> > > I have debugged this and found out that prototype does indeed have the 
> > > parameters and sends it successfully (without errors), but my server 
> > > side handler (a jsp) returns all request.getParameter("variable") 
> > > calls null. 
> > 
> > > if I then start clicking the button that makes the ajax request 
> > > quickly in succession, it starts receiving the parameters again? 
> > 
> > > this only happens when using the post method which in turn sends using 
> > > xmlhttp.send(postBody). also if i manually append the parameters to 
> > > the url and use xmlhttp.send(null), everything works as expected 
> > 
> > > This only affects internet explorer, other browsers work perfectly. 
> > > this made me think that the underlying XMLHttpRequest object has a 
> > > problem. 
> > 
> > > Unfortuntally i do not have the neccesarry skill to continue debugging 
> > > further. Can anyone please assist me with this? 
> > 
> > > here is a code example of how I can create the problem automatically 
> > > (with IE) : 
> > 
> > > var xu = function(o) { 
> > > new Ajax.Request('AjaxComponentServlet', { 
> > > parameters: { 
> > > action: 'TESTER ' + o + ' ' + new Date(), 
> > > random: Math.random() 
> > > }, 
> > > method: 'post' 
> > > }); 
> > > window.setTimeout('xu(' + (o + 1) + ')', (o*1)); 
> > > } 
> > 
> > > Event.observe(window, 'load', function() { 
> > > window.setTimeout('xu(1)', 1 * (1000 * 10)); 
> > > }); 
> > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "Prototype & script.aculo.us" group. 
> > > To post to this group, send email to 
> > > prototype-s...@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-s...@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-s...@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-scriptacul

Re: [Proto-Scripty] Re: Future of Prototyp.js

2012-12-02 Thread Jason Westbrook
I'm actually planning on taking whatever is still available on scripteka
and rehosting it on github so that others can find it, see examples of it
working, post issues and comment on the scripts

Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Sat, Dec 1, 2012 at 7:21 AM, kstubs  wrote:

> ..and related to all of this is a site like this:
> http://scripteka.com
>
> Where a ton of the script that use to be available, well the
> underlying/host site for the code have dropped off the WWW universe.
> Very sad :(  A lot of broken links.
>
> Karl..
>
>
> On Saturday, December 1, 2012 6:54:42 AM UTC-7, isurge wrote:
>
>> We let our IE 6 clients go.
>>
>> On 12/1/12 1:48 AM, petrob wrote:
>> > I understood why a lot of companies still insist on using IE6 when at
>> > a large hypermarket chain the accounting staff pointed out that their
>> > very expensive accounting software can only be run on IE6 or on IE9+.
>> > The cost efficient solution for them is to go on running their legal
>> > copies of XP on some hundreds of computers with IE6 and ban any
>> > acive-x objects and script (java, javascript, flash etc) on the
>> > company server. So, it is the operating system that is behind the
>> > longevity of IE in the corporate field and , unfortunately, it will
>> > remain the same for a long time.
>> > --
>> > 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/-/**
>> --r_rxEpnswJ.
>>
>> > To post to this group, send email to
>> > prototype-s...@**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 view this discussion on the web visit
> https://groups.google.com/d/msg/prototype-scriptaculous/-/mmHzcI7zWxMJ.
>
> 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: Future of Prototyp.js

2012-12-01 Thread kstubs
..and related to all of this is a site like this:
http://scripteka.com

Where a ton of the script that use to be available, well the 
underlying/host site for the code have dropped off the WWW universe.
Very sad :(  A lot of broken links.

Karl..

On Saturday, December 1, 2012 6:54:42 AM UTC-7, isurge wrote:
>
> We let our IE 6 clients go. 
>
> On 12/1/12 1:48 AM, petrob wrote: 
> > I understood why a lot of companies still insist on using IE6 when at 
> > a large hypermarket chain the accounting staff pointed out that their 
> > very expensive accounting software can only be run on IE6 or on IE9+. 
> > The cost efficient solution for them is to go on running their legal 
> > copies of XP on some hundreds of computers with IE6 and ban any 
> > acive-x objects and script (java, javascript, flash etc) on the 
> > company server. So, it is the operating system that is behind the 
> > longevity of IE in the corporate field and , unfortunately, it will 
> > remain the same for a long time. 
> > -- 
> > 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/-/--r_rxEpnswJ. 
> > To post to this group, send email to 
> > prototype-s...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/mmHzcI7zWxMJ.
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: Future of Prototyp.js

2012-12-01 Thread James Brake

We let our IE 6 clients go.

On 12/1/12 1:48 AM, petrob wrote:
I understood why a lot of companies still insist on using IE6 when at 
a large hypermarket chain the accounting staff pointed out that their 
very expensive accounting software can only be run on IE6 or on IE9+. 
The cost efficient solution for them is to go on running their legal 
copies of XP on some hundreds of computers with IE6 and ban any 
acive-x objects and script (java, javascript, flash etc) on the 
company server. So, it is the operating system that is behind the 
longevity of IE in the corporate field and , unfortunately, it will 
remain the same for a long time.

--
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/-/--r_rxEpnswJ.
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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-18 Thread Peter Sysko

>
>  http://monkeypanel.com/demo  <> usually works before the 'com'  hehe
>>
>

-- 
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/-/MOTNWle-MywJ.
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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-18 Thread Peter Sysko
Thanks Dave, I'm still not sure why my visible() comparison wrapper was 
registering as null when i originally first attempted to perform the 
functions, because that looks something like what I first tried.

Thanks again to Jason suggestions to use a Hash, I have since modified the 
interface to utilize two hashes, one for the systems, and one for the 8 
modules of each system. the relatively stable navigational interface is 
working mostly how I want it now. http://monkeypanelcom/demo

Sm:)e

On Tuesday, October 16, 2012 1:30:17 AM UTC-4, DaveK wrote:
>
> To answer your OP directly (not sure if it has been, I didn't notice it). 
>
>open_div = 'system'+k+''; 
>... 
>if ($(open_div).visible()==true) { 
>
> if there is no item with id 'system'+k then $(open_div) returns null 
> (correctly) and so $(open_div).visible() throws an error. (for example 
> if nothing has "id='system123'" then when k-123 the error wiil throw) 
>
> You can avoid it with: 
>
>if ($(open_div)) { 
>if ($(open_div).visible()==true) { 
>
>
> Dave 
>

-- 
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/-/k3nbGQ3PkhgJ.
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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-15 Thread Dave Kibble
To answer your OP directly (not sure if it has been, I didn't notice it).

   open_div = 'system'+k+'';
   ...
   if ($(open_div).visible()==true) {

if there is no item with id 'system'+k then $(open_div) returns null
(correctly) and so $(open_div).visible() throws an error. (for example
if nothing has "id='system123'" then when k-123 the error wiil throw)

You can avoid it with:

   if ($(open_div)) {
   if ($(open_div).visible()==true) {


Dave

-- 
You received 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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-15 Thread Peter Sysko
fpr what its worth, these are some the handler functions I have created.
 the logic s fine, but your suggestion is much less work, it seems, 
and there are a few bugs which i commented out. i am not an expert in JS, 
its not veryintuitive for me


 function get_system_states() {
var ref = document.getElementById('mb_system_state_references');
var systemz = [];
systemz = ref.innerHTML.split(":",33); 
// innerHTML default state reference (U=Unopen, O=Open, M=Minimized) :>
//100=U:101=U:102=U:103=U:104=U:105=U:106=U:107=U:108=U:109=U:
//110=U:111=U:112=U:113=U:114=U:115=U:116=U:117=U:118=U:119=U:
//120=U:121=U:122=U:123=U:124=U:125=U:126=U:127=U:128=U:129=U:
//130=U:131=U:132=U   
var mb_statez = [];
for(k=100;k<133;k++) {
var n = k-100; // system 100 should be index 0, system 132 should 
be index 32
var sys_string = systemz[n];
var system_statez = sys_string.split("=",2);
var state = system_statez[1]; // index 0 should be the system 
number, index 1 is the letter U, M or O
mb_statez[n] = state;
} // end loop
return mb_statez;
 } // end function
 
 function get_system_state(system_index) {
 system_index+='';
 var s = get_system_states();
 var n = (parseInt(system_index)-100);
 return s[n];
 } 
 
 function set_system_state(system_index,new_state){
 var s = []; s=get_system_states(); var n = 0;
 system_index+=''; var new_ref_string="";
 //alert('setting new system state: '+new_state);
 for(k=100;k<133;k++) { n = k-100;
 //if not the setting we are setting, write its current state 
 if ((system_index)==k.toString()) {
 new_ref_string+=k+'='+new_state;
 } else {  // else, write the new one
  new_ref_string+=k+'='+s[n]; 
 } // end else
 new_ref_string+=":";
} // end for loop

document.getElementById('mb_system_state_references').innerHTML=new_ref_string;
//alert('writing new innerHTML as: '+new_ref_string);
  return false;
 } // function

function minimize_mb_system(system_index) {
//if (get_system_state(system_index)=="M")
 //{  
system_index+='';
var sp_div_id = 'system'+system_index+'';
var min_div_id = 'system'+system_index+'_minimized';
Effect.SwitchOff(sp_div_id);
Effect.Appear(min_div_id);
set_system_state(system_index,"M");
return false;
//}
//else { var warning = "system display state is already minimized. 
did not collapse."; return warning; }
}
function restore_mb_system(system_index) {
//if (get_system_state(system_index)=="O")
 //{  
system_index+='';
var sp_div_id = 'system'+system_index;
var min_div_id =  'system'+system_index+'_minimized';
Effect.Appear(''+sp_div_id+'');
Effect.SwitchOff(''+min_div_id+'');
set_system_state(system_index,"O");
return false;
//}
//else { var warning = "system display state is already open. did 
not restore."; return warning; }
}

-- 
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/-/dQqsVP_C75wJ.
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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-15 Thread Peter Sysko
right, i found it: http://api.prototypejs.org/language/dollar-H/
i am used to the idea of assuming zero data persistence in a runtime 
environment
so i'm not sure how this works outside the function scope. in php you have 
to serialize variables,
use a global or superglobal array, use database, files, etc. on a client im 
used to seeing cookies
being used, I am just wondering what the scope limit of this use is, as i 
am used to treating 
javacsript variables scope at function level only, passing them being 
required with get and setter methods
 I'll try the $H idea and see how it works. Thanks again

-- 
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/-/lqdbv0kJ5NoJ.
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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-15 Thread Jason Westbrook
to be clear - the example I put is not a javascript array but a Prototype
Hash

you should be able to do the same thing with a javascript array though

Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Mon, Oct 15, 2012 at 5:25 PM, Peter Sysko  wrote:

> whoa i had no idea you could do that with javascript array. i just didn't
> think the data persistence was possible, even if the window was still open.
> but it makes perfect sense, and much simpler than what i'm doing now. I
> will have to give it a shot tomorrow, thank you!
>
>
> On Monday, October 15, 2012 2:15:23 PM UTC-4, Peter Sysko wrote:
>>
>> I love prototype and scriptacualous. I don't combine with jquery so i
>> know i am not having a noclonflict headache,
>> and I am just trying to get the visible() function (
>> http://prototypejs.org/api/**element/visible
>> )
>> to not throw null type error exceptions: here is the function I need to
>> fix, syntactically:
>> the function creates an associative array to track which of 33 system
>> panels are either open, unopen, or minimized*:
>> **(the systems are indexed from 100 to 132)*>>
>>
>> function get_system_states() {
>> var k=0; var sys_array = new Array(); var open_div=''; var min_div='';
>> for(k=100;k<132;k++){
>> open_div = 'system'+k+'';
>> min_div = open_div+'_minimized';
>> if ($(open_div).visible()==true) {
>> sys_array[k] = "o"; // o = open
>> }
>> if ($(min_div).visible()==true) {
>> sys_array[k] = "m"; // m = minimized
>> }
>> if 
>> (($(open_div).visible()==**false)&&($(min_div).visible()=**=false))
>> {
>> sys_array[k] = "c";// u = unopen
>> }
>> }
>> return sys_array;
>> }
>>
>> Javscript console error says :
>>
>>1. Uncaught TypeError: Cannot call method 'visible' of null
>>   1.
>>
>>
>> the first IF statement in the for loop is throwing the exception, but I
>> assume I am not assigning the div values correctly?
>> i have found no answers in this group from a text search and from a
>> general google search.
>> is this a single quotation reference? my div id's are dynamically written
>> in php codeignite, which shouldnt really matter.
>>
>> any suggestions for how to properly get the visibility of each div in
>> each current state?
>> thanks!!
>> -pete
>>
>>  --
> 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/-/dodF3TNhKR0J.
>
> 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: Hi, new to group. Having an issue with visible() method. any suggestions?

2012-10-15 Thread Jason Westbrook
I've never had a problem with putting variables into the $() function

but I do have a suggestion for keeping your open/minimized/closed panels
straight

try declaring a global array or hash and using that as the status variable
- all the javascript functions can use it natively and you don't have to do
the expensive splitting every time you want to know what panels are open

example

var panels = new Hash({"system100" : "M", "system101":"U"}); //etc

//then

panels.get("system"+id);
//or
panels.set("system"+id,"U");

you can even initialize it easily

for(var t = 100 ; t <= 132 ; t++)
{
   panels.set("system"+t,"U");
}


Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Mon, Oct 15, 2012 at 4:32 PM, Peter Sysko  wrote:

> Thanks for the suggestion, Jason. Most people don't run into this problem
> because they do not deal with dynamically assigned div ids from javascript
> variables. I found for what i am doing it was the most efficient way to go
> about referencing the divs. otherwise, switch statements with 33 cases
> would have to do, and that was pretty intensive.
>
> It does appear that the $(element) wrapper doesn't play nice at all with
> javascript variables, you actually have to put the quotes exactly as they
> appear on the div. (unless I am still doing it wrong).. i tried .toString
> functions, parseInt's, double quotes, single quotes, with and without the
> $wrapers, etc.. and finally I looked into the prototype.js script and the
> visible method is really simple, just checks if the display: property of
> the style attribute is set to none and returns a boolean value, so the
> workaround is to get the element with the document.getElementbyID (which*does
> *work fine with javasscript variable as the ID), and do the conditional
> statement custom. In the process of researching this bug I made a series of
> alternative functions as a different way to skin the cat. Currently they
> keep track of which systems are closed, minimized or unopen with some
> innerHTML in a hidden div that references the index (100-133) with the
> letter U, M or O, then rewrites the entire string when it changes.
> the initial div looks like this: (all systems unopened):
>
>
>  style="display:none;">100=U:101=U:102=U:103=U:104=U:105=U:106=U:107=U:108=U:109=U:110=U:111=U:112=U:113=U:114=U:115=U:116=U:117=U:118=U:119=U:120=U:121=U:122=U:123=U:124=U:125=U:126=U:127=U:128=U:129=U:130=U:131=U:132=U
>
>
> I have got half of the functions working, you can see what I am working on
> here: http://monkeypanel.com/demo
>
>  --
> 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/-/OHJUzayk4UAJ.
>
> 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: CSS Selector documentation

2012-10-14 Thread fntzr
Sizzle is selector engine that used by prototypejs and jquery for search 
the selectors.


--
You received 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: Prototype's selector as well as "eq" in Jquery

2012-09-25 Thread Jason Westbrook
nth-child doesnt work in Internet Explorer CSS - can Prototype correctly
decode that in IE?

Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Mon, Sep 24, 2012 at 9:55 AM, Victor  wrote:

> $("#table-id td:nth-child(2)")
> will select 2nd cells in all rows of table with id "table-id"
>
> --
> 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/-/1lO-8ck8qY4J.
>
> 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: from 1.6.0.1 to 1.7.1: alternative to Event.cache and ._eventID?

2012-08-20 Thread Victor

>
> I use this check in a jasmine spec to ensure a newly created element 
> has attached events.  The element is supposed to have events attached 
> to keydown and blur


How exactly events are attached? With element.observe() or element.on()? 
Directly to element or to one of its ancestors (with event delegation)? If 
event observer is attached with element.on() then there is no possibility 
to distinct one observer from another - we can check that some observer is 
attached to desired event, but cannot prove that this is our observer. It 
event delegation is used then things are much worse - we can check just 
that some observer is attached to e.g. blur event on ancestor of element 
under test.

I could simplify event cache parser to this code:

for (var e in Event.cache) {
  var event = Event.cache[e];
  if (event.element === YOUR_ELEMENT) {
var handlers = event.blur;
if (handlers.length > 0) {
  // possible match - at least someone is observing blur event
}
for (var i = 0, len = handlers.length; i < len; i++) {
  if (handlers[i].handler === YOUR_OBSERVER) {
// perfect match, does not work with element.on()
  }
}
  }
}

-- 
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/-/69qWQTR4NVgJ.
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: from 1.6.0.1 to 1.7.1: alternative to Event.cache and ._eventID?

2012-08-16 Thread dipnlik
I use this check in a jasmine spec to ensure a newly created element
has attached events.  The element is supposed to have events attached
to keydown and blur, and altough right now I'm not exactly testing
that, at least I could test that the element had attached events.  If
there are better ways to test that, I'd love to know.

Will take a look at VisualEvents soon, maybe that'll be useful in my
test environment.  Thanks!

--
:: dip
--

On Thu, Aug 16, 2012 at 7:05 AM, Victor  wrote:
>> In prototype 1.6.0.1 I used to use Event.cache[formElement._eventID] to
>> check if an element has attached events.
>
>
> Why do you need such check at all? If you need to remove all event observers
> from element - there is #stopObserving(), if you need to remove from element
> and its children - there is #purge().
>
> Look at
> https://github.com/victor-homyakov/VisualEvent/blob/master/js/parsers/prototype1.7.js
> - this code enumerates attached event handlers.
>
> --
> 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/-/tBFOZrZJ_gAJ.
>
> 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: run function with AJAX.Updater

2012-07-30 Thread Victor

>
> Here is the page being called . . . 
> 
> sayHi = function(){
> alert ('Hi');
> };
> 
> 
> My problem is that if I replace *alert* with *document.write* then the 
> page gets replaced with a new page.  I thought the idea behind AJAX.Updater 
> was to replace the DIV with new data, or in this case the result of the 
> function. *So in my newbie logic the DIV should get replaced with the 
> text generated by document.write.? *
>

You cannot use document.write() after your initial page is finished loading 
(in other words you cannot use document.write in fragments requested via 
AJAX). You should use DOM manipulation methods like Element#insert() or 
Element#update().

-- 
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/-/wZ5b8XOL4cwJ.
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: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
Don't worry about that wall, I've already got a nice soft dent in it!
On Jul 27, 2012 5:38 PM, "Jim Longo"  wrote:

> Thanks both Jason and Phil, there's a lot of new things to try there.
>  I'll see if they lead me anywhere, and prevent me from breaking the wall
> that I have been banging my head against. :)
>
>
>
> On Friday, July 27, 2012 4:23:10 PM UTC-4, Jason wrote:
>>
>>
>> Phil
>>
>> setting the content of an element via the innerHTML property was
>> deprecated for the $("elmentid").update(content) function. Or by using
>> the $("elmentid").insert(**content) function if appropriate.
>>
>> Jason Westbrook | T: 313-799-3770 |
>>
>>
>> On Fri, Jul 27, 2012 at 1:19 PM, Phil Petree  wrote:
>>
>>> Jim,
>>> I shoulda put this in my last email...
>>> Here are two ways to set the individual fields using prototype:
>>>  $('my_div').innerHTML = szUpdate;
>>> $('my_form_field').value='what I want the value to be';
>>> function success_function(transport)
>>> {
>>>var json = transport.responseText.**evalJSON(true);
>>>  // php would return:
>>>// $options = Array('status' => "OK", 'text' => "OK");
>>>// $output = json_encode($options);
>>>// echo $output;
>>>// it's the status in the Array we're checking...
>>>if(json.status == "OK")
>>>{
>>>  // do stuff
>>>  $(activeButton).replace('Subscribed');
>>>  $('my_div').innerHTML = "AJAX Response" +json.text
>>> +"";
>>> }
>>> }
>>>
>>> On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree  wrote:
>>>
 Jim,

 Did Jason's code not work?

 And you're right, the examples and docs totally suck... it's like
 trying to decipher some secret code that someone forgot to let the rest of
 us "normal" programmers in on.
  The purpose of AJAX calls is to reduce bandwidth and server hits by
 reducing the number of page hits.  It's easier, cheaper, faster to just
 send the data the user needs vs the entire page.

 Prototype has two functions for Ajax calls: Ajax.Updater and
 Ajax.Request. I stopped using Ajax.Updater for anything other than single
 element updates.

 Breaking down an Ajax.Request call for you it would look something like
 this:

   var options = {
 method: 'post',
 parameters: $('myform').serialize(),
 onSuccess: success_function,
 onFailure: ajax_err,
 on0: ajax_err
   };
   new Ajax.Request( url+".php", options );
 function success_function(transport)
 {
   var json = transport.responseText.**evalJSON(true);

   // php would return:
   // $options = Array('status' => "OK", 'text' => "OK");
   // $output = json_encode($options);
   // echo $output;
   // it's the status in the Array we're checking...
   if(json.status == "OK")
   {
 // do stuff
 $(activeButton).replace('Subscribed');
   }
 }
 function ajax_err(transport)
 {
   alert("An AJAX error occurred: " +transport.statusText);
 }


 On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:

> Thanks Phil,
>
> I do want to call a javascript function.
> But let me try to simplify my problem.
>
> Here is a page . . .
> 
> 
> new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
> 
>
> Here is the page being called . . .
> 
> sayHi = function(){
>  alert ('Hi');
> };
> 
> 
>  This will work, in the sense that myDiv will remain and the alert
> will display.
>
> My problem is that if I replace *alert* with *document.write* then
> the page gets replaced with a new page.  I thought the idea behind
> AJAX.Updater was to replace the DIV with new data, or in this case the
> result of the function. *So in my newbie logic the DIV should get
> replaced with the text generated by document.write.?  *
>
>
> I have tried to figure what you mean by using onSuccess, but I fail to
> get the right syntax, and it's very hard to find in the docs.  I assume 
> you
> mean to call the function as part of the onSuccess parameters.  However 
> the
> example above does seem to execute the function from called page, it's 
> just
> that it works with alert but not document.write and this is doesn't make
> sense to me (yet).
>
>
>
>
>
>
>
> On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:
>
>> then perhaps we're not understanding what you mean by "passed"
>>
>> normal process is:
>> onSuccess: call a function that processes the incoming data
>> onFailure: tell the user what happened
>>
>> what gets "passed" is data.
>> what gets "called" are functions.
>>
>> having code in an external file indicates to me you want to call a
>> function.
>>
>> I think a little more clarity might help us help you.
>>
>> On Fri, Jul 27, 2012 at 10:21 A

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Jim Longo
Thanks both Jason and Phil, there's a lot of new things to try there.  I'll 
see if they lead me anywhere, and prevent me from breaking the wall that I 
have been banging my head against. :)



On Friday, July 27, 2012 4:23:10 PM UTC-4, Jason wrote:
>
>
> Phil
>
> setting the content of an element via the innerHTML property was 
> deprecated for the $("elmentid").update(content) function. Or by using 
> the $("elmentid").insert(content) function if appropriate.
>
> Jason Westbrook | T: 313-799-3770 | 
>
>
> On Fri, Jul 27, 2012 at 1:19 PM, Phil Petree  wrote:
>
>> Jim,
>> I shoulda put this in my last email...
>> Here are two ways to set the individual fields using prototype:
>>  $('my_div').innerHTML = szUpdate;
>> $('my_form_field').value='what I want the value to be';
>> function success_function(transport)
>> {
>>var json = transport.responseText.evalJSON(true);
>>  // php would return:
>>// $options = Array('status' => "OK", 'text' => "OK"); 
>>// $output = json_encode($options);
>>// echo $output;
>>// it's the status in the Array we're checking...
>>if(json.status == "OK")
>>{
>>  // do stuff
>>  $(activeButton).replace('Subscribed'); 
>>  $('my_div').innerHTML = "AJAX Response" +json.text 
>> +"";
>> }
>> }
>>
>> On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree  wrote:
>>
>>> Jim,
>>>  
>>> Did Jason's code not work?
>>>  
>>> And you're right, the examples and docs totally suck... it's like trying 
>>> to decipher some secret code that someone forgot to let the rest of us 
>>> "normal" programmers in on.
>>>  The purpose of AJAX calls is to reduce bandwidth and server hits by 
>>> reducing the number of page hits.  It's easier, cheaper, faster to just 
>>> send the data the user needs vs the entire page.
>>>  
>>> Prototype has two functions for Ajax calls: Ajax.Updater and 
>>> Ajax.Request. I stopped using Ajax.Updater for anything other than single 
>>> element updates.  
>>>  
>>> Breaking down an Ajax.Request call for you it would look something like 
>>> this:
>>>  
>>>   var options = {
>>> method: 'post',
>>> parameters: $('myform').serialize(),
>>> onSuccess: success_function,
>>> onFailure: ajax_err,
>>> on0: ajax_err
>>>   };
>>>   new Ajax.Request( url+".php", options );
>>> function success_function(transport)
>>> {
>>>   var json = transport.responseText.evalJSON(true);
>>>  
>>>   // php would return:
>>>   // $options = Array('status' => "OK", 'text' => "OK");   
>>>   // $output = json_encode($options);
>>>   // echo $output;
>>>   // it's the status in the Array we're checking...
>>>   if(json.status == "OK")
>>>   {
>>> // do stuff
>>> $(activeButton).replace('Subscribed');  
>>>   }
>>> }
>>> function ajax_err(transport)
>>> {
>>>   alert("An AJAX error occurred: " +transport.statusText);
>>> }
>>>
>>>  
>>> On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:
>>>
 Thanks Phil, 

 I do want to call a javascript function.
 But let me try to simplify my problem.

 Here is a page . . . 
 
 
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 

 Here is the page being called . . . 
 
 sayHi = function(){
  alert ('Hi');
 };
 
 
  This will work, in the sense that myDiv will remain and the alert 
 will display.

 My problem is that if I replace *alert* with *document.write* then the 
 page gets replaced with a new page.  I thought the idea behind 
 AJAX.Updater 
 was to replace the DIV with new data, or in this case the result of the 
 function. *So in my newbie logic the DIV should get replaced with the 
 text generated by document.write.?  *


 I have tried to figure what you mean by using onSuccess, but I fail to 
 get the right syntax, and it's very hard to find in the docs.  I assume 
 you 
 mean to call the function as part of the onSuccess parameters.  However 
 the 
 example above does seem to execute the function from called page, it's 
 just 
 that it works with alert but not document.write and this is doesn't make 
 sense to me (yet).







 On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:

> then perhaps we're not understanding what you mean by "passed"
>  
> normal process is:
> onSuccess: call a function that processes the incoming data
> onFailure: tell the user what happened
>  
> what gets "passed" is data.
> what gets "called" are functions.
>  
> having code in an external file indicates to me you want to call a 
> function.
>  
> I think a little more clarity might help us help you.
>
> On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:
>
>> Thanks for your response. I'm sorry, I forgot to mention I had tried 
>> that.  The request is successful (as I mentioned I can pass html and 
>> php, 
>> just not javascr

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
Thanks for that Jason...  must be another part of that "inner chamber" code
I'm yet to break! LOL (just teasing)

On Fri, Jul 27, 2012 at 4:23 PM, Jason Westbrook wrote:

>
> Phil
>
> setting the content of an element via the innerHTML property was
> deprecated for the $("elmentid").update(content) function. Or by using
> the $("elmentid").insert(content) function if appropriate.
>
> Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com
>
>
>
> On Fri, Jul 27, 2012 at 1:19 PM, Phil Petree wrote:
>
>> Jim,
>> I shoulda put this in my last email...
>> Here are two ways to set the individual fields using prototype:
>>  $('my_div').innerHTML = szUpdate;
>> $('my_form_field').value='what I want the value to be';
>> function success_function(transport)
>> {
>>var json = transport.responseText.evalJSON(true);
>>  // php would return:
>>// $options = Array('status' => "OK", 'text' => "OK");
>>// $output = json_encode($options);
>>// echo $output;
>>// it's the status in the Array we're checking...
>>if(json.status == "OK")
>>{
>>  // do stuff
>>  $(activeButton).replace('Subscribed');
>>  $('my_div').innerHTML = "AJAX Response" +json.text
>> +"";
>> }
>> }
>>
>> On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree wrote:
>>
>>> Jim,
>>>
>>> Did Jason's code not work?
>>>
>>> And you're right, the examples and docs totally suck... it's like trying
>>> to decipher some secret code that someone forgot to let the rest of us
>>> "normal" programmers in on.
>>>  The purpose of AJAX calls is to reduce bandwidth and server hits by
>>> reducing the number of page hits.  It's easier, cheaper, faster to just
>>> send the data the user needs vs the entire page.
>>>
>>> Prototype has two functions for Ajax calls: Ajax.Updater and
>>> Ajax.Request. I stopped using Ajax.Updater for anything other than single
>>> element updates.
>>>
>>> Breaking down an Ajax.Request call for you it would look something like
>>> this:
>>>
>>>   var options = {
>>> method: 'post',
>>> parameters: $('myform').serialize(),
>>> onSuccess: success_function,
>>> onFailure: ajax_err,
>>> on0: ajax_err
>>>   };
>>>   new Ajax.Request( url+".php", options );
>>> function success_function(transport)
>>> {
>>>   var json = transport.responseText.evalJSON(true);
>>>
>>>   // php would return:
>>>   // $options = Array('status' => "OK", 'text' => "OK");
>>>   // $output = json_encode($options);
>>>   // echo $output;
>>>   // it's the status in the Array we're checking...
>>>   if(json.status == "OK")
>>>   {
>>> // do stuff
>>> $(activeButton).replace('Subscribed');
>>>   }
>>> }
>>> function ajax_err(transport)
>>> {
>>>   alert("An AJAX error occurred: " +transport.statusText);
>>> }
>>>
>>>
>>> On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:
>>>
 Thanks Phil,

 I do want to call a javascript function.
 But let me try to simplify my problem.

 Here is a page . . .
 
 
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 

 Here is the page being called . . .
 
 sayHi = function(){
  alert ('Hi');
 };
 
 
  This will work, in the sense that myDiv will remain and the alert
 will display.

 My problem is that if I replace *alert* with *document.write* then the
 page gets replaced with a new page.  I thought the idea behind AJAX.Updater
 was to replace the DIV with new data, or in this case the result of the
 function. *So in my newbie logic the DIV should get replaced with the
 text generated by document.write.?  *


 I have tried to figure what you mean by using onSuccess, but I fail to
 get the right syntax, and it's very hard to find in the docs.  I assume you
 mean to call the function as part of the onSuccess parameters.  However the
 example above does seem to execute the function from called page, it's just
 that it works with alert but not document.write and this is doesn't make
 sense to me (yet).







 On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:

> then perhaps we're not understanding what you mean by "passed"
>
> normal process is:
> onSuccess: call a function that processes the incoming data
> onFailure: tell the user what happened
>
> what gets "passed" is data.
> what gets "called" are functions.
>
> having code in an external file indicates to me you want to call a
> function.
>
> I think a little more clarity might help us help you.
>
> On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:
>
>> Thanks for your response. I'm sorry, I forgot to mention I had tried
>> that.  The request is successful (as I mentioned I can pass html and php,
>> just not javascript)
>>
>>
>> On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>>
>>> Try using the onsuccess on failure parameters in Aj

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Jason Westbrook
Phil

setting the content of an element via the innerHTML property was deprecated
for the $("elmentid").update(content) function. Or by using
the $("elmentid").insert(content) function if appropriate.

Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Fri, Jul 27, 2012 at 1:19 PM, Phil Petree  wrote:

> Jim,
> I shoulda put this in my last email...
> Here are two ways to set the individual fields using prototype:
>  $('my_div').innerHTML = szUpdate;
> $('my_form_field').value='what I want the value to be';
> function success_function(transport)
> {
>var json = transport.responseText.evalJSON(true);
> // php would return:
>// $options = Array('status' => "OK", 'text' => "OK");
>// $output = json_encode($options);
>// echo $output;
>// it's the status in the Array we're checking...
>if(json.status == "OK")
>{
>  // do stuff
>  $(activeButton).replace('Subscribed');
>  $('my_div').innerHTML = "AJAX Response" +json.text
> +"";
> }
> }
>
> On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree wrote:
>
>> Jim,
>>
>> Did Jason's code not work?
>>
>> And you're right, the examples and docs totally suck... it's like trying
>> to decipher some secret code that someone forgot to let the rest of us
>> "normal" programmers in on.
>>  The purpose of AJAX calls is to reduce bandwidth and server hits by
>> reducing the number of page hits.  It's easier, cheaper, faster to just
>> send the data the user needs vs the entire page.
>>
>> Prototype has two functions for Ajax calls: Ajax.Updater and
>> Ajax.Request. I stopped using Ajax.Updater for anything other than single
>> element updates.
>>
>> Breaking down an Ajax.Request call for you it would look something like
>> this:
>>
>>   var options = {
>> method: 'post',
>> parameters: $('myform').serialize(),
>> onSuccess: success_function,
>> onFailure: ajax_err,
>> on0: ajax_err
>>   };
>>   new Ajax.Request( url+".php", options );
>> function success_function(transport)
>> {
>>   var json = transport.responseText.evalJSON(true);
>>
>>   // php would return:
>>   // $options = Array('status' => "OK", 'text' => "OK");
>>   // $output = json_encode($options);
>>   // echo $output;
>>   // it's the status in the Array we're checking...
>>   if(json.status == "OK")
>>   {
>> // do stuff
>> $(activeButton).replace('Subscribed');
>>   }
>> }
>> function ajax_err(transport)
>> {
>>   alert("An AJAX error occurred: " +transport.statusText);
>> }
>>
>>
>> On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:
>>
>>> Thanks Phil,
>>>
>>> I do want to call a javascript function.
>>> But let me try to simplify my problem.
>>>
>>> Here is a page . . .
>>> 
>>> 
>>> new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
>>> 
>>>
>>> Here is the page being called . . .
>>> 
>>> sayHi = function(){
>>>  alert ('Hi');
>>> };
>>> 
>>> 
>>>  This will work, in the sense that myDiv will remain and the alert will
>>> display.
>>>
>>> My problem is that if I replace *alert* with *document.write* then the
>>> page gets replaced with a new page.  I thought the idea behind AJAX.Updater
>>> was to replace the DIV with new data, or in this case the result of the
>>> function. *So in my newbie logic the DIV should get replaced with the
>>> text generated by document.write.?  *
>>>
>>>
>>> I have tried to figure what you mean by using onSuccess, but I fail to
>>> get the right syntax, and it's very hard to find in the docs.  I assume you
>>> mean to call the function as part of the onSuccess parameters.  However the
>>> example above does seem to execute the function from called page, it's just
>>> that it works with alert but not document.write and this is doesn't make
>>> sense to me (yet).
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:
>>>
 then perhaps we're not understanding what you mean by "passed"

 normal process is:
 onSuccess: call a function that processes the incoming data
 onFailure: tell the user what happened

 what gets "passed" is data.
 what gets "called" are functions.

 having code in an external file indicates to me you want to call a
 function.

 I think a little more clarity might help us help you.

 On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:

> Thanks for your response. I'm sorry, I forgot to mention I had tried
> that.  The request is successful (as I mentioned I can pass html and php,
> just not javascript)
>
>
> On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>
>> Try using the onsuccess on failure parameters in Ajax updater.
>>
>> onFailure: function() {alert("bombed");},
>> onSuccess: ...
>> On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:
>>
>>> If it helps, I can replace the js with something real simple (an
>>> alert) and it still won't run in the AJAX page.  If I put plain text or
>>> html or php in the ex

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
Jim,
I shoulda put this in my last email...
Here are two ways to set the individual fields using prototype:
 $('my_div').innerHTML = szUpdate;
$('my_form_field').value='what I want the value to be';
function success_function(transport)
{
   var json = transport.responseText.evalJSON(true);
// php would return:
   // $options = Array('status' => "OK", 'text' => "OK");
   // $output = json_encode($options);
   // echo $output;
   // it's the status in the Array we're checking...
   if(json.status == "OK")
   {
 // do stuff
 $(activeButton).replace('Subscribed');
 $('my_div').innerHTML = "AJAX Response" +json.text +"";
}
}

On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree  wrote:

> Jim,
>
> Did Jason's code not work?
>
> And you're right, the examples and docs totally suck... it's like trying
> to decipher some secret code that someone forgot to let the rest of us
> "normal" programmers in on.
>  The purpose of AJAX calls is to reduce bandwidth and server hits by
> reducing the number of page hits.  It's easier, cheaper, faster to just
> send the data the user needs vs the entire page.
>
> Prototype has two functions for Ajax calls: Ajax.Updater and Ajax.Request.
> I stopped using Ajax.Updater for anything other than single element
> updates.
>
> Breaking down an Ajax.Request call for you it would look something like
> this:
>
>   var options = {
> method: 'post',
> parameters: $('myform').serialize(),
> onSuccess: success_function,
> onFailure: ajax_err,
> on0: ajax_err
>   };
>   new Ajax.Request( url+".php", options );
> function success_function(transport)
> {
>   var json = transport.responseText.evalJSON(true);
>
>   // php would return:
>   // $options = Array('status' => "OK", 'text' => "OK");
>   // $output = json_encode($options);
>   // echo $output;
>   // it's the status in the Array we're checking...
>   if(json.status == "OK")
>   {
> // do stuff
> $(activeButton).replace('Subscribed');
>   }
> }
> function ajax_err(transport)
> {
>   alert("An AJAX error occurred: " +transport.statusText);
> }
>
>
> On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:
>
>> Thanks Phil,
>>
>> I do want to call a javascript function.
>> But let me try to simplify my problem.
>>
>> Here is a page . . .
>> 
>> 
>> new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
>> 
>>
>> Here is the page being called . . .
>> 
>> sayHi = function(){
>>  alert ('Hi');
>> };
>> 
>> 
>>  This will work, in the sense that myDiv will remain and the alert will
>> display.
>>
>> My problem is that if I replace *alert* with *document.write* then the
>> page gets replaced with a new page.  I thought the idea behind AJAX.Updater
>> was to replace the DIV with new data, or in this case the result of the
>> function. *So in my newbie logic the DIV should get replaced with the
>> text generated by document.write.?  *
>>
>>
>> I have tried to figure what you mean by using onSuccess, but I fail to
>> get the right syntax, and it's very hard to find in the docs.  I assume you
>> mean to call the function as part of the onSuccess parameters.  However the
>> example above does seem to execute the function from called page, it's just
>> that it works with alert but not document.write and this is doesn't make
>> sense to me (yet).
>>
>>
>>
>>
>>
>>
>>
>> On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:
>>
>>> then perhaps we're not understanding what you mean by "passed"
>>>
>>> normal process is:
>>> onSuccess: call a function that processes the incoming data
>>> onFailure: tell the user what happened
>>>
>>> what gets "passed" is data.
>>> what gets "called" are functions.
>>>
>>> having code in an external file indicates to me you want to call a
>>> function.
>>>
>>> I think a little more clarity might help us help you.
>>>
>>> On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:
>>>
 Thanks for your response. I'm sorry, I forgot to mention I had tried
 that.  The request is successful (as I mentioned I can pass html and php,
 just not javascript)


 On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:

> Try using the onsuccess on failure parameters in Ajax updater.
>
> onFailure: function() {alert("bombed");},
> onSuccess: ...
> On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:
>
>> If it helps, I can replace the js with something real simple (an
>> alert) and it still won't run in the AJAX page.  If I put plain text or
>> html or php in the external file it will run, but not javascript.
>>
>>
>>  --
>> 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/-/-2gPjjF2osEJ.
>>
>> To post to this group, send email to
>> prototype-scriptaculous@googlegroups.com.
>> To unsubscribe from this group, send email to
>> prototype-scriptaculous+unsubscr...@goo

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
Jim,

Did Jason's code not work?

And you're right, the examples and docs totally suck... it's like trying to
decipher some secret code that someone forgot to let the rest of us
"normal" programmers in on.
 The purpose of AJAX calls is to reduce bandwidth and server hits by
reducing the number of page hits.  It's easier, cheaper, faster to just
send the data the user needs vs the entire page.

Prototype has two functions for Ajax calls: Ajax.Updater and Ajax.Request.
I stopped using Ajax.Updater for anything other than single element
updates.

Breaking down an Ajax.Request call for you it would look something like
this:

  var options = {
method: 'post',
parameters: $('myform').serialize(),
onSuccess: success_function,
onFailure: ajax_err,
on0: ajax_err
  };
  new Ajax.Request( url+".php", options );
function success_function(transport)
{
  var json = transport.responseText.evalJSON(true);

  // php would return:
  // $options = Array('status' => "OK", 'text' => "OK");
  // $output = json_encode($options);
  // echo $output;
  // it's the status in the Array we're checking...
  if(json.status == "OK")
  {
// do stuff
$(activeButton).replace('Subscribed');
  }
}
function ajax_err(transport)
{
  alert("An AJAX error occurred: " +transport.statusText);
}


On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo  wrote:

> Thanks Phil,
>
> I do want to call a javascript function.
> But let me try to simplify my problem.
>
> Here is a page . . .
> 
> 
> new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
> 
>
> Here is the page being called . . .
> 
> sayHi = function(){
>  alert ('Hi');
> };
> 
> 
>  This will work, in the sense that myDiv will remain and the alert will
> display.
>
> My problem is that if I replace *alert* with *document.write* then the
> page gets replaced with a new page.  I thought the idea behind AJAX.Updater
> was to replace the DIV with new data, or in this case the result of the
> function. *So in my newbie logic the DIV should get replaced with the
> text generated by document.write.?  *
>
>
> I have tried to figure what you mean by using onSuccess, but I fail to get
> the right syntax, and it's very hard to find in the docs.  I assume you
> mean to call the function as part of the onSuccess parameters.  However the
> example above does seem to execute the function from called page, it's just
> that it works with alert but not document.write and this is doesn't make
> sense to me (yet).
>
>
>
>
>
>
>
> On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:
>
>> then perhaps we're not understanding what you mean by "passed"
>>
>> normal process is:
>> onSuccess: call a function that processes the incoming data
>> onFailure: tell the user what happened
>>
>> what gets "passed" is data.
>> what gets "called" are functions.
>>
>> having code in an external file indicates to me you want to call a
>> function.
>>
>> I think a little more clarity might help us help you.
>>
>> On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:
>>
>>> Thanks for your response. I'm sorry, I forgot to mention I had tried
>>> that.  The request is successful (as I mentioned I can pass html and php,
>>> just not javascript)
>>>
>>>
>>> On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>>>
 Try using the onsuccess on failure parameters in Ajax updater.

 onFailure: function() {alert("bombed");},
 onSuccess: ...
 On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:

> If it helps, I can replace the js with something real simple (an
> alert) and it still won't run in the AJAX page.  If I put plain text or
> html or php in the external file it will run, but not javascript.
>
>
>  --
> 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/-/-2gPjjF2osEJ.
>
> 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: run function with AJAX.Updater

2012-07-27 Thread Jim Longo
Thanks Phil, 

I do want to call a javascript function.
But let me try to simplify my problem.

Here is a page . . . 


new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;


Here is the page being called . . . 

sayHi = function(){
alert ('Hi');
};


This will work, in the sense that myDiv will remain and the alert will 
display.

My problem is that if I replace *alert* with *document.write* then the page 
gets replaced with a new page.  I thought the idea behind AJAX.Updater was 
to replace the DIV with new data, or in this case the result of the 
function. *So in my newbie logic the DIV should get replaced with the text 
generated by document.write.?  *


I have tried to figure what you mean by using onSuccess, but I fail to get 
the right syntax, and it's very hard to find in the docs.  I assume you 
mean to call the function as part of the onSuccess parameters.  However the 
example above does seem to execute the function from called page, it's just 
that it works with alert but not document.write and this is doesn't make 
sense to me (yet).







On Friday, July 27, 2012 10:46:33 AM UTC-4, ppetree wrote:
>
> then perhaps we're not understanding what you mean by "passed"
>  
> normal process is:
> onSuccess: call a function that processes the incoming data
> onFailure: tell the user what happened
>  
> what gets "passed" is data.
> what gets "called" are functions.
>  
> having code in an external file indicates to me you want to call a 
> function.
>  
> I think a little more clarity might help us help you.
>
> On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo wrote:
>
>> Thanks for your response. I'm sorry, I forgot to mention I had tried 
>> that.  The request is successful (as I mentioned I can pass html and php, 
>> just not javascript)
>>
>>
>> On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>>
>>> Try using the onsuccess on failure parameters in Ajax updater.
>>>
>>> onFailure: function() {alert("bombed");},
>>> onSuccess: ...
>>> On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:
>>>
 If it helps, I can replace the js with something real simple (an alert) 
 and it still won't run in the AJAX page.  If I put plain text or html or 
 php in the external file it will run, but not javascript.




-- 
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/-/-2gPjjF2osEJ.
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: run function with AJAX.Updater

2012-07-27 Thread Jason Westbrook
I think I know what is going on

in the first example - everything runs as normal and nothing happens
because you are just declaring a function in the external script - the
function is not called - plus getLottoNumber() is not defined

the second example you are requesting a javascript file - but are sending a
html snippet, 

Re: [Proto-Scripty] Re: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
then perhaps we're not understanding what you mean by "passed"

normal process is:
onSuccess: call a function that processes the incoming data
onFailure: tell the user what happened

what gets "passed" is data.
what gets "called" are functions.

having code in an external file indicates to me you want to call a function.

I think a little more clarity might help us help you.

On Fri, Jul 27, 2012 at 10:21 AM, Jim Longo  wrote:

> Thanks for your response. I'm sorry, I forgot to mention I had tried that.
>  The request is successful (as I mentioned I can pass html and php, just
> not javascript)
>
>
> On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>
>> Try using the onsuccess on failure parameters in Ajax updater.
>>
>> onFailure: function() {alert("bombed");},
>> onSuccess: ...
>> On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:
>>
>>> If it helps, I can replace the js with something real simple (an alert)
>>> and it still won't run in the AJAX page.  If I put plain text or html or
>>> php in the external file it will run, but not javascript.
>>>
>>>
>>>   --
> 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/-/3bfU0S4hsnQJ.
>
> 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: run function with AJAX.Updater

2012-07-27 Thread Jim Longo
Thanks for your response. I'm sorry, I forgot to mention I had tried that. 
 The request is successful (as I mentioned I can pass html and php, just 
not javascript)

On Friday, July 27, 2012 7:35:11 AM UTC-4, ppetree wrote:
>
> Try using the onsuccess on failure parameters in Ajax updater.
>
> onFailure: function() {alert("bombed");},
> onSuccess: ...
> On Jul 27, 2012 12:04 AM, "Jim Longo" wrote:
>
>> If it helps, I can replace the js with something real simple (an alert) 
>> and it still won't run in the AJAX page.  If I put plain text or html or 
>> php in the external file it will run, but not javascript.
>>
>>
>>  

-- 
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/-/3bfU0S4hsnQJ.
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: run function with AJAX.Updater

2012-07-27 Thread Phil Petree
Try using the onsuccess on failure parameters in Ajax updater.

onFailure: function() {alert("bombed");},
onSuccess: ...
On Jul 27, 2012 12:04 AM, "Jim Longo"  wrote:

> If it helps, I can replace the js with something real simple (an alert)
> and it still won't run in the AJAX page.  If I put plain text or html or
> php in the external file it will run, but not javascript.
>
>
>
> On Thursday, July 26, 2012 12:22:54 PM UTC-4, Jim Longo wrote:
>>
>> Hi, I'm very new to this so excuse my ignorance.
>> I've simplified this, but basically I have a function in an external js
>> file that I want to be able to re-run from my page using AJAX.Updater
>>
>> So in my html page I have the following section. A div I want to replace,
>> a function containing the Updater that I want to run from the button.
>>
>>
>> NUMBERS
>>
>> 
>> function loadScript()  {
>> new Ajax.Updater('newTable', 'generateNumbers.js', { method: 'get' ,
>> evalScripts: 'true' });
>> }
>> 
>>
>> 
>>
>> In the external js file i have the following
>>
> 
>
>> alert("Hello");
>>
> 
>
>
> --
> 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/-/J37qs3VY54cJ.
> 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: Confirm() happening twice on click.

2012-07-16 Thread Phil Petree
At least by half ;-)
On Jul 16, 2012 11:59 AM, "thinsoldier"  wrote:

> I've actually found the cause of my problem.
> Quite foolish of me. I had earlier experimented with having all my
> javascript after the footer of the page rather than in the . So I had
> 2 instances of the script tag that contained this code on 1 page.
>
> I am grateful to everyone for their help. I learned much and was able to
> decrease the number of lines of code needed.
>
> On Monday, 16 July 2012 06:53:25 UTC-4, Victor wrote:
>>
>> My problem is that after the confirm() UI appears and is clicked, it
>>> appears AGAIN, then when I click again does the expected behaviour occur.
>>>
>>> document.observe("dom:loaded", function() {
>>>   // attach to all delete links in the table
>>>   var dels = $$('td a.delete');
>>>   dels.each(function(s){
>>> s.observe('click', function(event){ confirmDelete(event); }  );
>>>   } )
>>> });
>>>
>>>
>>> function confirmDelete(event)
>>> {
>>> var ask = confirm('Are you sure you want to delete this entry?');
>>>
>>> if(ask){ xfoo = 'follow link - delete it'; }
>>> else{ event.stop();  xfoo =' do nothing - stop event ';  }
>>> }
>>>
>>>
>> Try to show target of click events in your confirmDelete(), e.g. like
>> this:
>>
>> function confirmDelete(event) {
>> var ask = confirm('Are you sure you want to delete this entry?' +
>>   '\n(clicked on ' + Object.inspect(event.**findElement()) + ')');
>> if(ask){ xfoo = 'follow link - delete it'; }
>> else{ event.stop();  xfoo =' do nothing - stop event ';  }
>> }
>>
>> It will give additional information, e.g. that your code receives click
>> events from both A and IMG elements.
>>
>  --
> 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/-/9U-Vxp9cZScJ.
> 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: Image Uploader / Thumbnail creator

2012-07-11 Thread Phil Petree
Thin,

Thanks, that's a really great find... I'll work on adding that in over the
next week or so.

Greg shared his image uploader (iframe) code and was very patient and
helped me get that up and running... it was quite tricky as the json
response to an iframe had some very unexpected results.

We now have a css/div popup that prompts for an image, on submit it uploads
the image via a hidden iframe, the server storage code updates mysql,
stores the image on disk, sends some json back to the client with the new
wrote:

> I've had success with this for almost a year now.
>
>
> http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/
>
> It allows you to define a starting point then width and height to indicate
> your crop area.
>
> You then send those numbers to your server side image processing script.
>
> You will need to look for something else using flash and/or  if
> you really want to create the thumbnails on the client side.
>
> Also the way I  use this cropper does not involve Ajax at all. I upload
> the file through the browser normally then choose from a list of files the
> one I want to crop.
>
> The only trick then is to send the message back to the outer page that the
>> upload is complete.
>
>
> That's not so tricky if using pop up windows rather than iframes (I
> imagine it should be a similar process with iframes)
> Have a link on your main page that opens a new window with the form to
> upload the image. Upload the image without ajax, show the uploaded image to
> the user with the cropping UI. Submit the numbers of the selected area back
> to the server to create the actual thumbnail then show a success message to
> the user while setting values in javascript about the url of the new
> thumbnail. When the user clicks to close that window you can have the JS
> variables passed to the parent window then script in that window can insert
> the thumbnail into that page.
>
>
> On Tuesday, 3 July 2012 13:51:56 UTC-4, ppetree wrote:
>>
>> I've spent the last few hours looking all over google for a prototype
>> ajax uploader and thumbnail creator and I'm coming up blank.
>>
>> Has anyone found anything usable (we only need to upload one image per
>> user) or can you point me to some docs for this?
>>
>> Thanks.
>>
>> Pete
>>
>  --
> 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/-/4js1JMWXNeMJ.
>
> 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: Help with element.setattribute

2012-06-30 Thread Larry Holdsworth
Victor,

This is awesome thank-you so much for the help.

Larry

 

From: prototype-scriptaculous@googlegroups.com
[mailto:prototype-scriptaculous@googlegroups.com] On Behalf Of Victor
Sent: Saturday, June 30, 2012 2:13 AM
To: prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Re: Help with element.setattribute

 

Hello!

 

You can do it in many ways:

 

1. Create an empty placeholder for hidden input (div at the bottom of your
form). You can then easily replace content of this div and don't care about
multiple inputs:

 

addElement: function () {

$("totalsContainer").update('');

}

 

2. Create this hidden input in your form on server (in other words, input
should always exist), then just replace its value:

 

addElement: function () {

$("finaltons").setValue(totaltotal);

}

 

3. Combine both ways: check for existence of element (if not exists - then
create it), then update its value:

 

addElement: function () {

var input = $("finaltons");

if (!input) {

  input = new Element({type: "hidden", id: "finaltons"});

  $("formtons").insert(input);

}

input.setValue(totaltotal);

}

 

-- 
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/-/kcV7l5b_sIIJ.
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: uploading a file to a server.

2012-05-16 Thread Jason Westbrook
Here is a simple Sample of Ajax upload using the HTML5 File API

frontend javascript
=
$("fileupload").observe("change",handleupload);

function handleupload( e )
{
var el = e.findElement();
new
Ajax.Request("backend.php?uploadfile=1",{"method":"post","postBody":el.files[0],"onSuccess":returnupload});
}

backend.php
=
if(isset($_GET['uploadfile']))
{
$uploaded_file = file_get_contents("php://input");
file_put_contents("/tmp/myfilename",$uploaded_file);
}

=

You can also add other events to the Ajax call to see upload progress as
well, but again will not work with IE - works in Firefox/Chrome/Safari
though


Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com



On Wed, May 16, 2012 at 11:48 AM, Marty Amberg wrote:

>  Thanks Jason
>
> Will give it a shot.  A example would be great,
>
>
>
> On 5/13/2012 12:32 AM, Jason wrote:
>
>
>  Totally do-able using the HTML 5 Javascript File API (won't work in IE
> though)
>
>  you can use the file object in the postBody option and that will upload
> the file to your php script through the php://input stream - use $_GET
> parameters for the rest of the information you want to post
>
>
>  to solve the IE problem chromeframe is a good solution as well
>
>  I can post an example if you need
>
>  Jason
>
> On Sunday, April 22, 2012 4:54:45 PM UTC-7, nottobefound wrote:
>>
>> Hi all,
>>
>> Quick question.
>> I been trying to get a file to upload to  a server via a form ( works
>> great in straight html calling a php program ) using a  prototype ajax
>> request.  I  don't think it can be done and I have tried various
>> ways.If I am wrong and  could some one point me in the right
>> directions.
>>
>> Thanks
>>
>>
>>
>>
>> --
>> EdenStreet Consulting
>> w:978-741-7518
>> c:978-821-1309
>> Twitter: martyateden
>> Skype: martyateden
>>
>>  --
> 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/-/lcLPBMCW9dMJ.
> 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.
>
>
> --
> EdenStreet Consulting
> w:978-741-7518
> c:978-821-1309
> Twitter: martyateden
> Skype: martyateden
>
>  --
> You received 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: uploading a file to a server.

2012-05-16 Thread Marty Amberg

Thanks Jason

Will give it a shot.  A example would be great,



On 5/13/2012 12:32 AM, Jason wrote:


Totally do-able using the HTML 5 Javascript File API (won't work in IE 
though)


you can use the file object in the postBody option and that will 
upload the file to your php script through the php://input stream - 
use $_GET parameters for the rest of the information you want to post



to solve the IE problem chromeframe is a good solution as well

I can post an example if you need

Jason

On Sunday, April 22, 2012 4:54:45 PM UTC-7, nottobefound wrote:

Hi all,

Quick question.
I been trying to get a file to upload to  a server via a form ( works
great in straight html calling a php program ) using a  prototype
ajax
request.  I  don't think it can be done and I have tried various
ways.If I am wrong and  could some one point me in the right
directions.

Thanks




-- 
EdenStreet Consulting

w:978-741-7518
c:978-821-1309
Twitter: martyateden
Skype: martyateden

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


--
EdenStreet Consulting
w:978-741-7518
c:978-821-1309
Twitter: martyateden
Skype: martyateden

--
You received 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: Is there an inverse of morph('classname')?

2012-04-20 Thread Walter Lee Davis
Thanks, very clever!

Walter

On Apr 20, 2012, at 11:28 AM, Victor wrote:

> Can anyone suggest a simple way to dynamically remove a classname's effect 
> from an element, basically removing the style that was added over time in 
> "reverse"?
> 
> 
> I'd try to remember original style before new classname was applied and morph 
> to this style:
> 
> // remember
> var foo = $('foo'), originalStyle = foo.getStyles();
> // apply CSS class
> foo.morph('here');
> // ... skipped
> // morph to original style
> foo.morph(originalStyle, {
>   afterFinish: function(effect) {
> // remove class name after finish
> effect.element.removeClassName('here');
>   }
> });
> 
> 
> -- 
> 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/-/1niu20woD2EJ.
> 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: Prototype v1.6.0.2 - Changing $ Dollar Currency to £ Sterling

2012-04-19 Thread Walter Lee Davis
Check again to be certain that the text editor you are using saves in UTF-8 (No 
BOM) format. You may be sending the right header, but the wrong code-points. It 
may look fine in your editor because of silent charset munging. (Attached is 
not using your actual calculation code, just a simple string replacement. It 
works here, and from my server http://scripty.walterdavisstudio.com/price.html )

Walter

On Apr 19, 2012, at 9:45 AM, Edward Nygma wrote:

> My server is running locally on XAMPP and as far as I know is sending
> it to my browser in UTF-8
> 
> When I view source as shown below UTF-8 encoding is sent to the
> browser, however the £ symbol is still unrecognised.
> 
> 
>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml";>
> 
> 
> 
> -- 
> You received 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.
> 

Title: Price List




  
Price List:

  $25
  $50
  $100

  
  

-- 
You received 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: Prototype v1.6.0.2 - Changing $ Dollar Currency to £ Sterling

2012-04-19 Thread Walter Lee Davis

On Apr 19, 2012, at 9:45 AM, Edward Nygma wrote:

> My server is running locally on XAMPP and as far as I know is sending
> it to my browser in UTF-8

This is a potential problem source. Can you locate the php.ini file, and see 
precisely what value is set for the default_charset value? By default, this is 
set to empty, and that kicks the can up to Apache, which may not be configured 
to send Unicode by default.

> 
> When I view source as shown below UTF-8 encoding is sent to the
> browser, however the £ symbol is still unrecognised.

What do you see if you use a static HTML file, viewed locally (file / open), 
with the charset mime tag set to utf-8 -- instead of viewing from your server?

Walter

> 
> 
>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml";>
> 
> 
> 
> -- 
> You received 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: Prototype v1.6.0.2 - Changing $ Dollar Currency to £ Sterling

2012-04-19 Thread Walter Lee Davis
Is your code saved in UTF-8, and does your server send it under a Content-type 
header including that charset? yourString.gsub('$','£') should just work as 
long as your surrounding page is Unicode.

Walter

On Apr 19, 2012, at 9:13 AM, Edward Nygma wrote:

> I am having this symbol returned in the browser: �
> 
> When replacing the '$' in string literal to '£' in my code.
> 
> -- 
> You received 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: a few widgets

2012-04-18 Thread м

Thanks Victor.
I fixed a minor bug with version control.
And i corrceted "Get started" section.
What do you mean "source formatting tools"?

--
You received 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: Ajax.Request fails, while vanilla XHR works fine

2012-04-13 Thread Walter Lee Davis
Thanks very much for the added detail. I filed an issue on the Github project 
for the Python server, and within hours another Githubber had posted a pull 
request fixing the bug. The server was just not aware of what to do if it got 
such an OPTIONS request, so it was falling over.

Walter

On Apr 13, 2012, at 5:26 AM, Victor wrote:

> It seems to be an issue on their server (BaseHTTP/0.3 Python/2.7.1+ according 
> to FireBug). I'll file a bug and see what happens.
> 
> XHR without setRequestHeader sends usual 'GET' request:
> 
> Request URL: http://zip.elevenbasetwo.com/?zip=a
> Request Method: GET
> Status Code: 404 Not Found
> Request Headers
> Accept: */*
> Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
> Connection: keep-alive
> Host: zip.elevenbasetwo.com
> Origin: https://groups.google.com
> User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like 
> Gecko) Chrome/18.0.1025.142 Safari/535.19
> Response Headers
> Access-Control-Allow-Origin: *
> Connection: close
> Content-Type: text/plain
> Date: Fri, 13 Apr 2012 09:16:07 GMT
> Server: BaseHTTP/0.3 Python/2.7.1+
> 
> XHR with any setRequestHeader sends first 'OPTIONS' request (so-called 
> preflight):
> 
> Request URL: http://zip.elevenbasetwo.com/?zip=a
> Request Method: OPTIONS
> Status Code: 501 Not Implemented
> Request Headers
> Accept: */*
> Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
> Access-Control-Request-Headers: x-xxx, origin
> Access-Control-Request-Method: GET
> Connection: keep-alive
> Host: zip.elevenbasetwo.com
> Origin: https://groups.google.com
> User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like 
> Gecko) Chrome/18.0.1025.142 Safari/535.19
> Response Headers
> Connection: close
> Content-Type: text/html
> Date: Fri, 13 Apr 2012 09:20:32 GMT
> Server: BaseHTTP/0.3 Python/2.7.1+
> 
> It seems that some browsers (like Firefox and WebKit-based) may send CORS 
> requests without preflight for text/plain resources when no additional 
> headers are set. In other cases they send preflighted 'OPTIONS' request, 
> which is not implemented in this 'BaseHTTP/0.3 Python/2.7.1+' server.
> 
> -- 
> 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/-/6xIQrvgSIqsJ.
> 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: Ajax.Request fails, while vanilla XHR works fine

2012-04-13 Thread Victor

>
> It seems to be an issue on their server (BaseHTTP/0.3 Python/2.7.1+ 
> according to FireBug). I'll file a bug and see what happens.
>
XHR without setRequestHeader sends usual 'GET' request:

Request URL: http://zip.elevenbasetwo.com/?zip=a
Request Method: GET
Status Code: 404 Not Found
*Request Headers*
Accept: */*
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Connection: keep-alive
Host: zip.elevenbasetwo.com
Origin: https://groups.google.com
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like 
Gecko) Chrome/18.0.1025.142 Safari/535.19
*Response Headers*
Access-Control-Allow-Origin: *
Connection: close
Content-Type: text/plain
Date: Fri, 13 Apr 2012 09:16:07 GMT
Server: BaseHTTP/0.3 Python/2.7.1+

XHR with any setRequestHeader sends first 'OPTIONS' request (so-called 
preflight
):

Request URL: http://zip.elevenbasetwo.com/?zip=a
Request Method: OPTIONS
Status Code: 501 Not Implemented
*Request Headers*
Accept: */*
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Access-Control-Request-Headers: x-xxx, origin
Access-Control-Request-Method: GET
Connection: keep-alive
Host: zip.elevenbasetwo.com
Origin: https://groups.google.com
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like 
Gecko) Chrome/18.0.1025.142 Safari/535.19
*Response Headers*
Connection: close
Content-Type: text/html
Date: Fri, 13 Apr 2012 09:20:32 GMT
Server: BaseHTTP/0.3 Python/2.7.1+

It seems that some browsers (like Firefox and WebKit-based) may send CORS 
requests without preflight for text/plain resources when no additional 
headers are set. In other cases they send preflighted 'OPTIONS' request, 
which is not implemented in this 'BaseHTTP/0.3 Python/2.7.1+' server.

-- 
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/-/6xIQrvgSIqsJ.
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: Ajax.Request fails, while vanilla XHR works fine

2012-04-12 Thread Walter Lee Davis

On Apr 12, 2012, at 12:14 PM, Victor wrote:

> Same browser (Safari.latest) on the same computer, the Prototype method gives 
> me a security failure (Origin [my host] is not allowed by 
> Access-Control-Allow-Origin.) while the long-hand XHR (inside a Prototype 
> observer) just works without any comment:
> 
> 
> Two differences I can notice:
> 1. Prototype sets request headers 'X-Requested-With', 'X-Prototype-Version', 
> 'Accept' with setRequestHeaders() - you don't
> 2. Prototype calls send with null argument
> this.transport.send(null); // Prototype
> vs
> client.send(); // your raw XHR
> 
> If you can test your code with these two changes - will it raise error?
> 
>   $('zip').observe('change', function(evt) {
> var client = new XMLHttpRequest();
> client.open("GET", "http://zip.elevenbasetwo.com?zip="; + $F(this), true);
> client.onreadystatechange = function() {
>   if(client.readyState == 4) {
> var data = client.responseText.evalJSON();
> $('city').setValue(data.city);
> $('state').setValue(data.state);
>   };
> };
> client.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
> client.setRequestHeader('X-Prototype-Version', '1.7');
> client.setRequestHeader('Accept', 'text/javascript, text/html, 
> application/xml, text/xml, */*');
> client.send(null);
>   });
> 
> 

Thanks very much for the suggestion. It looks as though ANY setRequestHeader 
invocation at all is enough to scuttle the request. I tried commenting one, 
then two, then all of them out. Without those three lines, the request works 
fine -- even with the null in the send. But add any one of them back, and the 
request fails. It seems to be an issue on their server (BaseHTTP/0.3 
Python/2.7.1+ according to FireBug). I'll file a bug and see what happens.

Walter

-- 
You received 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: Ajax.Request fails, while vanilla XHR works fine

2012-04-11 Thread Walter Lee Davis
I understand the SOP, I was wondering why it worked when I violated SOP from a 
hard-coded XHR request. Under the hood, it is my understanding that Prototype 
sets up a very similar XHR request anyway. It doesn't make any sense that the 
one would work while the other did not. This server is specifically kinked to 
allow a request such as this, or else the SOP would cause it to fail no matter 
what. Can anyone point out the flaw in my logic here?

Walter

On Apr 11, 2012, at 9:00 PM, Jason wrote:

> 
> Have you tried to just use
> 
> new Ajax.Request('index.php', .);
> 
> vs the full URL
> 
> from the Ajax.Request source code
> 
> * - url (String): The URL to fetch. When the _same-origin_ policy is
> in
> * effect (as it is in most cases), `url` **must** be a relative URL or
> an
> * absolute URL that starts with a slash (i.e., it must not begin with
> * `http`).
> 
> 
> On Apr 10, 7:52 pm, Walter Lee Davis  wrote:
>> Typo, fixed; still fails, same error, before ever reaching this line.
>> 
>> On Apr 10, 2012, at 10:50 PM, Walter Lee Davis wrote:
>> 
>>>var data = responseText.evalJSON();
>> 
>> s/b var data = transport.responseText.evalJSON();
>> 
>> Walter
> 
> -- 
> You received 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: accessing global objects

2012-04-02 Thread T.J. Crowder
>From the code you've quoted, it would be accessible, there must be more to 
it than that. Can you provide a minimalist test case on http://jsbin.com or 
similar?
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

On Monday, 2 April 2012 12:21:44 UTC+1, nav indian wrote:
>
>even after declaring as global, it is still not accessible . the 
> following code will get an idea.
>
>>  one.js
>>> namespace("package1")
>>>
>>var oneObject ;
>
>>  package1.tabs=function(app)
>>> {
>>>this.app = app;
>>>this. createTabs();
>>> } 
>>>
>>> createTabs = function(){
>>>
>>>   oneObject = new thirdpartyObject();
>>>
>>> }
>>>
>>>
>>> two.js
>>>
>>> //Here I have to access oneObject.
>>>
>>>
> On Mon, Apr 2, 2012 at 1:28 PM, T.J. Crowder wrote:
>
>> > Here I have to access oneObject.
>>
>> You can't, it's a local variable within the function you assigned to the 
>> `createTabs` variable. Unless you export it (make it publicly accessible in 
>> some way, for instance by assigning it to your `package1` object as a 
>> property), it's completely private to `createTabs`.
>>
>> Side note: Your code is falling prey to The Horror of Implicit 
>> Globals[1]. Strongly recommend properly declaring variables to avoid that.
>>
>> 1: http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
>>
>> Best,
>> --
>> T.J. Crowder
>> Independent Software Engineer
>> tj / crowder software / com
>> www / crowder software / com
>>
>> On Sunday, 1 April 2012 12:41:16 UTC+1, nav indian wrote:
>>>
>>> Hi 
>>>
>>> I have two javascript files.
>>> one.js
>>> namespace("package1")
>>>
>>var oneObject ;
>
>> package1.tabs=function(app)
>>> {
>>>this.app = app;
>>>this. createTabs();
>>> } 
>>>
>>> createTabs = function(){
>>>
>>>   oneObject = new thirdpartyObject();
>>>
>>> }
>>>
>>>
>>> two.js
>>>
>>> //Here I have to access oneObject.
>>>
>>>
>>>
>>>
>>>
>>>  -- 
>> 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/-/XJ20PmyWnIQJ.
>>
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/hJoyflIZoi8J.
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: accessing global objects

2012-04-02 Thread Navindian
   even after declaring as global, it is still not accessible . the
following code will get an idea.

> one.js
>> namespace("package1")
>>
>var oneObject ;

> package1.tabs=function(app)
>> {
>>this.app = app;
>>this. createTabs();
>> }
>>
>> createTabs = function(){
>>
>>   oneObject = new thirdpartyObject();
>>
>> }
>>
>>
>> two.js
>>
>> //Here I have to access oneObject.
>>
>>
On Mon, Apr 2, 2012 at 1:28 PM, T.J. Crowder  wrote:

> > Here I have to access oneObject.
>
> You can't, it's a local variable within the function you assigned to the
> `createTabs` variable. Unless you export it (make it publicly accessible in
> some way, for instance by assigning it to your `package1` object as a
> property), it's completely private to `createTabs`.
>
> Side note: Your code is falling prey to The Horror of Implicit Globals[1].
> Strongly recommend properly declaring variables to avoid that.
>
> 1: http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
>
> Best,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> On Sunday, 1 April 2012 12:41:16 UTC+1, nav indian wrote:
>>
>> Hi
>>
>> I have two javascript files.
>> one.js
>> namespace("package1")
>>
>var oneObject ;

> package1.tabs=function(app)
>> {
>>this.app = app;
>>this. createTabs();
>> }
>>
>> createTabs = function(){
>>
>>   oneObject = new thirdpartyObject();
>>
>> }
>>
>>
>> two.js
>>
>> //Here I have to access oneObject.
>>
>>
>>
>>
>>
>>  --
> 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/-/XJ20PmyWnIQJ.
>
> 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: Remove certain text from the title attribute

2012-03-08 Thread john knepper

lallo, can you elaborate on what you 'want' to do?

On 3/8/12 5:59 PM, lalov1 wrote:

I'm doing a hack and the link is showing up in the title attribute.

Here is my code which only removes the "", but I need to remove
the opening href as well.
//Remove Title
titleLinks=$$('div.ms-acal-item');

for (var i = 0; i<  titleLinks.length; i++) {
   var element = $(titleLinks[i]);
   if (element.hasAttribute('title')) {
   var tempTitle = element.readAttribute('title');
   tempTitle = tempTitle.gsub('','');
   element.setAttribute('title', tempTitle);
   } else {
   element.setAttribute('title', '');
   }
 }



On Mar 8, 1:03 pm, blechler  wrote:

Hi Lallo,

I'm not sure that I entirely understand what you are attempting to
accomplish and how removing the title attribute is working for you.
When I go to the provided page and attempt to inspect it, I see a lot
of title attributes being rapidly added and removed from the div
containing the calendar item.

Nevertheless, let's say you have the following:


   
 7:00 pm​Mayan Elder
   


the following script will do what I think you want to accomplish:


function removeThatAnchor() {
   var innerDiv = $('foo').select('.ms-acal-sdiv')[0];
   var aToRemove = innerDiv.select('a')[0];
   var aText = aToRemove.innerHTML;
   aToRemove.remove();
   innerDiv.update(innerDiv.innerHTML + " " + aText);}



Bernard

On Mar 7, 12:06 pm, lalov1  wrote:








Hello all,
I'm new to prototype and am trying to achieve the following. I have
the following title text "1:00 pm - 2:00 pmhttp://www.google.com";>Link Goes 
Here"
I want to delete the "http://www.google.com";>" and the"".
What is the best way to do this. Right now I'm using the
removeAttribute('title'); which works, but not like I want it to. Here
is a link to our 
page:http://www.colostate-pueblo.edu/Communications/Events/Pages/default.aspx
Thank you,
Lallo


--
You received 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: Handle an Event or Element in one function (or alias)?

2012-02-26 Thread Walter Lee Davis

On Feb 26, 2012, at 5:04 AM, T.J. Crowder wrote:

> Hi,
> 
> On Feb 25, 8:26 pm, Walter Lee Davis  wrote:
>> I have defined a new function on the Element namespace:
>> 
>> //common function to switch tabs
>> Element.addMethods({
>>   setTab: function(elm, evt){
>> //hide all the content
>> bodies.invoke('hide');
>> tabs.invoke('removeClassName','active');
>> elm.addClassName('active').bodies.invoke('show');
>>   }
>> })
>> 
>> It works perfectly when it's passed from an element
>> 
>> $('sometab').setTab();
>> 
>> But if I want to register a click handler on all the tabs:
>> 
>> tabs.invoke('observe','click', setTab);
>> 
>> I get an error:
>> 
>> TypeError: 'undefined' is not a function (evaluating 'handler.call(element, 
>> event)')
>> 
>> ...from Prototype 1.7 in Safari 5.1.2.
>> 
>> Is there a way to write this so it will work in both contexts, or do I need 
>> to add an explicit event handler form of the method somewhere else?
>> 
>> If I write the handler like this:
>> 
>> tabs.invoke('observe','click', function(evt){ this.setTab(); } );
>> 
>> ...then it works perfectly, but I'm confused why it's not working in the 
>> other syntax. I could swear I've used that same construction earlier and had 
>> it work just fine.
>> 
>> Thanks in advance,
>> 
>> Walter
> 
> Here's how you would hook that up:
> 
> tabs.invoke('observe','click', Element.Methods.setTab.methodize() );
> 
> Live example: http://jsbin.com/opitis
> 
> Explanation:
> 
> * `Element.Methods` contains all of the methods that will be applied
> to elements when augmenting them (including ones you add)
> http://api.prototypejs.org/dom/Element/Methods/
> 
> * `methodize` is what Prototype uses to turn Element.setTab("foo")
> into $("foo").setTab();
> http://api.prototypejs.org/language/Function/prototype/methodize/
> 
> Hope this helps - happy coding!

Thanks very much, this works perfectly! Also thanks to 'goldenmean' for another 
approach, also works!

Walter

> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / 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.
> 

-- 
You received 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: no compatibility google add and my class (prototype)

2012-02-10 Thread Victor
1. You cannot use the name `Error` - there is already global object named 
Error.
 
Try with another name.
2. You can shorten your code a bit:
var User = Class.create({
  // methods
});

-- 
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/-/Xth81vpsHpwJ.
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: no compatibility google add and my class (prototype)

2012-01-25 Thread laurent barre
var Errror;
Error = {

function_1 () {
...
},

function_2 () {
...
}

};



2012/1/25, laurent barre :
> It's a mistake.
>
> var Error;
> Error = {
>
> };
>
>
>
> 2012/1/25, Victor :
>> What is
>>
>> var Errror;
>> Error = {
>> };
>>
>> (note the difference between *Errror* and *Error*)
>>
>> --
>> 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/-/EVbMZKNLXmcJ.
>> 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: no compatibility google add and my class (prototype)

2012-01-25 Thread laurent barre
It's a mistake.

var Error;
Error = {

};



2012/1/25, Victor :
> What is
>
> var Errror;
> Error = {
> };
>
> (note the difference between *Errror* and *Error*)
>
> --
> 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/-/EVbMZKNLXmcJ.
> 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: Status of prototype

2012-01-07 Thread Phil Petree
I'm already doing 12 hour days x 7... I don't have time to get my own work
done and no money to pay someone else to do it! LOL
On Jan 7, 2012 4:32 AM, "James Hargreaves" 
wrote:

> I wish I had time to commit...
>
> Apple, fancy sponsoring?!
>
> On 6 Jan 2012, at 19:09, "T.J. Crowder"  wrote:
>
> > Hi,
> >
> > On Jan 6, 12:49 pm, James Hargreaves 
> > wrote:
> >> Hello,
> >>
> >> I note that the prototype libraries (available on prototypejs.org)
> >> have not been updated since November 2010. Indeed, nothing much seems
> >> to have been updated on the site since around then.
> >>
> >> Is prototype still an active project?
> >>
> >> Thanks
> >> Jay
> >
> > (Caveat: I'm not a member of the Prototype team and don't speak for
> > them. My view of the project is from the outside, and so may be
> > flawed. I was a bit involved with the project briefly, doing a fair
> > bit of missing documentation with an eye toward contributing on the
> > code front as well, but stepped away from it for various reasons a
> > couple of years ago.)
> >
> >> Is prototype still an active project?
> >
> > It depends on your perspective. Unlike some other libraries, Prototype
> > has no corporate sponsor; no one is paid to work on it. There's been
> > no visible activity on the project since November 2010 (the last
> > release, and last blog entry). The previous version was 14 months
> > earlier (September 2009). There are 105 outstanding bug reports,
> > including some that are quite straightforward to fix (such as
> > Prototype overwriting any native implementation of `Array#filter` and
> > such; issue #317).
> >
> > Most of the people who contributed to the project in the past are not
> > currently doing so; as far as I'm aware, only Andrew Dupont (the
> > project lead) is even nominally on the Prototype team at this point,
> > and he's busy with other things. Here's what Andrew had to say the
> > last time this came up, about three months ago:
> >
> http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/7d434e109c23c306/547c3ed0303b4c78#547c3ed0303b4c78
> >
> > My take-away here is that the project is essentially inactive -- after
> > all, Andrew can't be expected to do all the work himself! He has a job
> > and a mortgage and a life like the rest of us. But it could be
> > reactivated quite quickly, really, if someone with some significant
> > time available, and the necessary credentials to make Andrew think it
> > made sense, stepped up and offered to take the reins alongside him.
> > Ideally, someone or ones working for a company or companies with a
> > significant Prototype investment that want to see the library continue
> > and are happy to pay their engineers to work on it a bit rather than
> > paying them to replace it with something else -- e.g., companies
> > "giving back" to the project with actual paid developer time. It
> > wouldn't take much. The project needs one person with a reasonable
> > time commitment per week (say, 4-8 hours/week) to co-chair with
> > Andrew, and then if (say) five of the companies that use Prototype
> > could offer two hours of a developer's time per week triaging bug
> > reports, fixing bugs, etc., that would make a _massive_ difference to
> > the project. Hopefully that new co-chair could also look at some of
> > the longer-term stuff (like using element wrappers rather than DOM
> > element augmentation, which I know was high on Andrew's to do list).
> >
> > Best,
> > --
> > T.J. Crowder
> > Independent Software Engineer
> > tj / crowder software / com
> > www / crowder software / 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.
> >
>
> --
> You received 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: Status of prototype

2012-01-07 Thread James Hargreaves
I wish I had time to commit...

Apple, fancy sponsoring?!

On 6 Jan 2012, at 19:09, "T.J. Crowder"  wrote:

> Hi,
> 
> On Jan 6, 12:49 pm, James Hargreaves 
> wrote:
>> Hello,
>> 
>> I note that the prototype libraries (available on prototypejs.org)
>> have not been updated since November 2010. Indeed, nothing much seems
>> to have been updated on the site since around then.
>> 
>> Is prototype still an active project?
>> 
>> Thanks
>> Jay
> 
> (Caveat: I'm not a member of the Prototype team and don't speak for
> them. My view of the project is from the outside, and so may be
> flawed. I was a bit involved with the project briefly, doing a fair
> bit of missing documentation with an eye toward contributing on the
> code front as well, but stepped away from it for various reasons a
> couple of years ago.)
> 
>> Is prototype still an active project?
> 
> It depends on your perspective. Unlike some other libraries, Prototype
> has no corporate sponsor; no one is paid to work on it. There's been
> no visible activity on the project since November 2010 (the last
> release, and last blog entry). The previous version was 14 months
> earlier (September 2009). There are 105 outstanding bug reports,
> including some that are quite straightforward to fix (such as
> Prototype overwriting any native implementation of `Array#filter` and
> such; issue #317).
> 
> Most of the people who contributed to the project in the past are not
> currently doing so; as far as I'm aware, only Andrew Dupont (the
> project lead) is even nominally on the Prototype team at this point,
> and he's busy with other things. Here's what Andrew had to say the
> last time this came up, about three months ago:
> http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/7d434e109c23c306/547c3ed0303b4c78#547c3ed0303b4c78
> 
> My take-away here is that the project is essentially inactive -- after
> all, Andrew can't be expected to do all the work himself! He has a job
> and a mortgage and a life like the rest of us. But it could be
> reactivated quite quickly, really, if someone with some significant
> time available, and the necessary credentials to make Andrew think it
> made sense, stepped up and offered to take the reins alongside him.
> Ideally, someone or ones working for a company or companies with a
> significant Prototype investment that want to see the library continue
> and are happy to pay their engineers to work on it a bit rather than
> paying them to replace it with something else -- e.g., companies
> "giving back" to the project with actual paid developer time. It
> wouldn't take much. The project needs one person with a reasonable
> time commitment per week (say, 4-8 hours/week) to co-chair with
> Andrew, and then if (say) five of the companies that use Prototype
> could offer two hours of a developer's time per week triaging bug
> reports, fixing bugs, etc., that would make a _massive_ difference to
> the project. Hopefully that new co-chair could also look at some of
> the longer-term stuff (like using element wrappers rather than DOM
> element augmentation, which I know was high on Andrew's to do list).
> 
> Best,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / 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.
> 

-- 
You received 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: IE8 + Prototype AJAX = HTTP Status 12019

2011-12-16 Thread Phil Petree
Unless you're getting paid by the hour, you loose nothing by temporarily
trying a later version of prototype.  Try eliminating the easy stuff before
working on the hard and you'll avoid that headslap moment that comes when
you realize you wasted two weeks for nothing.
On Dec 15, 2011 3:35 PM, "web_dev_ajax"  wrote:

> Thanks for the suggestion. That's an option that we plan to do with
> the next Production release. Unfortunately, we have release cycles
> that we have to adhere to and in the mean time, the client is unhappy
> with getting these 12XXX status code errors. I have also done a diff
> between version 1.4.0 and 1.7.0 and I don't see any differences that I
> believe may help with these 12XXX status errors, but we won't know
> until we do a release and see if the errors are still occurring.
>
> I do have an update - it seems that ALL the users at the client shop
> are now getting the 12XXX status code errors on IE8 (12019 and 12152
> so far). The client shop claims that it's happening about once an
> hour.
>
> Thanks to some leads from Khan (http://groups.google.com/group/google-
> web-toolkit/browse_thread/thread/f8059139eab52ccf), I'm now trying to
> monitor the requests and responses to see if there's a pattern to
> these seemingly intermittent errors, specifically request header
> content-length that doesn't match the request body length.
>
> Still, if anyone has any ideas or suggestions, I'd appreciate hearing
> from you. Thanks.
>
> On Dec 15, 1:55 pm, Phil Petree  wrote:
> > I would try using a later version of proto on just that page.
> > On Dec 15, 2011 1:43 PM, "web_dev_ajax"  wrote:
> >
> > > I have a B2B web application that is developed on Struts JSP using
> > > Prototype JS library (version 1.4.0) for AJAX. I have a client running
> > > my application on IE8. She is intermittently getting the http status
> > > code of 12019 (this is an IE specific status code for
> > > ERROR_INTERNET_INCORRECT_HANDLE_STATE). She is the only person in the
> > > client shop that gets the error and she cannot consistently reproduce
> > > the error. However, after she gets the error, she can close her
> > > browser and logs in again to go to the same page as before and not get
> > > the error.
> >
> > > Initially the client shop was on IE6 SP2 and all the users got the
> > > error 12019 intermittently also. After researching on the internet, we
> > > recommended that they upgrade to IE8 to see if the error is resolved
> > > because error 12019 is widely associated with IE6. Now that everyone
> > > in the client shop has upgraded to IE8, and after about 2 months after
> > > the upgrade, one user is beginning to get the error 12019 again. We
> > > have been unable to reproduce the error under various scenarios in
> > > Development.
> >
> > > One more thing to add, in one instance, the user that was getting the
> > > 12019 error code also got an exception message coming back from the
> > > AJAX call. The exception message is: System error: -2146697208.
> >
> > > Googling this exception message indicates that it is tied to the error
> > > "The download of the specific resource has failed." The same message
> > > has been seen before by the same client when they were on IE6, but on
> > > IE6, they saw the explicit message rather than the exception code.
> >
> > > Does anyone have this similar problem or know of a fix or know of a
> > > way for me to reproduce this in order to find a solution?
> >
> > > Any help is appreciated. Thank you.
> >
> > > --
> > > You received 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.
>
>

-- 
You received 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: Recode jQuery expression in the prototype way

2011-12-15 Thread Brian Williams
oh my carp... dude's, thank you both I love this.



On Thu, Dec 15, 2011 at 11:30 PM, buda  wrote:

> http://webdeveloperplus.com/**jquery/create-a-dynamic-**
> scrolling-content-box-using-**ajax/
>
> function onScroll(e) {
> var el = e.element();
> if (el.scrollTop >= (el.scrollHeight - (el.clientHeight + 200))) {
> //load with ajax some html and append to element
> }
> }
>
>  --
> 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/-/4NQ5VfaQV-UJ.
>
> 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: Where is ver. 2.0 is coming?

2011-12-01 Thread Phil Petree
Hysterical!!!  Thanks for that laugh!!!
On Dec 1, 2011 9:01 AM, "Victor"  wrote:

> 1. Declaration with value assignment
> 2. Declare loop variables and cache length inside of for() - this can
> increase performance  -
> caching length outside of for() is slower in almost all results (all
> Firefox and Safari, IE9 and some Chrome results)
> 3. Unnecessary return values
>
> Example can be rewritten as:
>   SelectParser.select_to_array = function(select) {
> var parser = new SelectParser(), _ref = select.childNodes;
> for (var _i = 0, _len = _ref.length; _i < _len; _i++) {
>   parser.add_node(_ref[_i]);
> }
> return parser.parsed;
>   };
>
> yet another real example:
>
> CoffeeScript (with use of Prototype):
> class Chosen extends AbstractChosen
> ...
>   no_results_clear: ->
> nr = null
> nr.remove() while nr = @search_results.down(".no-results")
>
> CoffeeScript translated to JavaScript:
> Chosen.prototype.no_results_clear = function() {
>   var nr, _results;
>   nr = null;
>   _results = [];
>   while (nr = this.search_results.down(".no-results")) {
> _results.push(nr.remove());
>   }
>   return _results;
> };
>
> and pure JavaScript:
> var Chosen = Class.create(AbstractChosen, {
> ...
>   no_results_clear: function() {
> this.search_results.select(".no-results").invoke("remove");
>   },
> ...
> });
>
>  --
> 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/-/FBTDmhOjgWoJ.
> 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: Element.replace get top node of replaced content

2011-11-30 Thread Walter Lee Davis
There is no universal parent, not while there are tr, td, th, li, etc. in the 
mix of possible children. There are quite a few low-level elements that can 
only go in one or two possible parent tags, and nothing else will work.

Walter

On Nov 30, 2011, at 11:09 AM, vhochstein wrote:

> Hi,
> 
> Unfortunetly, I had to realize that my approach does not work in any
> every case.
> 
> var new_element = new Element('div').update(''); fails. tr
> Tag is not added to div
> 
> I think update function checks if tr elements are allowed inside of
> div elements, cause
> new Element('tbody').update(''); works as aspected.
> 
> Does anybody if there exists a tag which can be updated with any html
> code?
> 
> Thanks a lot in advance.
> 
> --
> Volker
> 
> 
> 
> 
> 
> On 5 Nov., 10:58, vhochstein  wrote:
>> Hi
>> 
>> Thanks a lot for your help.
>> 
>> I slightly changed it:
>> var new_element = new Element('div').update(html);
>> new_element = new_element.firstDescendant();
>> Element.replace(old_element, new_element);
>> 
>> --
>> Volker
>> 
>> On 4 Nov., 23:31, "T.J. Crowder"  wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> On Nov 4, 5:30 pm, vhochstein  wrote:
>> 
 Hi,
>> 
 if I call old_element = Element.replace(element, 'html code for new
 element')
 I get the old_element in response.
>> 
 How may I get the new_element node if it does nt have an id attribute?
>> 
 Thanks a lot in advance.
>> 
 --
 Volker
>> 
>>> Well, you could find it through the hierarchy or some such, but
>>> probably the easiest thing is to get a reference to it *before* you
>>> replace it:
>> 
>>> var new_element = new Element('tagName').update('contents');
>>> Element.replace(old_element, new_element);
>> 
>>> Live example:http://jsbin.com/uwibuh
>> 
>>> HTH,
>>> --
>>> T.J. Crowder
>>> Independent Software Engineer
>>> tj / crowder software / com
>>> www / crowder software / 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.
> 

-- 
You received 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: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Also CoffeeScript sometimes generates very ugly code. Example:

CoffeeScript:
SelectParser.select_to_array = (select) ->
  parser = new SelectParser()
  parser.add_node( child ) for child in select.childNodes
  parser.parsed

Generated JavaScript:
  SelectParser.select_to_array = function(select) {
var child, parser, _i, _len, _ref;
parser = new SelectParser();
_ref = select.childNodes;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
  child = _ref[_i];
  parser.add_node(child);
}
return parser.parsed;
  };

-- 
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/-/deEMCdQYgz0J.
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: Where is ver. 2.0 is coming?

2011-11-29 Thread Walter Lee Davis
CoffeeScript is nothing more than a compact and terse programming language to 
generate JavaScript. Think of it as HAML for JavaScript. When you use 
CoffeeScript, it gets compiled into JavaScript before it is served to the 
browser. It's not a framework, although there are some goodies to make certain 
constructions less painful to write, in the end, those painful constructions 
are generated in full (I'm looking at you, for loops). 

In contrast, Prototype extends the JavaScript language to give it those terse 
methods that we love, and under the hood, actually writes a whole shed-load of 
compatibility shims so we don't have to write such defensive code, even when 
faced with the beast that is IE. There is nothing like that in CoffeeScript.

Walter

On Nov 28, 2011, at 3:41 PM, Pablo Aravena wrote:

> Is an object oriented language, and you can combine it with a selector engine 
> like jquery. I think is a good match for a migration, just my point of view.
> 
> Regards
> Pablo
> 
> 
> 
> 
> On Mon, Nov 28, 2011 at 11:57 AM, buda  wrote:
> But it's only new syntax sugar - not framework like Prototype with
> many features!!
> 
> On 28 ноя, 18:48, Pablo Aravena  wrote:
> > Hi buda
> >
> > I think there will be no new releases of prototype in the near future. That
> > is sad, but some months ago I began looking at CoffeScript and I began
> > thinking that it will be the natural replace for prototype library. Also
> > many of the original creators of the prototype library are working on that
> > project.
> >
> > See this presentation:
> >
> > https://sstephenson.s3.amazonaws.com/presentations/fowa-2011-coffeesc...
> >
> > Saludos
> > Pablo
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Nov 28, 2011 at 8:30 AM, buda  wrote:
> > > Who knows when is early code ver.2.0 of the library will appear?
> >
> > > --
> > > You received 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.
> 
> 
> 
> -- 
> You received 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: Where is ver. 2.0 is coming?

2011-11-29 Thread Victor
Take a look at RightJS  - it is very close to 
Prototype+Scripty, and (still) has very operative support at Google 
groups 

-- 
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/-/_PGxK7wwpb8J.
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: Where is ver. 2.0 is coming?

2011-11-29 Thread Pablo Aravena
Is an object oriented language, and you can combine it with a selector
engine like jquery. I think is a good match for a migration, just my point
of view.

Regards
Pablo




On Mon, Nov 28, 2011 at 11:57 AM, buda  wrote:

> But it's only new syntax sugar - not framework like Prototype with
> many features!!
>
> On 28 ноя, 18:48, Pablo Aravena  wrote:
> > Hi buda
> >
> > I think there will be no new releases of prototype in the near future.
> That
> > is sad, but some months ago I began looking at CoffeScript and I began
> > thinking that it will be the natural replace for prototype library. Also
> > many of the original creators of the prototype library are working on
> that
> > project.
> >
> > See this presentation:
> >
> > https://sstephenson.s3.amazonaws.com/presentations/fowa-2011-coffeesc...
> >
> > Saludos
> > Pablo
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Nov 28, 2011 at 8:30 AM, buda  wrote:
> > > Who knows when is early code ver.2.0 of the library will appear?
> >
> > > --
> > > You received 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.
>
>

-- 
You received 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: mobile solution?

2011-11-23 Thread Jimmy Brake
No worries, we have to start coding on this tomorrow ... if the 'default'
app does not work well in Android we will make adjustments as needed.



On Sat, Nov 19, 2011 at 10:30 AM, Phil Petree  wrote:

> Back in the beginning (we're talking the 80's here), I wrote my first
> piece of code in 8086 assember and I've migrated to C (had one of the
> original windows SDKs), C++, ASP, .NET over to PHP, javascript and
> prototype etc. I'm not generally the swiftest coder out there but given
> enough time I can generally figure out solutions to even the most complex
> of problems and I can honestly say that SENCHA completely escapes me!  I
> couldn't get a single one of their demos to work and it was nearly
> impossible to extend it to anything remotely useful (i.e. capturing a users
> location). After emailing people who claimed to have their ap up
> and running in 1 day and learning it was marketing hype, I finally just
> walked away from it...
>
> Scripty looked promising but it is being developed very slowly...
> painfully so...
>
> I've looked at a number of other "silver bullet" solutions and nothing
> really exists.  I finally relented and hired a shop to write the mobile
> apps.
>
> It would be nice if someone would write a nice "device abstraction layer"
> but I dont see that happening... at least not a freebie! LOL
>
> On Sat, Nov 19, 2011 at 1:27 AM,  wrote:
>
>> I think android specified by Joe still †ђξ production options Jimmy.
>> Sent from my BlackBerry wireless device from MTN
>>
>> -Original Message-
>> From: "joe t." 
>> Sender: prototype-scriptaculous@googlegroups.com
>> Date: Fri, 18 Nov 2011 18:44:58
>> To: Prototype & script.aculo.us
>> Reply-To: prototype-scriptaculous@googlegroups.com
>> Subject: [Proto-Scripty] Re: mobile solution?
>>
>> Er, Android 2.3.7 ... D'oh!
>>
>> On Nov 18, 9:43 pm, "joe t."  wrote:
>> > i may have the wrong impression, but my tinkering on scripty's demo
>> > page has been...unimpressive. i'm using Android 2.4 & so far, hardly
>> > any of the mobile/touch demos work. In fact, from the touch-demo page:
>> >
>> > "These demos are optimized for the Starlight browser, iPhone Safari
>> > 3+, Desktop Safari 4+ and Firefox 3.5+. Support for IE is incomplete
>> > at this time.
>> >
>> > The scripty2 multitouch support is not final, it's a alpha-stage
>> > implementation. This means there's several restrictions and known bugs
>> > that prevents it from being used in a production environment."
>> >
>> > Honestly, i don't think Prototype has been active enough to warrant a
>> > mobile version. There are several recent threads that discuss
>> > Prototype's current status & future. To my knowledge (which comes
>> > mainly from observation of this group), there's not much call for a
>> > mobile Prototype. Scripty looks like the best bet, and its development
>> > cycle is pretty slow. Which isn't a knock against the people involved.
>> > Life is life, right?
>> >
>> > Hope that informs, as i'm sure it hardly helps. ;)
>> > -joe t.
>> >
>> > On Nov 18, 6:31 pm, Jimmy Brake  wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Hi,
>> >
>> > > Does anyone know of a lib that can extend Prototype so it's like
>> sencha
>> > > touch, jquery.mobile or has anyone been using scripty in production?
>> >
>> > > I presently only need to support ipad's. However over time I plan on
>> > > supporting all smart phones and tablets.
>> >
>> > > Thanks,
>> >
>> > > Jimmy
>>
>> --
>> You received 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.
>>
>>
>  --
> You received 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...@googlegr

Re: [Proto-Scripty] Re: mobile solution?

2011-11-19 Thread Phil Petree
Back in the beginning (we're talking the 80's here), I wrote my first piece
of code in 8086 assember and I've migrated to C (had one of the original
windows SDKs), C++, ASP, .NET over to PHP, javascript and prototype etc.
I'm not generally the swiftest coder out there but given enough time I can
generally figure out solutions to even the most complex of problems and I
can honestly say that SENCHA completely escapes me!  I couldn't get a
single one of their demos to work and it was nearly impossible to extend it
to anything remotely useful (i.e. capturing a users location). After
emailing people who claimed to have their ap up and running in 1 day and
learning it was marketing hype, I finally just walked away from it...

Scripty looked promising but it is being developed very slowly... painfully
so...

I've looked at a number of other "silver bullet" solutions and nothing
really exists.  I finally relented and hired a shop to write the mobile
apps.

It would be nice if someone would write a nice "device abstraction layer"
but I dont see that happening... at least not a freebie! LOL

On Sat, Nov 19, 2011 at 1:27 AM,  wrote:

> I think android specified by Joe still †ђξ production options Jimmy.
> Sent from my BlackBerry wireless device from MTN
>
> -Original Message-
> From: "joe t." 
> Sender: prototype-scriptaculous@googlegroups.com
> Date: Fri, 18 Nov 2011 18:44:58
> To: Prototype & script.aculo.us
> Reply-To: prototype-scriptaculous@googlegroups.com
> Subject: [Proto-Scripty] Re: mobile solution?
>
> Er, Android 2.3.7 ... D'oh!
>
> On Nov 18, 9:43 pm, "joe t."  wrote:
> > i may have the wrong impression, but my tinkering on scripty's demo
> > page has been...unimpressive. i'm using Android 2.4 & so far, hardly
> > any of the mobile/touch demos work. In fact, from the touch-demo page:
> >
> > "These demos are optimized for the Starlight browser, iPhone Safari
> > 3+, Desktop Safari 4+ and Firefox 3.5+. Support for IE is incomplete
> > at this time.
> >
> > The scripty2 multitouch support is not final, it's a alpha-stage
> > implementation. This means there's several restrictions and known bugs
> > that prevents it from being used in a production environment."
> >
> > Honestly, i don't think Prototype has been active enough to warrant a
> > mobile version. There are several recent threads that discuss
> > Prototype's current status & future. To my knowledge (which comes
> > mainly from observation of this group), there's not much call for a
> > mobile Prototype. Scripty looks like the best bet, and its development
> > cycle is pretty slow. Which isn't a knock against the people involved.
> > Life is life, right?
> >
> > Hope that informs, as i'm sure it hardly helps. ;)
> > -joe t.
> >
> > On Nov 18, 6:31 pm, Jimmy Brake  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > Does anyone know of a lib that can extend Prototype so it's like sencha
> > > touch, jquery.mobile or has anyone been using scripty in production?
> >
> > > I presently only need to support ipad's. However over time I plan on
> > > supporting all smart phones and tablets.
> >
> > > Thanks,
> >
> > > Jimmy
>
> --
> You received 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.
>
>

-- 
You received 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: mobile solution?

2011-11-19 Thread cilsilver
I think android specified by Joe still †ђξ production options Jimmy.
Sent from my BlackBerry wireless device from MTN

-Original Message-
From: "joe t." 
Sender: prototype-scriptaculous@googlegroups.com
Date: Fri, 18 Nov 2011 18:44:58 
To: Prototype & script.aculo.us
Reply-To: prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Re: mobile solution?

Er, Android 2.3.7 ... D'oh!

On Nov 18, 9:43 pm, "joe t."  wrote:
> i may have the wrong impression, but my tinkering on scripty's demo
> page has been...unimpressive. i'm using Android 2.4 & so far, hardly
> any of the mobile/touch demos work. In fact, from the touch-demo page:
>
> "These demos are optimized for the Starlight browser, iPhone Safari
> 3+, Desktop Safari 4+ and Firefox 3.5+. Support for IE is incomplete
> at this time.
>
> The scripty2 multitouch support is not final, it's a alpha-stage
> implementation. This means there's several restrictions and known bugs
> that prevents it from being used in a production environment."
>
> Honestly, i don't think Prototype has been active enough to warrant a
> mobile version. There are several recent threads that discuss
> Prototype's current status & future. To my knowledge (which comes
> mainly from observation of this group), there's not much call for a
> mobile Prototype. Scripty looks like the best bet, and its development
> cycle is pretty slow. Which isn't a knock against the people involved.
> Life is life, right?
>
> Hope that informs, as i'm sure it hardly helps. ;)
> -joe t.
>
> On Nov 18, 6:31 pm, Jimmy Brake  wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Does anyone know of a lib that can extend Prototype so it's like sencha
> > touch, jquery.mobile or has anyone been using scripty in production?
>
> > I presently only need to support ipad's. However over time I plan on
> > supporting all smart phones and tablets.
>
> > Thanks,
>
> > Jimmy

-- 
You received 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: mobile solution?

2011-11-18 Thread Jimmy Brake
That's to bad .. hopefully someone will come along soon and tell us
different. ...

On Fri, Nov 18, 2011 at 6:44 PM, joe t.  wrote:

> Er, Android 2.3.7 ... D'oh!
>
> On Nov 18, 9:43 pm, "joe t."  wrote:
> > i may have the wrong impression, but my tinkering on scripty's demo
> > page has been...unimpressive. i'm using Android 2.4 & so far, hardly
> > any of the mobile/touch demos work. In fact, from the touch-demo page:
> >
> > "These demos are optimized for the Starlight browser, iPhone Safari
> > 3+, Desktop Safari 4+ and Firefox 3.5+. Support for IE is incomplete
> > at this time.
> >
> > The scripty2 multitouch support is not final, it's a alpha-stage
> > implementation. This means there's several restrictions and known bugs
> > that prevents it from being used in a production environment."
> >
> > Honestly, i don't think Prototype has been active enough to warrant a
> > mobile version. There are several recent threads that discuss
> > Prototype's current status & future. To my knowledge (which comes
> > mainly from observation of this group), there's not much call for a
> > mobile Prototype. Scripty looks like the best bet, and its development
> > cycle is pretty slow. Which isn't a knock against the people involved.
> > Life is life, right?
> >
> > Hope that informs, as i'm sure it hardly helps. ;)
> > -joe t.
> >
> > On Nov 18, 6:31 pm, Jimmy Brake  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > Does anyone know of a lib that can extend Prototype so it's like sencha
> > > touch, jquery.mobile or has anyone been using scripty in production?
> >
> > > I presently only need to support ipad's. However over time I plan on
> > > supporting all smart phones and tablets.
> >
> > > Thanks,
> >
> > > Jimmy
>
> --
> You received 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: ScrollTo function from menu item to iframe at the bottom of the same page

2011-11-18 Thread Walter Lee Davis

On Nov 18, 2011, at 3:23 PM, greg wrote:

> But, if the iFrame isn't as tall as the page height, you may not get
> the top of the iFrame to the top of the page.  It can't scroll beyond
> the end of the page content.


You could then try this, if you wanted to force the issue:

...inside your click handler

if($(yourIframe).getHeight() < document.viewport.getHeight())
$(yourIframe).setStyle({height: document.viewport.getHeight() + 'px'});

Walter

-- 
You received 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: :nth-child help prototype

2011-11-17 Thread Walter Lee Davis

On Nov 16, 2011, at 4:42 PM, shellster wrote:

> First thing is that you aren't passing the right arguments to
> setStyle.  Second, you should be using the Javascript css attribute
> format, and not the style sheet version.

There's actually two, equally valid, ways to do this. As you have written it, 
with a hash, and passing a string, where you actually do want to use the 
stylesheet format:

ary.invoke.('setStyle','border-right:none');

Walter

>  Finally, I recommend setting
> the border to "none":
> 
> $$(".category-silo ul > li:nth-child(4n+4)").invoke("setStyle",
> {borderRight: 'none'});
> 
> -- 
> You received 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: decisions decisions -- json - ajax - html and dom kungfu

2011-11-15 Thread Jimmy Brake
What you said is mostly true on both accounts. What I like about the
straight json method is I can dump pretty much all the data they would use
over the entire course of the session in just one response probably no more
than  40 k for really large data sets.

On Wed, Nov 9, 2011 at 11:34 AM, Victor  wrote:

> So you plan to receive JSON from server, then convert it to HTML and
> insert into page? HTML fragments are much easier in
> writing/validating/processing.
>
> --
> 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/-/DAxhHxaBOFkJ.
> 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: decisions decisions -- json - ajax - html and dom kungfu

2011-11-15 Thread Jimmy Brake
Good thoughts and suggestions - thanks

I'll see if I can make a 'case' for the extra coding overhead.


   1. a gazillion connections if I have to send html in little pieces all
   the time - i am very very concerned about overloading the servers (total
   80cores - 160gigs of ram - ~500gigSSD - not shared 100meg connection -
   internal network between the nodes is gigabit) --- with the json method -
   we do the initial DB dump - then each selection is sent to the servers
   2. when the session starts I put the entire menu db (max 2100 items -
   average is only about 150 items) as a var in the page
   3. i use that data to draw the menus and the submenus(submenus are
   dynamically shown as a client selects them)
   4. once an item is selected it's displayed in the list of selected items
   -- i also tee that process and send a json packet to the server
   5. we are only supporting ipads

Make sense? -- if not let me know ..






On Fri, Nov 11, 2011 at 4:29 AM, Eric  wrote:

> Hi,
>
> On Nov 9, 8:34 pm, Victor  wrote:
> > So you plan to receive JSON from server, then convert it to HTML and
> insert
> > into page? HTML fragments are much easier in
> writing/validating/processing.
>
> I am not so sure about this.
> It really depends of what you want to do with the result from the
> server.
> If it is text/image and more or less static stuffs, you may return
> HTML fragments, but if you plan to store/use those data for
> computation, JSON return is definitely the best choice.
> Also HTML fragments don't allow to do everything on all browsers
> (things like inserting rows into an existing table or options into an
> existing select tag for example are known to cause issues).
>
> Like Richard said, templates are a good choice here too if your data
> are often formatted in the same way.
>
> Eric
>
> --
> You received 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: newb questions

2011-11-11 Thread Walter Lee Davis

On Nov 11, 2011, at 7:17 AM, Eric wrote:

> Hi Walter,
> 
> On Nov 4, 3:25 pm, Walter Lee Davis  wrote:
>> The Scriptaculous Wiki on Github has examples on the Sortable Serialize 
>> page, IIRC.
>> 
>> What (if any) server-side framework are you using? I can show code for Rails 
>> or my own PHP Rails-lite clone.
> 
> Is it any chance you've posted somewhere some information about this
> PHP Rails-lite clone of yours?
> I don't really need it but I am curious to see what this looks
> like :o)

https://github.com/walterdavis/myactiverecord
https://github.com/walterdavis/generate

Screencast for Generate here: (sorry about the awful compression, nearly 
unreadable in places)
http://freewaycast.com/screencasts/view/85-generate-a-database-application

Walter

> 
> Eric
> 
>> 
>> Walter
>> 
>> On Nov 3, 2011, at 5:30 PM, joelbrave wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Are there any examples I can see for integrating the various effects
>>> with a MySQL database, specifically, re-ordering database rows via
>>> drag and drop?
>> 
>>> - Joel
>> 
>>> --
>>> You received 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 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: decisions decisions -- json - ajax - html and dom kungfu

2011-11-11 Thread Richard Quadling
Also, the use of templates may be a better option, especially if you
are populating pre-defined fragments.

Just supply the data to the template evaluator and insert it into the DOM.

On 9 November 2011 19:34, Victor  wrote:
> So you plan to receive JSON from server, then convert it to HTML and insert
> into page? HTML fragments are much easier in writing/validating/processing.
>
> --
> 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/-/DAxhHxaBOFkJ.
> 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.
>



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

-- 
You received 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: Prototype AJAX call & IE6 - not working

2011-11-08 Thread Phil Petree
LOL i was sitting here with phone in hand, counting the lines and had just
zeroed in on the same line when your answer came in.
On Nov 8, 2011 5:38 PM, "T.J. Crowder"  wrote:

> Hi,
>
> It would have been really helpful if you'd pointed out which line was
> line 37, since things tend to get re-wrapped. :-)
>
> But the problem is here:
>
> > onException: function(response) {
> > alert("Failed" + response.responseText);
> > },
> ---^
>
> That dangling comma at the end of the object literal you're passing
> into Ajax.Request. Most JavaScript engines are fine with it, and it's
> now even officially supported (there was some ambiguity before the
> ECMAScript 5th ed. spec came out a couple of years ago), but older
> versions of IE choke on it. Remove the dangling comma and it should
> stop complaining. There's a similar problem with dangling commas at
> the ends of array literals (e.g., given `var a = [1, 2, 3, ];`, what's
> the length of `a`?).
>
> More:
> http://blog.niftysnippets.org/2010/09/literal-improvement.html
>
> HTH,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> On Nov 8, 8:36 pm, Jessica Smith  wrote:
> > Hi, I'm a total n00b when it comes to AJAX and Prototype.  I do have
> > an example that works in IE7+, FF and Chrome, but not IE6.  I'm
> > getting the following JS error when I include the function in my test
> > page.  I tried including the XMLHttpRequest section thinking that
> > might be part of my problem, but it doesn't make a difference.  Any
> > suggestions are welcome.
> >
> > [error]
> > Line: 37
> > Char: 5
> > Error: Expected identifier, string or number
> > Code: 0
> > [/error]
> >
> > [code]
> > 
> > 
> > f1
> > 
> > if (!window.XMLHttpRequest) {
> >   window.XMLHttpRequest = function() {
> > return new ActiveXObject('Microsoft.XMLHTTP');
> >   }}
> >
> > 
> > 
> > 
> > var cdInterval=0;
> > var cdTime=cdInterval+1;
> >  function changeCart(cartname) {
> >   alert(cartname);
> >   document.getElementById("cartname").innerHTML = cartname;
> >   //setTimeout("ajaxlastcall()",500);
> >  }
> >
> > function ajaxlastcall() {
> > url = "http://devmachineurl/sid.htm?
> > sid=6680&prg=menu&frame=lastcall";
> > new Ajax.Request(url, {
> > onSuccess: function(response) {
> >   var data =
> > response.responseXML.getElementsByTagName( 'LastCallData' );
> >   for( var i = 0; i < data.length; i++ ) {
> >   var interval = data[i].getAttribute( 'interval' ) - 0;
> >   var lastcall = data[i].getAttribute( 'lastcall' );
> >   }
> >   if (interval == 0)
> >   document.getElementById("lct").innerHTML=lastcall;
> >   else startit(interval,lastcall);
> > },
> > onException: function(response) {
> > alert("Failed" + response.responseText);
> > },
> > });
> >
> > }
> >
> > 
> > 
> > 
> > Please select a cart.
> > 
> > 
> > 
> > [/code]
>
> --
> You received 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: troubleshooting scriptalicious/mysql/php...

2011-11-06 Thread Joel B
Well, I finally got it working. Instead of trying to adapt the scripts to my 
database, I adapted my database to work with the scripts by changing some of my 
field names to match the field names in the example database. 

This took me so much longer than I expected, was about to give up when I 
thought of doing that. Leaned a whole bunch about PHP, JavaScript and MySql 
while working on this, so it was worth the frustration.

-Joel

-- 
You received 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: Adding CSS-Rules to a styletag in Prototype

2011-10-28 Thread Richard Quadling
On 28 October 2011 16:37, Richard Quadling  wrote:
> On 20 October 2011 13:30, Luke  wrote:
>> Thanks, Joe T.
>> Walter: The problem is, that on my page the user can add/remove contents and
>> also change the styles of those contents dynamically using JS. Now if you
>> set a Style to certain elements, either via changing the style-tag or adding
>> a class-name and *afterwards* add content, that content won't be styled. Of
>> course, I save the applied style-settings in my backend and so I could apply
>> the style-definitions when I generate the added content, but that maybe that
>> might not be the case anymore in the future and also it's easier to set a
>> style-definition in a style tag, rather than doing the backend-thing.
>
> I've no idea if this will be useful, but just to explain some background.
>
> I have a page which displays about 100 company names in columns
> (rather than in rows). To achieve this, knowing the maximum width of
> the elements was required and then setting the CSS width for that
> style so all were styled correctly.
>
> IE, FF and Chrome supported.
>
> Also, I use a CSS and JS combinator, so I only have 1 JS and CSS file request.
>
> Working on using a single image one also, so 4 loads per page (HTML,
> CSS, JS and IMG). CSS, JS and IMG are cached, so page loading is a LOT
> faster and server load WAY down.
>
> But I digress ...
>
> function sizeElements(o_Container)
>        {
>        console.group('sizeElements(', arguments, ')');
>
>        // Set the size on formInput labels and scrollBox labels
>        // Siblings only.
>        ['.formInput > label', '.scrollBox > label'].each
>                (
>                function(s_CSS)
>                        {
>                        console.group('sizeElements.each(', arguments, ')');
>
>                        // Size the labels to the widest.
>                        var i_LargestLabel = o_Container.select(s_CSS +
> ':not(.nonSpacing):not(.shortNonSpacing)').invoke('getWidth').max();
>
>                        // If there was a size, then update the container's 
> CSS rule.
>                        if ( i_LargestLabel != undefined)
>                                {
>                                var o_CSS = window.document.styleSheets[0];
>                                var o_CSSRules = (o_CSS.cssRules) ? 
> o_CSS.cssRules : o_CSS.rules;
>                                var o_CSSRule =
> o_CSSRules[$A(o_CSSRules).pluck('selectorText').invoke('toLowerCase').indexOf('#'
> + o_Container.id.toLowerCase() + ' ' + s_CSS.toLowerCase())];
>
>                                o_CSSRule.style.width = i_LargestLabel + 'px';
>                                }
>                        console.groupEnd();
>                        }
>                );
>
>        console.groupEnd();
>        }
>
>
> Programmatically, I'm looking to set the width on the CSS rules of
>
> .formInput > label
> and
> .scrollBox > label

The rules exist and I have a width of 50px set already.

It is something that works for me.


-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

-- 
You received 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: Adding CSS-Rules to a styletag in Prototype

2011-10-28 Thread Richard Quadling
On 20 October 2011 13:30, Luke  wrote:
> Thanks, Joe T.
> Walter: The problem is, that on my page the user can add/remove contents and
> also change the styles of those contents dynamically using JS. Now if you
> set a Style to certain elements, either via changing the style-tag or adding
> a class-name and *afterwards* add content, that content won't be styled. Of
> course, I save the applied style-settings in my backend and so I could apply
> the style-definitions when I generate the added content, but that maybe that
> might not be the case anymore in the future and also it's easier to set a
> style-definition in a style tag, rather than doing the backend-thing.

I've no idea if this will be useful, but just to explain some background.

I have a page which displays about 100 company names in columns
(rather than in rows). To achieve this, knowing the maximum width of
the elements was required and then setting the CSS width for that
style so all were styled correctly.

IE, FF and Chrome supported.

Also, I use a CSS and JS combinator, so I only have 1 JS and CSS file request.

Working on using a single image one also, so 4 loads per page (HTML,
CSS, JS and IMG). CSS, JS and IMG are cached, so page loading is a LOT
faster and server load WAY down.

But I digress ...

function sizeElements(o_Container)
{
console.group('sizeElements(', arguments, ')');

// Set the size on formInput labels and scrollBox labels
// Siblings only.
['.formInput > label', '.scrollBox > label'].each
(
function(s_CSS)
{
console.group('sizeElements.each(', arguments, ')');

// Size the labels to the widest.
var i_LargestLabel = o_Container.select(s_CSS +
':not(.nonSpacing):not(.shortNonSpacing)').invoke('getWidth').max();

// If there was a size, then update the container's CSS 
rule.
if ( i_LargestLabel != undefined)
{
var o_CSS = window.document.styleSheets[0];
var o_CSSRules = (o_CSS.cssRules) ? 
o_CSS.cssRules : o_CSS.rules;
var o_CSSRule =
o_CSSRules[$A(o_CSSRules).pluck('selectorText').invoke('toLowerCase').indexOf('#'
+ o_Container.id.toLowerCase() + ' ' + s_CSS.toLowerCase())];

o_CSSRule.style.width = i_LargestLabel + 'px';
}
console.groupEnd();
}
);

console.groupEnd();
}


Programmatically, I'm looking to set the width on the CSS rules of

.formInput > label
and
.scrollBox > label



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

-- 
You received 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: An idea from jQuery which might be borrowed to Prototype

2011-10-28 Thread wwwboy
It’s depend on your mood :)

 

From: prototype-scriptaculous@googlegroups.com 
[mailto:prototype-scriptaculous@googlegroups.com] On Behalf Of Victor
Sent: Thursday, October 27, 2011 11:52 PM
To: prototype-scriptaculous@googlegroups.com
Subject: [Proto-Scripty] Re: An idea from jQuery which might be borrowed to 
Prototype

 

Jon Dow == John Doe? ;) 

-- 
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/-/2jp7KMInIvAJ.
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: Form.Serialize returning nada

2011-10-27 Thread Victor

>
> I used the form name attribute as a way of knowing which AJAX module to 
> call on behalf of that form.  That allows my dofill() to serve many forms. 
>

This can be made via CSS classes, not name attributes.

I've seen very few pages of any type that validates 100%
>

1-2 errors/warnings does not matter. In your example EVERY tag is invalid 
for XHTML document.

and browsers accomodate this and that's one reason why there are soo many 
> differences in how browsers act on a given page.
>

When document is [almost] valid (possibly with few errors/warnings), then 
there are actually very small differences between browsers.

we were able to narrow it down to a problem we could duplicate and once 
> duplicated it was easy to find (but harder to fix).
>

Show minimal example, please. It is very interesting.
 

> Like I said though, the key is not just in changing the doctype but you 
> also have to force compatibility mode.  This, to me, is a greater issue as 
> it indicates a bug somewhere in either IE9 or prototype... but regardless 
> of where it is, it causes prototype to fail.
>

Have you tried the latest Prototype 1.7? 

-- 
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/-/3kG2evEY2J0J.
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: Form.Serialize returning nada

2011-10-27 Thread Phil Petree
obsolete attributes "should" be ignored.  I used the form name attribute as
a way of knowing which AJAX module to call on behalf of that form.  That
allows my dofill() to serve many forms.

I've seen very few pages of any type that validates 100% and browsers
accomodate this and that's one reason why there are soo many differences in
how browsers act on a given page.

In this case, it was working then we started getting complaints but they
were intermittent and finally we were able to narrow it down to a problem we
could duplicate and once duplicated it was easy to find (but harder to fix).

By changing the doctype, none of our pages will validate at this point but
that's another issue that we'll fix in the next major release.

When I posted the original question we had no idea why form.serialize was
failing and still dont think it should fail even if there was a $nbsp;
somewhere in the field. form.serialize should process each field and if data
is present, serialize it and if not skip it.  A div or field with a space
should not matter.

Like I said though, the key is not just in changing the doctype but you also
have to force compatibility mode.  This, to me, is a greater issue as
it indicates a bug somewhere in either IE9 or prototype... but regardless of
where it is, it causes prototype to fail.

On Thu, Oct 27, 2011 at 10:57 AM, Victor  wrote:

> Problem is somehow related to XHTML and IE9.
>
> If you occasionally serve document as xhtml+xml, document should pass
> validation to work in browser. I've noticed  in your
> example, but *name* attribute is obsolete for *form* tag in XHTML1.0, or
> maybe you have * * somewhere in your markup.
>
> You can invoke $('myform').serialize() in debugger console at any time -
> this may reveal some clues.
>
>  --
> 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/-/Kp0Uc3wWl2cJ.
>
> 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: Form.Serialize returning nada

2011-10-27 Thread Victor
Problem is somehow related to XHTML and IE9.

If you occasionally serve document as xhtml+xml, document should pass 
validation to work in browser. I've noticed  in your 
example, but *name* attribute is obsolete for *form* tag in XHTML1.0, or 
maybe you have * * somewhere in your markup.

You can invoke $('myform').serialize() in debugger console at any time - 
this may reveal some clues.

-- 
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/-/Kp0Uc3wWl2cJ.
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: Rant - IE7 Sucks

2011-10-26 Thread Marty Amberg
maybe I  been doing this too long, i think standard ie9.  But up on the 
top right is a gear which opens developer tools or f12 and once in you 
can change the the mode of the browser mode or document mode on the top 
bar.  Most of my issues have always been the cache on  ie7 and ie8 too. 
   I think explorer now has a decent set of tools.




On 10/25/2011 8:21 PM, kstubs wrote:
IE9 has a built-in option for running IE7 script or is this a 
developer add-on? --
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/-/JrRA-XLfi2oJ.
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: Rant - IE7 Sucks

2011-10-25 Thread kstubs
IE9 has a built-in option for running IE7 script or is this a developer 
add-on?

-- 
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/-/JrRA-XLfi2oJ.
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: Rant - IE7 Sucks

2011-10-25 Thread Marty Amberg
Perhaps you did this already but I  have found it useful if you can, and 
you need to run w7, to use the debugger on ie9,set it to ie7 mode and 
see what happens.  I have had lots of things not run smoothly on w7 and 
work fine otherwise.


good luck

On 10/25/2011 1:10 PM, kstubs wrote:
I may have to repost, but I'll state what I think the issue may be 
here first.


OK, so IE7.  I have a class and I mixin an object called SimpleForms. 
 These methods are not available in the intialize method for the 
class. So,


var myClass = Class.create(SimpleForms, {
initialize: function() {
  this.SimpleForms_Method('xyz');'
}
});

Code errors on the call to: this.SimpleForms_Method in IE7 only.  Is 
this an IE7 issue?  Is this a Prototype bug, or know IE7 limitation?


Karl..
--
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/-/S5KKB4GZzbYJ.
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: Form.Serialize returning nada

2011-10-25 Thread Phil Petree
Colin, thanks for taking the time to look.  Yes, the form has some hidden
fields with data (user must be logged in to access this particular form).

I found the problem...  fixed it about 8 minutes ago, had to update the
entire site!

The problem only surfaces under IE9.  If you click into compatibility mode
the problem goes away.

Our doctype WAS defined as:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>
And the serialize failed.

I changed several things:
The doctype now reads:
http://www.w3.org/TR/html4/loose.dtd";>

Which in and of itself did NOT fix the problem.

So I forced compatibility mode using:


This solved the problem.

Backing back out to the original doctype with the forced compatibility mode
and the problem resurfaced.

Maybe someone a whole lot smarter than me will be able to figure out a real
solution for someone else! LOL






On Tue, Oct 25, 2011 at 9:18 AM, ColinFine  wrote:

> Your 'serialize()' is called when you _define_ dofill. Has the form
> got any contents at that point?
>
> --
> You received 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: Future of Prototyp.js

2011-10-23 Thread wwwboy
Hi T.J.

With the speed of which modern browsers release updates and move toward HTML5 - 
I think there will be no significant differences between them in a year.
IE8 will not be alive in a year in the light of Windows8 with IE10 and 
canceling support XP - so there will be IE9 and IE10 which a close to other 
browsers.
An optional ability to build library without of support of old browsers will be 
the big advance for most developers - small size, fast execution!
At least there might be two versions of the library - for supporting old 
browsers - 1.7 and for modern - 2.0 :)

-Original Message-
From: prototype-scriptaculous@googlegroups.com 
[mailto:prototype-scriptaculous@googlegroups.com] On Behalf Of T.J. Crowder
Sent: Sunday, October 23, 2011 1:13 PM
To: Prototype & script.aculo.us
Subject: [Proto-Scripty] Re: Future of Prototyp.js

On Oct 23, 6:01 am, buda  wrote:
> IE6 is already innonexistence.

Whether IE6 remains relevant depends a great deal on where you look and whom 
you're targeting. If you look at the figures on http://ie6countdown.com, you 
see that if you're targeting east asia, you'd be an idiot not to support IE6. 
Similarly, that 2.2% in the UK is a misleading figure, because although small 
in itself, it consists of very large government departments -- so if your 
site/application is targeted at those departments, you're still stuck with IE6 
support. You get the idea. :-)

> The rapid development of browser features they caught up and there are 
> fewer and fewer differences between them. A year later, they 
> practically do not remain.

Where are you getting that information? There still remain significant and 
problematic differences between browsers from different vendors.
Heck, IE8 (nearly 30% of the desktop market[1]) and below don't even support 
`addEventListener`, making Prototype's handling of that difference very 
important indeed. Yes, in a year I'd expect IE9 to be much higher on that list 
than it is currently because even Microsoft users are getting the idea of 
updating more often, but I suspect IE8 will still be above it.

Separately, I think the premise that most of Prototype is about working around 
outdated browser differences is (respectfully) incorrect. Most of Prototype is 
around adding useful utility functionality. Some of it is about smoothing out 
differences (such as how opacity is specified in various browsers), but mostly 
it's about simplifying and expanding on what's common across browsers (for 
instance, the DOM navigation stuff).

My two cents. :-)

[1] 
http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2&qpcustomd=0
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / 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.


-- 
You received 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: Adding CSS-Rules to a styletag in Prototype

2011-10-20 Thread Luke
Thanks, Joe T.

Walter: The problem is, that on my page the user can add/remove contents and 
also change the styles of those contents dynamically using JS. Now if you 
set a Style to certain elements, either via changing the style-tag or adding 
a class-name and *afterwards* add content, that content won't be styled. Of 
course, I save the applied style-settings in my backend and so I could apply 
the style-definitions when I generate the added content, but that maybe that 
might not be the case anymore in the future and also it's easier to set a 
style-definition in a style tag, rather than doing the backend-thing.

-- 
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/-/jwbn35nC444J.
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: Why created object is not extended with Object methods?

2011-10-18 Thread wwwboy
thanks for the explanation!

-Original Message-
From: prototype-scriptaculous@googlegroups.com
[mailto:prototype-scriptaculous@googlegroups.com] On Behalf Of T.J. Crowder
Sent: Tuesday, October 18, 2011 6:52 PM
To: Prototype & script.aculo.us
Subject: [Proto-Scripty] Re: Why created object is not extended with Object
methods?

On Oct 18, 3:08 pm, buda  wrote:
> T.J. what the reasons not to make them Object.prtototype methods?

If you add something to `Object.prototype`, it shows up on *every* object.
So for instance:

Object.prototype.foo = function() {
return "bar";
};
var a = {};
console.log(typeof a.foo);
// -> "function"
for (var name in a) {
console.log(name);
}
// -> "foo"

To put it mildly, this causes a problem because people expect a blank object
to be, um, blank. And in fact, you see people repeatedly running into
problems with Prototype's additions to `Array.prototype` because they're
using `for..in` incorrectly[1][2]. Compare the output of this page:
http://jsbin.com/ajiyal
with this one:
http://jsbin.com/ajiyal/2

The code is identical in the two pages, it's just that the second one
includes Prototype and the first one doesn't. Since Prototype adds a bunch
of `Array.prototype` properties, they show up on that naive
(broken) `for..in` loop.

As of ECMAScript5 it's possible to put properties on `Object.prototype` (and
`Array.prototype`) that *won't* break naive `for..in` loops by using
`Object.defineProperty` and setting `enumerable` to `false`, but there's
still the problem that people expect a blank object to be blank. And so if
(for instance) you put a `keys` property on `Object.prototype` that refers
to a function that returns the object's keys, but I have code where I use a
`keys` property on an object to mean something else entirely (very likely,
and in fact I *have* done it), there's a problem. For that reason, the list
of properties defined for `Object.prototype` in the spec[3] is very short
and likely to stay that way, in favor of properties defined on `Object` that
you pass an instance into (like `Object.keys`).

[1] http://blog.niftysnippets.org/2010/11/myths-and-realities-of-forin.html
[2] http://api.prototypejs.org/language/Array/
[3] http://es5.github.com/#x15.2.4

HTH,
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / 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.


-- 
You received 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: Adding CSS-Rules to a styletag in Prototype

2011-10-18 Thread Walter Lee Davis
On Oct 17, 2011, at 9:40 PM, joe t. wrote:

> i don't think Prototype has a method for directly editing a STYLE tag
> (only for modifying styles on element[s].
> 
> But
> http://stackoverflow.com/questions/524696/how-to-create-a-style-tag-with-javascript
> seems to offer a couple cross-browser approaches by examining feature
> support to determine which way to append style rules to the interior
> of a STYLE tag.
> 
> i haven't tested, but as they say, seems legit.
> -joe t.
> 
> 
> On Oct 17, 11:55 am, Luke  wrote:
>> Hi there,
>> 
>> I wanna add CSS-Definitions to a 

Re: [Proto-Scripty] Re: err fred.loginfo is not function.

2011-10-17 Thread yossi levi
*Thanks allot.
You help me *

On Mon, Oct 17, 2011 at 9:33 AM, T.J. Crowder wrote:

> Hi,
>
> You haven't given your `player` object a method called `loginfo` at
> all, which is why you're getting that error (the property
> `fred.loginfo` will come back `undefined`, which naturally fails when
> you try to execute it via `()`). Also, you have a typo where you're
> creating your `promote` function, it's a `promte` instead, so if you
> got past the `loginfo` call you'd run into the same problem with
> `promote`. And note that in your test code at the end, you create
> `bob` and `alice` instances but you continue to call the methods on
> the `fred` instance.
>
> You said you're a new programmer. One thing to take away from this is
> that computers are incredibly picky about small details. :-)
>
> FYI, if a function is a constructor function (intended to be used with
> `new`, like your `player` function), the convention is to use initial
> caps on the name, e.g. `Player` with a capital `P`. Other functions
> are written in camelCase. This helps differentiate functions that
> aren't constructor functions from ones that are. It's only a
> convention, but it's very widely-used.
>
> If you're new to JavaScript, I did a series of blog posts/articles on
> the language you may find helpful (or not, of course). If you start
> here[1] and then work your way forward through the posts
> chronologically, it may be helpful.
>
> [1]
> http://blog.niftysnippets.org/2008/02/javascripts-curiously-powerful-or.html
>
> HTH,
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> On Oct 16, 6:55 pm, Yossi  wrote:
> > HI,
> > I am new programmer.
> > I looking to work with OOP in javascript.
> > I heard about prototypejs, and I try to run my first CODE in
> > firefox7.0.1
> > And Prototype JavaScript framework, version 1.7 .
> >
> > The err that I got is "fred.loginfo is not function"
> >
> > below the code:
> > 
> > 
> > 
> >   
> >    > script>
> >   
> >   
> >   
> >