Re: [Proto-Scripty] Your favourite rich text editor?

2015-04-23 Thread Phil Petree
I'm sooo old... I use pspad (and have for 10 years)... it's way more
advanced than edlin (joke).

I really need to update to a modern editor with php on my laptop so I'd be
curious as to how everyone has their systems configured.

On Thu, Apr 23, 2015 at 11:00 AM, Alastair Young alastair.yo...@gmail.com
wrote:

 Anyone suggest their favourite rich text editor that sits nicely with
 prototype ?

 ta muchly

 --
 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/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 http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.


Re: [Proto-Scripty] Show of hands

2014-01-03 Thread Phil Petree
Ive not done any new work since http://www.presspeek.com but im still using
prototype.
On Jan 3, 2014 9:01 AM, Walter Lee Davis wa...@wdstudio.com wrote:

 It's been mighty quiet here, and I'm wondering if everyone just knows how
 to use Prototype, and doesn't have any questions, or if you've all defected
 to the Dark Side.

 Happy New Year,

 Walter

 --
 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] Newbie - trying out prototype .js Ajax.request - getting status=0 responseText=

2013-11-24 Thread Phil Petree
Php on the back end? What headers are you sending back?
On Nov 24, 2013 7:53 AM, blumus leiman.bar...@gmail.com wrote:

 Hi:

 I'm a newbie to html, js and protype.js. I've written a small script to
 try out Ajax.request.

 $(sendFormSimple)
 .observe(
 submit,
 function(e) {
 e.stop();
 log(Send Http Button Pressed
 \n);
 new Ajax.Request(
 '
 http://127.0.0.1:8000/test',
 {
 method : 'get',

 contentType:'application/xml',
 onSuccess :
 function(
 transport)
 {
 var response =
 transport.responseText
 || no
 response text;
 log(Success! 
 +
 response
 +
 \n);
 },
 onFailure :
 function() {
 log(Something
 went wrong...\n);
 }
 });
 });
 
 br
 form id=sendFormSimple
 input type=submit value=Send Http
 /form
  br

 When the button to http is pressed a request goes out but it *does not *come
 back to the js code. The request/response  is seen/successful  from
 1) the server logs
 2) wireshark
 3) when accessing http://127.0.0.1:8000/test from the browser
 (firefoxchrome)

 Here is the response from wireshark

 HTTP/1.1 200 OK
 Content-type: application/xml
 Content-length: 276
 Access-control-allow-origin: *
 Date: Sun, 24 Nov 2013 05:46:49 GMT
 Access-control-allow-methods: GET
 ?xml version=1.0 encoding=utf-8 ?ajax-responseresponse
 type=object
 id=productDetailsmonthly-salesemployee-salesemployee-id1234/employee-idyear-month1998-01/year-monthsales$8,115.36/sales/employee-sales/monthly-sales/response/ajax-response

 Based on other posts
 * added Access-control-allow-origin: * to header
 * running from apache server instead of file system
 Still the response is not received

 Any help would be appreciated. Thanks

 BTW - here is the debugger output
 transport
 klass { request=klass, transport=XMLHttpRequest, readyState=4, more...}
 headerJSON
 null
 readyState
 4
 request
 klass { options={...}, transport=XMLHttpRequest, url=
 http://127.0.0.1:8000/test;, more...}
 responseJSON
 null
 responseText
 
 responseXML
 null
 status
 0
 statusText
 
 transport
 XMLHttpRequest { readyState=4, timeout=0, withCredentials=false, more...}
 _getHeaderJSON
 function()
 _getResponseJSON
 function()
 getAllHeaders
 function()
 getAllResponseHeaders
 function()
 getHeader
 function()
 getResponseHeader
 function()
 getStatus
 function()
 getStatusText
 function()
 initialize
 function()
 __proto__
 klass { status=0, initialize=function(), statusText=, more...}
 toString
 function()


  --
 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] Newbie - trying out prototype .js Ajax.request - getting status=0 responseText=

2013-11-24 Thread Phil Petree
Let me fire up my laptop and look at some code I have... I'm returning xml
and it seems there was something I had to do differently but I don't recall
what (or if) it was...
On Nov 24, 2013 9:00 AM, blumus leiman.bar...@gmail.com wrote:

 Using Java

 *Here is the header code from Java*

 public void handle(HttpExchange t) throws IOException {
 System.out.println(Received Request
 from+t.getRemoteAddress().getHostString());



  // set headers



 *Headers headers = t.getResponseHeaders();
 headers.set(Access-Control-Allow-Origin, *);
 headers.set(Access-Control-Allow-Methods, GET);
 headers.set(Content-Type, application/xml);*


 String response = RESPONSE;
 *t.sendResponseHeaders(200, response.length());*

 *Here are the headers  from wireshark*
 HTTP/1.1 200 OK
 Content-type: application/xml
 Content-length: 276
 Access-control-allow-origin: *
 Date: Sun, 24 Nov 2013 05:46:49 GMT
 Access-control-allow-methods: GET
 ?xml version=1.0 encoding=utf-8 ?ajax-responseresponse
 type=object id=productDetailsmonthly-
 salesemployee-salesemployee-id1234/employee-id
 year-month1998-01/year-monthsales$8,115.36/sales
 /employee-sales/monthly-sales/response/ajax-response

 Thanks blumus
 On Sunday, November 24, 2013 3:43:21 PM UTC+2, ppetree wrote:

 Php on the back end? What headers are you sending back?
 On Nov 24, 2013 7:53 AM, blumus leiman...@gmail.com wrote:

 Hi:

 I'm a newbie to html, js and protype.js. I've written a small script to
 try out Ajax.request.

 $(sendFormSimple)
 .observe(
 submit,
 function(e) {
 e.stop();
 log(Send Http Button
 Pressed \n);
 new Ajax.Request(
 '
 http://127.0.0.1:8000/testhttp://www.google.com/url?q=http%3A%2F%2F127.0.0.1%3A8000%2Ftestsa=Dsntz=1usg=AFQjCNFMhun0Vydf4ufBpg2WRRnyvrvj_w
 ',
 {
 method : 'get',

 contentType:'application/xml',
 onSuccess :
 function(

 transport) {
 var response
 = transport.responseText
 ||
 no response text;

 log(Success! 
 +
 response
 +
 \n);
 },
 onFailure :
 function() {

 log(Something went wrong...\n);
 }
 });
 });
 
 br
 form id=sendFormSimple
 input type=submit value=Send Http
 /form
  br

 When the button to http is pressed a request goes out but it *does not *come
 back to the js code. The request/response  is seen/successful  from
 1) the server logs
 2) wireshark
 3) when accessing 
 http://127.0.0.1:8000/testhttp://www.google.com/url?q=http%3A%2F%2F127.0.0.1%3A8000%2Ftestsa=Dsntz=1usg=AFQjCNFMhun0Vydf4ufBpg2WRRnyvrvj_wfrom
  the browser  (firefoxchrome)

 Here is the response from wireshark

 HTTP/1.1 200 OK
 Content-type: application/xml
 Content-length: 276
 Access-control-allow-origin: *
 Date: Sun, 24 Nov 2013 05:46:49 GMT
 Access-control-allow-methods: GET
 ?xml version=1.0 encoding=utf-8 ?ajax-responseresponse
 type=object id=productDetailsmonthly-salesemployee-sales
 employee-id1234/employee-idyear-month1998-01/year-
 monthsales$8,115.36/sales/employee-sales/monthly-
 sales/response/ajax-response

 Based on other posts
 * added Access-control-allow-origin: * to header
 * running from apache server instead of file system
 Still the response is not received

 Any help would be appreciated. Thanks

 BTW - here is the debugger output
 transport
 klass { request=klass, transport=XMLHttpRequest, readyState=4, more...}
 headerJSON
 null
 readyState
 4
 request
 klass { options={...}, transport=XMLHttpRequest, url=
 http://127.0.0.1:8000/test;, more...}
 responseJSON
 null
 responseText
 
 responseXML
 null
 status
 0
 statusText
 
 transport
 XMLHttpRequest { readyState=4, timeout=0, withCredentials=false, more...
 }
 _getHeaderJSON
 function()
 _getResponseJSON
 function()
 getAllHeaders
 function()
 getAllResponseHeaders
 function()
 getHeader
 function()
 getResponseHeader
 function()
 getStatus
 function()
 getStatusText
 function()
 initialize
 function()
 __proto__
 klass { status=0, initialize=function(), statusText=, more...}
 toString
 function()


  --

  --
 You received this message because 

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

2013-07-17 Thread Phil Petree
I will add this... updating prototype, in my experience, has minimal side
affects and most of those are actually positive.
On Jul 17, 2013 6:22 PM, Joseph Lust lifeofl...@gmail.com wrote:

 Wow. I wonder why it just this minute came up for moderation? That's
 Google Groups for you...


 Just ran into the problem, so posted my solution.

 Is there a specific reason you are using such an old (years!) version of
 Prototype? 1.7.1 is current, and even it is getting a little long in the
 tooth


 Someone decided in 2007 in that 1.5.1 was a good version. App was built in
 2010. No one wanted to do a full regression to test a newer version since.
 Why are other conflicting libs loaded? Someone wiser than I thought it wise
 to have Prototype, JQuery, and DOMAssistant in the same page. In this case,
 it is causing issues, but sadly there are dependencies on all three
 throughout a very large code base.

 Are you trying to get an array of classnames from an element, or are you
 trying to remove a class from an element? Because there's the
 Element#removeClassName if the latter. It does pretty much what you do
 here, except it returns an extended element, not an array of strings. You
 could get the former with this:
 $(this).**removeClassName(**classNameToRemove).className.**
 toString().split(/\s+/);


 Because the internal *includes()* method is corrupted via DOMAssistant's
 overwriting of the *each()* method, the built in methods for *
 removeClassName*()* *break. Because I cannot change the libs in use (I
 really would like to), I created an alternative remove method that does not
 use *each*() and implemented it in this case. Not pretty,  but it works.

 --
 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] Prototype Documentation

2013-06-28 Thread Phil Petree
What question do you have (notice how I'm creating work for others? )?
On Jun 28, 2013 10:44 AM, Jason Westbrook jwestbr...@gmail.com wrote:

 Hi Marco

 There is nothing official other than those 2 pages - however there are
 plenty of examples that the community has written all over Stack Overflow

 http://stackoverflow.com/questions/tagged/prototypejs



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


 On Mon, Jun 24, 2013 at 6:48 AM, marco del corto ma...@delcorto.itwrote:

 Does exists further documentation , in addition to that present in
 http://prototypejs.org/ and http://api.prototypejs.org/ ?
 Would help especially examples of use of the code
 thanks

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




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




[Proto-Scripty] Uhh... is this a bug?

2013-06-09 Thread Phil Petree
show()/hide()

Set the style inline with style=display:none and show/hide works but set
the style in css and all of a sudden it doesn't work.

http://jsfiddle.net/ppetree/pA5eN/

-- 
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] Uhh... is this a bug?

2013-06-09 Thread Phil Petree
This just seems really, really odd... THATS where they decide to draw the
line? LOL

Finally working on that context sensitive help system, will post it later
today.
On Jun 9, 2013 12:56 PM, Walter Lee Davis wa...@wdstudio.com wrote:


 On Jun 9, 2013, at 12:43 PM, Phil Petree wrote:

  show()/hide()
 
  Set the style inline with style=display:none and show/hide works but
 set the style in css and all of a sudden it doesn't work.
 
  http://jsfiddle.net/ppetree/pA5eN/
 

 This is long-standing well-documented behavior. One way to make it less
 icky from an HTML standpoint is to use a class-based visibility flag:

 .hide { display:none }

 div id=foo class=hideHidden/div

 $('foo').removeClassName('hide'); // = $('foo').show();

 The other way to handle this is to hide the elements you want to hide in a
 callback invoked at page load, but this can lead to a Flash of Unhidden
 Content on largish pages.

 $$('#foo, #bar, #baz, .initially-hidden').invoke('hide');

 The other thing to think about here is whether hiding these things at page
 load is good or bad for your unscripted visitors (both of them).

 Walter


 --
 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] Uhh... is this a bug?

2013-06-09 Thread Phil Petree
That's when you add a flag that when true includes CSS... I mean if the
whole point of using a framework is for simplicity that would surely cover
it.
On Jun 9, 2013 1:07 PM, Walter Lee Davis wa...@wdstudio.com wrote:


 On Jun 9, 2013, at 12:59 PM, Phil Petree wrote:

  This just seems really, really odd... THATS where they decide to draw
 the line? LOL

 I believe this architectural decision was made at a time in history when
 introspecting the CSS cascade to discover if an element was actually
 visible at the moment was really slow in JavaScript, or really complex from
 a cross-browser perspective.

 There is also the legacy of Rails' RJS system to consider here. (I've been
 on this list long enough to remember when it was called
 rubyonrails-spinoffs or something like that.) A lot of the core assumptions
 of this library have their basis in how Rails 1.x decided Web2.0 should
 look and behave.

 I don't know the exact source of this decision, but I have had it cited as
 gospel to me in the past. Just kicking that can down the road...

 Walter

 --
 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] Help system

2013-06-09 Thread Phil Petree
Here's what I've come up with on the context sensitive help system (thanks
to a few tips from Walter). I'm not crazy about the idea of having to
include the hidden modalWindow on each page that uses the help but I found
it much simpler than doing it all inline (maybe that's just my lacko skill
set showing g):

sample html:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=content-type content=text/html; charset=windows-1250
titleContext Sensitive Help/title
script type=text/javascript src=//
ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js/script
script type='text/JavaScript' src='help.js'/script
link rel='stylesheet' type='text/css' href='help.css' /
/head
body
  !-- this div is used by the context help system --
  div id=modalWindow class=modalHelpWindow style=display:none;
div class='help_title'Helpdiv class='help_close'/div/div
div id='help' class='help_content'/div
  /div
  div class='content'
form
  label for='name'Name:div class=help id=name/div/label
  input type='text' name='name' /br
  label for='occupation'Occupation:/label
  input type='text' name='occupation'/div class=help
id=occupation/divbr
  label for='sex'Sex:div class=help id=sex/div/label
  input type='radio' name='sex' value='female' /
Femalenbsp;nbsp;input type='radio' name='sex' value='male' / Male
/form
  /div
/body
/html
help.css:
/* CSS Document */
div.modalHelpWindow
{
 position: absolute;
 top: 50%;
 left: 50%;
 width:400px;
 height:250px;
 padding-top: 0px;
 margin-top: -125px;   /*set to a negative number 1/2 of your height*/
 margin-left: -200px; /*set to a negative number 1/2 of your width*/
 border: 4px solid green;
 background-color: #ff;
  z-index: 100;
}
.help_title
{
  /* help system title bar */
  float: left;
  top: 0px;
 width:400px;   /* same width as the help popup */
 height:25px;   /* this plus height of help_content = height of popup */
  background: lightgray;
  Padding: 5px;
  overflow: hidden;
}
.help_close
{
  /* the 'x' to close the help dialog */
  position: absolute;
  height: 16px;   /* has to have a height/width or it won't display */
  width: 16px;
  margin-left: 345px; /* how far from left to position the 'x' */
  background: url(images/delete_16x16.png) top no-repeat;
}
.help_content
{
 width:400px;
 height:225px;
  overflow:auto;
  background:#fff;
}
.help
{
  display: inline;
  height: 16px;
  width: 16px;
  margin-left: 3px;
  padding-right: 20px;
  background: url(images/help_16x16.png) left no-repeat;
}
help.js:
// JavaScript for context help system
document.on('click', '.help', function(evt, elm){
  new Ajax.Updater('help', 'server/help.php', {
method: 'post',
parameters: {id: elm.id},
onSuccess: function(){
  openHelpWindow();
}
  });
});
document.on('click', '.help_close', function(evt, elm){
  evt.stop();
  closeHelpWindow()
});
// I implemented these as functions
// for easy customization
function openHelpWindow()
{
  $('modalWindow').show();
}
// close the modal window
function closeHelpWindow()
{
  $('modalWindow').hide();
}
server/help.php:
?php
echo centerh3User requested help on:/h3h1 .$_POST['id']
./h1/center;
?
The MySQL table I implemented:
CREATE TABLE IF NOT EXISTS `help` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `language` char(2) CHARACTER SET ascii NOT NULL COMMENT 'language of this
record',
  `help_topic` char(20) CHARACTER SET ascii NOT NULL COMMENT 'help topic',
  `help_content` text CHARACTER SET ascii NOT NULL COMMENT 'help content',
  PRIMARY KEY (`id`),
  FULLTEXT KEY `help_system` (`help_topic`, `help_content`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='context help table'
AUTO_INCREMENT=1;
INSERT INTO `help` (`id`, `language`, `help_topic`, `help_content`) VALUES
(1, 'EN', 'name', 'Help about the name field goes here...');

-- 
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] Help system

2013-06-09 Thread Phil Petree
Inserting has it's merits in that the centering method I used will not work
if you have scrolled way down via the scroll bars so inserting the
modalWindow will keep the help popup near the element from which the help
was invoked... on the flip side, I've had issues with inserting new
elements and inherited CSS as attributes not explicitly set are inherited
from the parent.

On Sun, Jun 9, 2013 at 3:05 PM, Monty Munro monty.mu...@gmail.com wrote:

  To get around the idea of having the embedded modalWindow in your html,
 you could build it and inject it on dom:loaded

 document.observe('dom:loaded', function () {
   var helpShell = String()
 +  div class='help_title'Helpdiv class='help_close'/div/div
 +  div id='help' class='help_content'/div;

   var mhw  = new Element( 'div', { id : 'modalWindow', 'class' :
 'modalHelpWindow', style : 'display:none;' }).insert(helpShell);

   $(document.body).insert( mhw);
 });

 might want to inline all of the css on the shell div parts.


 On 6/9/2013 2:03 PM, Phil Petree wrote:

 Here's what I've come up with on the context sensitive help system (thanks
 to a few tips from Walter). I'm not crazy about the idea of having to
 include the hidden modalWindow on each page that uses the help but I found
 it much simpler than doing it all inline (maybe that's just my lacko skill
 set showing g):

 sample html:
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 html
 head
 meta http-equiv=content-type content=text/html; charset=windows-1250
 titleContext Sensitive Help/title
 script type=text/javascript src=//
 ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js/script
 script type='text/JavaScript' src='help.js'/script
 link rel='stylesheet' type='text/css' href='help.css' /
 /head
 body
   !-- this div is used by the context help system --
   div id=modalWindow class=modalHelpWindow style=display:none;
 div class='help_title'Helpdiv class='help_close'/div/div
 div id='help' class='help_content'/div
   /div
   div class='content'
 form
   label for='name'Name:div class=help id=name/div/label
   input type='text' name='name' /br
   label for='occupation'Occupation:/label
   input type='text' name='occupation'/div class=help
 id=occupation/divbr
   label for='sex'Sex:div class=help id=sex/div/label
   input type='radio' name='sex' value='female' /
 Femalenbsp;nbsp;input type='radio' name='sex' value='male' / Male
 /form
   /div
 /body
 /html
  help.css:
 /* CSS Document */
 div.modalHelpWindow
 {
  position: absolute;
  top: 50%;
  left: 50%;
  width:400px;
  height:250px;
  padding-top: 0px;
  margin-top: -125px;   /*set to a negative number 1/2 of your height*/
  margin-left: -200px; /*set to a negative number 1/2 of your width*/
  border: 4px solid green;
  background-color: #ff;
   z-index: 100;
 }
 .help_title
 {
   /* help system title bar */
   float: left;
   top: 0px;
  width:400px;   /* same width as the help popup */
  height:25px;   /* this plus height of help_content = height of popup
 */
   background: lightgray;
   Padding: 5px;
   overflow: hidden;
 }
 .help_close
 {
   /* the 'x' to close the help dialog */
   position: absolute;
   height: 16px;   /* has to have a height/width or it won't display */
   width: 16px;
   margin-left: 345px; /* how far from left to position the 'x' */
   background: url(images/delete_16x16.png) top no-repeat;
 }
 .help_content
 {
  width:400px;
  height:225px;
   overflow:auto;
   background:#fff;
 }
 .help
 {
   display: inline;
   height: 16px;
   width: 16px;
   margin-left: 3px;
   padding-right: 20px;
   background: url(images/help_16x16.png) left no-repeat;
 }
  help.js:
 // JavaScript for context help system
 document.on('click', '.help', function(evt, elm){
   new Ajax.Updater('help', 'server/help.php', {
 method: 'post',
 parameters: {id: elm.id},
 onSuccess: function(){
   openHelpWindow();
 }
   });
 });
 document.on('click', '.help_close', function(evt, elm){
   evt.stop();
   closeHelpWindow()
 });
 // I implemented these as functions
 // for easy customization
 function openHelpWindow()
 {
   $('modalWindow').show();
 }
 // close the modal window
 function closeHelpWindow()
 {
   $('modalWindow').hide();
 }
  server/help.php:
 ?php
 echo centerh3User requested help on:/h3h1 .$_POST['id']
 ./h1/center;
 ?
  The MySQL table I implemented:
 CREATE TABLE IF NOT EXISTS `help` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `language` char(2) CHARACTER SET ascii NOT NULL COMMENT 'language of
 this record',
   `help_topic` char(20) CHARACTER SET ascii NOT NULL COMMENT 'help topic',
   `help_content` text CHARACTER SET ascii NOT NULL COMMENT 'help content',
   PRIMARY KEY (`id`),
   FULLTEXT KEY `help_system` (`help_topic`, `help_content`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='context help table'
 AUTO_INCREMENT=1;
 INSERT INTO `help` (`id`, `language`, `help_topic`, `help_content`) VALUES
 (1, 'EN

Re: [Proto-Scripty] Help system

2013-05-31 Thread Phil Petree
My reason for using ajax is three fold:

   1. To do a real context sensitive help system would require more help
   text than would be feasible to integrate for each control, dictionary
   definition or decision point on each page.
   2. By including just the div we minimize the number of bytes
   transferred thereby reducing bandwidth requirements and improve page load
   times. Why transfer data on help points when those may never be accessed or
   accessed only once?
   3. The help system could include short videos (we're using camstudio to
   capture desktop mouse moves and voice over).


On Thu, May 30, 2013 at 7:05 PM, Jason Westbrook jwestbr...@gmail.comwrote:


 If you want to use tooltips or popovers you could use the PrototypeJS
 Twitter BootStrap tooltips or popovers

 https://github.com/jwestbrook/bootstrap-prototype




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


 On Thu, May 30, 2013 at 3:28 PM, Walter Lee Davis wa...@wdstudio.comwrote:


 I think you could make the whole thing pretty simply. Rather than
 creating a separate handler (with each()) for each .help element, you could
 wrap the entire thing in one on handler, which you would not need to
 customize per page or worry about dom:loaded or anything:

 document.on('click', '.help', function(evt, elm){
   var tip = elm.down('div');
   new Ajax.Updater(tip, 'path/to/help', {
 parameters: {id: elm.id},
 onCreate: function(){
   tip.addClassName('loading');
 },
 onSuccess: function(){
   tip.removeClassName('loading');
   tip.addClassName('tooltip');
 }
   });
 });

 document.on('click', '.tooltip', function(evt, elm){
   evt.stop();
   elm.update().removeClassName('tooltip');
 });

 That's expecting a structure like this:

 div class=help id=widget_1div/div/div

 You could use some other construction if you like, but that would do the
 trick. The rest will be creating the CSS for the tooltip, and the Web
 service to fill it in.

 If you didn't want to get the Ajax thing going, you could also just put
 the tooltip in the help element itself, maybe in a data-attribute. That
 depends on how much content there would be. It would be completely
 instantaneous.

 Walter


 On May 30, 2013, at 2:24 PM, Phil Petree wrote:

  I'll play around with it on Sunday and see what I can cobble
 together... of course it looks like you did most of the work in 5 minutes
 and I'll spend most of the day playing around with it! LOL


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





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




[Proto-Scripty] Help system

2013-05-30 Thread Phil Petree
Has anyone developed an inline help system?  Am I barking up the wrong tree
or is there an easier way to do this?

Ideally we could just drop the div in anywhere we wanted, the help icon
would always float to the right of the label/input and when the user
clicked the help icon we'd get a context sensitive help solution.

I was thinking of something that could be built off a div like this:

prototype:
document.observe(dom:loaded, function() {
$$('div.help').each(function(item) {
item.observe('onclick', function() {
   // get items id
   // use ajax call to get help info from server
   // populate div
   // apply pop-up class
   // set handler to process dismiss click () {
   // delete context help
   // restore help class
   };
   });
});
});

html:
div class='help' id='topic'/div

css:
.help {?}
.popup-help {?}
.icon-help {background: #fff url(images/icons/help_32x32.png) top left
no-repeat;}

-- 
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] Help system

2013-05-30 Thread Phil Petree
Certainly seems like it should be easy... I guess that's why I was kinda
surprised to not see where anyone else had put one together... certainly
was nothing on scripteka... could add some serious value to some sites.

I'll play around with it on Sunday and see what I can cobble together... of
course it looks like you did most of the work in 5 minutes and I'll spend
most of the day playing around with it! LOL

I'll post what I come up with...



On Thu, May 30, 2013 at 11:41 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 This would be pretty easy to do. Prototype gives you lots of tools to make
 this possible, the bulk of this effort would probably go into the CSS to
 style your tooltips.

 On May 30, 2013, at 11:30 AM, Phil Petree wrote:

  Has anyone developed an inline help system?  Am I barking up the wrong
 tree or is there an easier way to do this?
 
  Ideally we could just drop the div in anywhere we wanted, the help icon
 would always float to the right of the label/input and when the user
 clicked the help icon we'd get a context sensitive help solution.
 
  I was thinking of something that could be built off a div like this:
 
  prototype:
  document.observe(dom:loaded, function() {
  $$('div.help').each(function(item) {
  item.observe('onclick', function() {

 This would be item.observe('click' ... you never use the 'on' part in
 Element/Event.observe.

 // get items id

 item.id or item.readAttribute('id')

 // use ajax call to get help info from server
 // populate div
 // apply pop-up class

 new Ajax.Updater('theDivId', '/url/to/help/system', {
 parameters: {id: theIdYouGotAbove},
 onSuccess: function(){
 item.addClassName('tooltip');
 }
 });

 // set handler to process dismiss click () {
 // delete context help
 // restore help class
 };

 document.on('click', 'div.tooltip', function(evt, elm){
 elm.update().removeClassName('tooltip');
 });


 The on handler is really helpful, it can manage elements that weren't in
 place when the page loaded. One handler to rule them all, not a separate
 handler per tooltip.

 });
  });
  });
 
  html:
  div class='help' id='topic'/div
 
  css:
  .help {?}
  .popup-help {?}
  .icon-help {background: #fff url(images/icons/help_32x32.png) top left
 no-repeat;}

 Hope this helps,

 Walter

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




[Proto-Scripty] finding all tr's within a div

2013-05-17 Thread Phil Petree
I'm expanding the table row highlighting ya'll helped me with before.  Now
I have two tables on a page and each table has rows that I want to
highlight on mouseover.

Can't give the tables the same id so what I was doing was creating a div
with a class:

table class='blah' id='blah' ...
trthCol 1/thth col 2/th/tr
div class='row_highlight'
trtdData 1/tdtdData 2/td/tr
trtdData 1/tdtdData 2/td/tr
trtdData 1/tdtdData 2/td/tr
/div
/table

In prototype I'm trying:
  $$('div.row_highlight tr').each(function(item) {
  item.observe('mouseover', function() {
  item.addClassName('over');
  });
  item.observe('mouseout', function() {
  item.removeClassName('over');
  });
  });
$$ is returning null... not even getting to the item.observe

Obviously, I'm doing something wrong here... googled around and most people
seem to be doing it the way I am...  what am I missing?

-- 
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] finding all tr's within a div

2013-05-17 Thread Phil Petree
Walter, thanks for that... I knew I was approaching it the wrong way...  I
never think about tbody cause it didn't exist when I learned html... it's
never bcome a part of my habit (along with several other things) LOL

On Fri, May 17, 2013 at 12:43 PM, Walter Lee Davis wa...@wdstudio.comwrote:


 On May 17, 2013, at 12:19 PM, Phil Petree wrote:

  I'm expanding the table row highlighting ya'll helped me with before.
  Now I have two tables on a page and each table has rows that I want to
 highlight on mouseover.
 
  Can't give the tables the same id so what I was doing was creating a div
 with a class:
 
  table class='blah' id='blah' ...
  trthCol 1/thth col 2/th/tr
  div class='row_highlight'
  trtdData 1/tdtdData 2/td/tr
  trtdData 1/tdtdData 2/td/tr
  trtdData 1/tdtdData 2/td/tr
  /div
  /table
 
  In prototype I'm trying:
$$('div.row_highlight tr').each(function(item) {
item.observe('mouseover', function() {
item.addClassName('over');
});
item.observe('mouseout', function() {
item.removeClassName('over');
});
});
  $$ is returning null... not even getting to the item.observe
 
  Obviously, I'm doing something wrong here... googled around and most
 people seem to be doing it the way I am...  what am I missing?

 You can't nest a div inside a table like this. JavaScript (not just
 Prototype) has no tolerance for malformed HTML. Browsers handle it
 perfectly (for certain definitions of perfectly) but scripts rely on you
 getting the HTML right before you start horsing around with the DOM.

 The simplest way to do what you're describing here is to make your HTML
 valid, and add a new set of valid tags that you're not currently using:
 thead and tbody.

 table class=row_highlight
   thead
 tr
   thHead one/ththHead two/th
 /tr
   /thead
 tbody
 tr
   tdCol one/tdtdCol two/td
 /tr
 ... many more rows here ...
 /tbody
 /table

 Now, all you need to get the table rows to highlight is this:

 $$('.row_highlight tbody tr').each(function(item){
   ... your code here ...
 });

 See how that works?

 Walter

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




-- 
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: 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, ayson...@gmail.com 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/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] determine if any of checkbox[] is checked

2013-04-01 Thread Phil Petree
// this works with names that contain spaces and arrays[]...

Validation.add('validate-one-array', 'Error message text', function(value,
element) {
var elmName = input:checkbox[name=' +element.name +'];
var bChecked = false;  // not validated
$$(elmName).each(function(elm) {
   if( $(elm).checked )
 bChecked = true; // if one is checked, we validated
});
return bChecked;
  });


On Mon, Apr 1, 2013 at 1:15 PM, Jason Westbrook jwestbr...@gmail.comwrote:

 typically when I build forms like that I have a database that is giving me
 all the data so I only have to update the loop once for all the checkboxes
 :-)

 but yes you can use the $$() Selector method to use the names - I think
 you have to do it this way though

 $$(input[name='kitcat[]']:checked)//but I'm not sure how Sizzle
 will handle the bracket in the name
 or
 $(input[name^='kitcat']:checked) //this is probably more safe but
 it will match more elements as it gets all elements that have a name
 attribute that starts with kitcat (starts with is ^= instead of =)



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


 On Sun, Mar 31, 2013 at 11:46 AM, Phil Petree phil.pet...@gmail.comwrote:

 Hey Jason... I guess the rest of the group are all slugs! How dare they
 take Easer off! LOL

 I had kinda come to the same conclusion... what I implemented was:
   if($$('input:checked').length  0)
 return true;
 This kind of works because the ONLY input on this page are checkboxes
 (think of a wizard) but I was really looking to pass names (kitcat[]) in so
 that it could be more flexible and accomodate future mods.

 In your method, I need to mod all 17 checkboxes to include the same class
 name which is currently: validate-onein-group

 Is there a way to collect all checkboxes with the same name?


 On Sun, Mar 31, 2013 at 11:54 AM, Jason Westbrook 
 jwestbr...@gmail.comwrote:

 Try adding a separate class to all of your checkboxes that are in the
 group and then do this

 if( $$('.groupchecks:checked').length == 0 )
 {
 //no checked checkboxes

 {

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


 On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.comwrote:

 Happy Easter!

 I have an array of checkboxes on a form (about 15 of them) arranged in
 rows like this:
 trtdinput type='checkbox' name='kitcat[]'
 .../tdtdname/tdtddescription/td/tr

 What I have been trying to use is this:
 $(input:checkbox[name=kitcat]:checked).each(function() {
 // if one is checked, we validated
 return true;
 });

 What I'm getting is an error saying: Unable to get value of the
 property 'each': object is null or undefined

 What's the trick to this?

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




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




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

Re: [Proto-Scripty] determine if any of checkbox[] is checked

2013-04-01 Thread Phil Petree
Ha!  I knew there had to be a shorter way to do this!

Thanks!

On Mon, Apr 1, 2013 at 3:53 PM, Jason Westbrook jwestbr...@gmail.comwrote:


 Prototype has a method for what you are trying called any()

 http://api.prototypejs.org/language/Enumerable/prototype/any/

 you create an iterator function and pass it to any


 var elmName = input:checkbox[name=' +element.name +'];
 var bChecked = false;  // not validated
 var anychecked = $$(elmName).any(function(n) {
  return n.checked;
 });

 anychecked will be true or false



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


 On Mon, Apr 1, 2013 at 10:49 AM, Phil Petree phil.pet...@gmail.comwrote:

 // this works with names that contain spaces and arrays[]...

 Validation.add('validate-one-array', 'Error message text',
 function(value, element) {
 var elmName = input:checkbox[name=' +element.name +'];
 var bChecked = false;  // not validated
 $$(elmName).each(function(elm) {
if( $(elm).checked )
  bChecked = true; // if one is checked, we validated
 });
 return bChecked;
   });


 On Mon, Apr 1, 2013 at 1:15 PM, Jason Westbrook jwestbr...@gmail.comwrote:

 typically when I build forms like that I have a database that is giving
 me all the data so I only have to update the loop once for all the
 checkboxes :-)

 but yes you can use the $$() Selector method to use the names - I think
 you have to do it this way though

 $$(input[name='kitcat[]']:checked)//but I'm not sure how Sizzle
 will handle the bracket in the name
 or
 $(input[name^='kitcat']:checked) //this is probably more safe but
 it will match more elements as it gets all elements that have a name
 attribute that starts with kitcat (starts with is ^= instead of =)



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


 On Sun, Mar 31, 2013 at 11:46 AM, Phil Petree phil.pet...@gmail.comwrote:

 Hey Jason... I guess the rest of the group are all slugs! How dare they
 take Easer off! LOL

 I had kinda come to the same conclusion... what I implemented was:
   if($$('input:checked').length  0)
 return true;
 This kind of works because the ONLY input on this page are checkboxes
 (think of a wizard) but I was really looking to pass names (kitcat[]) in so
 that it could be more flexible and accomodate future mods.

 In your method, I need to mod all 17 checkboxes to include the same
 class name which is currently: validate-onein-group

 Is there a way to collect all checkboxes with the same name?


 On Sun, Mar 31, 2013 at 11:54 AM, Jason Westbrook jwestbr...@gmail.com
  wrote:

 Try adding a separate class to all of your checkboxes that are in the
 group and then do this

 if( $$('.groupchecks:checked').length == 0 )
 {
 //no checked checkboxes

 {

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


 On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.comwrote:

 Happy Easter!

 I have an array of checkboxes on a form (about 15 of them) arranged
 in rows like this:
 trtdinput type='checkbox' name='kitcat[]'
 .../tdtdname/tdtddescription/td/tr

 What I have been trying to use is this:
 $(input:checkbox[name=kitcat]:checked).each(function() {
 // if one is checked, we validated
 return true;
 });

 What I'm getting is an error saying: Unable to get value of the
 property 'each': object is null or undefined

 What's the trick to this?

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




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

[Proto-Scripty] determine if any of checkbox[] is checked

2013-03-31 Thread Phil Petree
Happy Easter!

I have an array of checkboxes on a form (about 15 of them) arranged in rows
like this:
trtdinput type='checkbox' name='kitcat[]'
.../tdtdname/tdtddescription/td/tr

What I have been trying to use is this:
$(input:checkbox[name=kitcat]:checked).each(function() {
// if one is checked, we validated
return true;
});

What I'm getting is an error saying: Unable to get value of the property
'each': object is null or undefined

What's the trick to this?

-- 
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] determine if any of checkbox[] is checked

2013-03-31 Thread Phil Petree
Hey Jason... I guess the rest of the group are all slugs! How dare they
take Easer off! LOL

I had kinda come to the same conclusion... what I implemented was:
  if($$('input:checked').length  0)
return true;
This kind of works because the ONLY input on this page are checkboxes
(think of a wizard) but I was really looking to pass names (kitcat[]) in so
that it could be more flexible and accomodate future mods.

In your method, I need to mod all 17 checkboxes to include the same class
name which is currently: validate-onein-group

Is there a way to collect all checkboxes with the same name?


On Sun, Mar 31, 2013 at 11:54 AM, Jason Westbrook jwestbr...@gmail.comwrote:

 Try adding a separate class to all of your checkboxes that are in the
 group and then do this

 if( $$('.groupchecks:checked').length == 0 )
 {
 //no checked checkboxes

 {

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


 On Sun, Mar 31, 2013 at 8:30 AM, Phil Petree phil.pet...@gmail.comwrote:

 Happy Easter!

 I have an array of checkboxes on a form (about 15 of them) arranged in
 rows like this:
 trtdinput type='checkbox' name='kitcat[]'
 .../tdtdname/tdtddescription/td/tr

 What I have been trying to use is this:
 $(input:checkbox[name=kitcat]:checked).each(function() {
 // if one is checked, we validated
 return true;
 });

 What I'm getting is an error saying: Unable to get value of the property
 'each': object is null or undefined

 What's the trick to this?

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




-- 
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] Form Validator

2013-03-27 Thread Phil Petree
Thanks Jason...

That's essentially what tetlaws does... he does have a number of special
tests (currency, dates, alpha, digits etc.)  plus some callbacks so you can
write your own.  I found the problem with the selects and fixed those...
still some other issues.

On Tue, Mar 26, 2013 at 4:52 PM, Jason Westbrook jwestbr...@gmail.comwrote:


 I usually home brew one that looks for the required class and then adds
 an error class to that element and then at the end of the function test
 if there are 0 elements with the error class

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


 On Tue, Mar 26, 2013 at 9:33 AM, Phil Petree phil.pet...@gmail.comwrote:

 Has anyone found a good form validator?

 I have been using the one by Andrew Tetlaw for several years and its
 worked really well but now with proto 1.7 and ie 9 I'm finding it no longer
 works (as in it doesn't see select where no option has been chosen.

 i.e. http://www.presspeek.com/contact/select.html

 I've rooted around but all the validators I found were all written circa
 2007 - 2008.

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




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




[Proto-Scripty] Form Validator

2013-03-26 Thread Phil Petree
Has anyone found a good form validator?

I have been using the one by Andrew Tetlaw for several years and its worked
really well but now with proto 1.7 and ie 9 I'm finding it no longer works
(as in it doesn't see select where no option has been chosen.

i.e. http://www.presspeek.com/contact/select.html

I've rooted around but all the validators I found were all written circa
2007 - 2008.

-- 
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] color swatch selector

2013-03-25 Thread Phil Petree
You guys are the best!

Walter, I would have never thought of using radio buttons but I bet that's
what they do on the clothing sites where you can pick different
shirt/pant/shoe colors... they all work like yours does so I'll implement
it the way you did.  Should work perfectly.

Thanks for the help on this!

On Thu, Mar 21, 2013 at 4:00 PM, Walter Lee Davis wa...@wdstudio.comwrote:

 Here's what I was thinking of:

 http://scripty.walterdavisstudio.com/color-picker.html

 Walter

 On Mar 21, 2013, at 2:40 PM, Walter Lee Davis wrote:

  Really? Can you show an example? I don't think the label.swatch itself
 gets a :checked pseudo-class, it's the input inside it that gets checked.
 While you can find the :checked checkbox, you can't style upward like that
 to access the parent label (really wish you could).
 
  Walter
 
  On Mar 21, 2013, at 1:57 PM, Jason Westbrook wrote:
 
  For the CSS for the radio buttons use the pseudo class
  label.swatch:checked
 
 
  --
  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.




-- 
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] color swatch selector

2013-03-21 Thread Phil Petree
Morning Walter...

That was the approach I took last night... it works but its just not
as attractive as I'd like... still seems like their should be a more
stylish way.

I may just opt for something like the color selector used on a number of
clothing sites... like this one:
http://www.brooksbrothers.com/mens/polos-knits/0298,default,sc.html?lid=leftnav-menu

Basically they just put color swatch/squares in a row and allow you to
mouseover to see the effects and a click selects that color.
On Thu, Mar 21, 2013 at 12:05 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 I think you're going to need to update a swatch next to the picker, maybe.
 The select is remarkably styling-resistant in Safari, probably Chrome as
 well. I would absolutely position a little dot off to the left of the
 select, and update its background color on the change event of the select.

 Walter

 On Mar 20, 2013, at 3:12 PM, Phil Petree wrote:

  I want users to be able to pick from one of 6 colors for a folder (like
 a file folder).
 
  At first I thought about doing this as a selectoption
 value='color_blue' style='background-image: url(blue.png);'/option
 
  But I'm discovering this will really only render well in firefox...
 
  Has anyone discovered how to do this using proto/scripty?
 
  Thanks
 
  --
  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.




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




[Proto-Scripty] color swatch selector

2013-03-20 Thread Phil Petree
I want users to be able to pick from one of 6 colors for a folder (like a
file folder).

At first I thought about doing this as a selectoption value='color_blue'
style='background-image: url(blue.png);'/option

But I'm discovering this will really only render well in firefox...

Has anyone discovered how to do this using proto/scripty?

Thanks

-- 
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] Element.setValue() doesn't work with the output tag

2013-03-06 Thread Phil Petree
Not sure what you're expecting but under ie 9, neither worked for me... not
even in compatibility mode.

On Wed, Mar 6, 2013 at 11:20 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 Have a fiddle: http://jsfiddle.net/ZYDjc/

 Any thoughts? Should I raise a ticket?

 Thanks,

 Walter

 --
 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] How to pass parameter from prototypejs client to rest web service

2013-02-14 Thread Phil Petree
Try name=appleprice=1.00
On Feb 14, 2013 8:14 AM, Sakthi Dasan shakthyd...@gmail.com wrote:

 I have a rest web service like

 @Path(/postItem)@Produces({ MediaType.APPLICATION_XML, 
 MediaType.APPLICATION_JSON })public Item postItem(@QueryParam(name) String 
 name, @QueryParam(price) String price){
   System.out.println(name);
   System.out.println(price);
   return new Item(name , price);}

 And I use prototypejs javascript lib to invoke above rest web service from
 the client side with below code snippet.

 script
   new Ajax.Request('/some_url', {
 method:'post',
 parameters: {name: 'apple', price: 12}
 onSuccess: function(transport) {
 var response = transport.responseText || no response text;
 alert(Success! \n\n + response);
 },
 onFailure: function() { alert('Something went wrong...'); }
  });/script

 Problem : I am not able to correctly pass the parameter to name and price
 of the service method.

 I am passing two parameters in client but in service side only the
 parameter 'name' is getting mapped(that too with wrong value). when i print
 the name and price i get the following

  System.out.println(name);  == null

  System.out.println(price); == null

 How can i pass parameter to service from prototypejs client so that 'name'
 gets the value apple and 'price' gets the value 12.

 --
 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] How to pass parameter from prototypejs client to rest web service

2013-02-14 Thread Phil Petree
The parameters are passed but only the first one because you either have to
serialize the data or build your own serialized string.

If you want just a few fields and your form contains many more than that
you can build your own like this:

parameters: 'name='+escape($F('idName')) +'price='+escape($F('idPrice')),

Otherwise use:

parameters: $('myform').serialize(),


On Thu, Feb 14, 2013 at 12:56 PM, mike fantaz...@gmail.com wrote:

 You use something like Firebug or Chrome Developer Tools. See whether the
 parameters passed?
 Also in you javascript code is missing a comma after parameters line.

 --
 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.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 To post to this group, send email to prototype-scriptaculous@**
 googlegroups.com prototype-scriptaculous@googlegroups.com.
 Visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://groups.google.com/group/prototype-scriptaculous?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://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] scripty inplace editor

2013-01-28 Thread Phil Petree
Jason,

ended up spending a few hours rewriting some of my code in order to try
your code.  Instead of dom:ready I implemented the inplace editor
onComplete and its working fine.

Still not sure why cancel doesn't actually kill the invocation or why
editor.dispose(); prevents the editor from actually working...

Either way, this implementation is up!

Thanks again!

On Sun, Jan 27, 2013 at 6:51 PM, Jason Westbrook jwestbr...@gmail.comwrote:


 So the actual problem is that you are creating multiple inplace editors -
 create it once and let the inplace editor handle the click events

 I answered a similar question in more depth on StackOverflow


 http://stackoverflow.com/questions/14306045/codeigniter-script-aculo-us-inplaceedit-produces-duplicates-on-update/14313622#14313622

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


 On Sun, Jan 27, 2013 at 3:24 PM, Phil Petree phil.pet...@gmail.comwrote:

 Thanks Walter.

 I tried that already and found the editor to be essentially disabled (you
 could click but not get the form).
 On Jan 27, 2013 6:14 PM, Walter Lee Davis wa...@wdstudio.com wrote:


 On Jan 27, 2013, at 4:10 PM, Phil Petree wrote:

  Hi All!
 
  I'm implementing the scriptaculous inplace editor and I have it
 working except for one small detail:
 
  If I activate the editor, click cancel, activate the editor again I
 get two inplace editors.  cancel those and activate again and I get three.
  cancel those and activate again and I get four... and on and on and on...
 
  What's the trick to this?  Here's my code:
 
  html:
  trtd onclick='editName(this, id)'Homer Simpson/td/tr
 
  javascript:
  function editName(element, id)
  {
new Ajax.InPlaceEditor(element, 'name_inpl_ajax.php', {
okText:  Save ,
cancelControl: button,
callback: function(form, value) {
return 'id=' +id + 'name='+encodeURIComponent(value)
}
});
  }
 

 This editor isn't behaving as documented lately, I had an occasion to
 upgrade a working editor to the latest versions of Prototype and
 Scriptaculous, and found that clicking to edit the second time would cause
 the editor to load the editing form itself for editing. Not a good time for
 my client!

 You might want to look at this option:

  Removing the behavior
  To disable the InPlaceEditor behavior later on, store it in a variable
 like:
 
  var editor = new Ajax.InPlaceEditor('product_1'
  ,...);
   (...
  do
   stuff ..)
   editor.dispose();
 
  This way, you can enable and disable  In Place Editing :
 http://madrobby.github.com/scriptaculous/in-place-editing at will.
 

 See if that can work around the issue for you.

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




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




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




[Proto-Scripty] scripty inplace editor

2013-01-27 Thread Phil Petree
Hi All!

I'm implementing the scriptaculous inplace editor and I have it working
except for one small detail:

If I activate the editor, click cancel, activate the editor again I get two
inplace editors.  cancel those and activate again and I get three.  cancel
those and activate again and I get four... and on and on and on...

What's the trick to this?  Here's my code:

html:
trtd onclick='editName(this, id)'Homer Simpson/td/tr

javascript:
function editName(element, id)
{
  new Ajax.InPlaceEditor(element, 'name_inpl_ajax.php', {
  okText:  Save ,
  cancelControl: button,
  callback: function(form, value) {
  return 'id=' +id + 'name='+encodeURIComponent(value)
  }
  });
}

-- 
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] scripty inplace editor

2013-01-27 Thread Phil Petree
Thanks Walter.

I tried that already and found the editor to be essentially disabled (you
could click but not get the form).
On Jan 27, 2013 6:14 PM, Walter Lee Davis wa...@wdstudio.com wrote:


 On Jan 27, 2013, at 4:10 PM, Phil Petree wrote:

  Hi All!
 
  I'm implementing the scriptaculous inplace editor and I have it working
 except for one small detail:
 
  If I activate the editor, click cancel, activate the editor again I get
 two inplace editors.  cancel those and activate again and I get three.
  cancel those and activate again and I get four... and on and on and on...
 
  What's the trick to this?  Here's my code:
 
  html:
  trtd onclick='editName(this, id)'Homer Simpson/td/tr
 
  javascript:
  function editName(element, id)
  {
new Ajax.InPlaceEditor(element, 'name_inpl_ajax.php', {
okText:  Save ,
cancelControl: button,
callback: function(form, value) {
return 'id=' +id + 'name='+encodeURIComponent(value)
}
});
  }
 

 This editor isn't behaving as documented lately, I had an occasion to
 upgrade a working editor to the latest versions of Prototype and
 Scriptaculous, and found that clicking to edit the second time would cause
 the editor to load the editing form itself for editing. Not a good time for
 my client!

 You might want to look at this option:

  Removing the behavior
  To disable the InPlaceEditor behavior later on, store it in a variable
 like:
 
  var editor = new Ajax.InPlaceEditor('product_1'
  ,...);
   (...
  do
   stuff ..)
   editor.dispose();
 
  This way, you can enable and disable  In Place Editing :
 http://madrobby.github.com/scriptaculous/in-place-editing at will.
 

 See if that can work around the issue for you.

 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.
 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 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] scripty inplace editor

2013-01-27 Thread Phil Petree
Yes, multiple instances are being created.

Your stackoverflow solution doesn't work for me.  The elements to be
inplace edited don't exist when the dom is loaded and may not ever exist.

I'm using a tab control, when the tab is activated an ajax call is made and
some html is returned.  In this particular case its a table.

I also have tried this... (unfortunately the available methods are not
clearly documented or rather not documented at all).

function editName(element, id)
{
  if(inpl_desc == null)
  {
inpl_desc = new Ajax.InPlaceEditor(element, 'inpl_ajax.php', {
okText:  Save ,
cancelControl: button,
rows: 5,
cols: 40,
callback: function(form, value) { return 'id=' +id +
'desc='+encodeURIComponent(value) },
onEnterEditMode: function(form, value) {
  // custom code goes here...
},
onLeaveEditMode: function(form, value) {
 // custom code goes here...
}
});
  }
  else
inpl_desc.enterEditMode('click');
}

-- 
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: 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 i...@wildanimaltracks.com 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.



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

2013-01-15 Thread Phil Petree
I'm working on submitting a form using a hidden iFrame target...  inside
the wizzard class the f.submit(); throws the method error but as soon as
you step over it in the debugger it calls the forms processor and the form
data is processed.  If you ignore the error in normal browser mode I get an
popup from the oncomplete that basically says there's a syntax error in
processing the return json from the target but the catch gets thrown and
the content displayed is from the main windown and not the target iframe.

I'm apparently really lost in this..

HTML:
div style='display: none'
  iframe id='wizzardTarget' name='wizzardTarget' src=''
  /iframe
/div

form name='kitForm' id='newkitOne' action='newkit1_ajax.php' method='post'
target='uploadTarget' enctype=multipart/form-data
!-- blah blah --
input type='submit' id='submit' value='Save '
onclick='validate_newkitOne();'
/form

Javascript:
function WizMaker(szForm, szTarget)
{
  var wizard = new Wizzard(szForm, szTarget);
  alert(szForm +  +szTarget);  // this verifies that the form name and
target are indeed correct.
}

var Wizzard = Class.create({
initialize: function(form, target) {
this.form = form;
this.target = target;  //iframe

$(this.form).observe('submit', this.upload.bind(this));
$(this.target).observe('load', this.complete.bind(this));
},

upload: function() {
// process form...
var f = $(this.form);
f.submit();   // this line generates the object/method error but
then calls the forms processor.
},

complete: function() {
var json;

try
{
  json =
frames[this.target].document.getElementsByTagName('body')[0].innerHTML.evalJSON();
}
catch(e)
{
  // this alert shows the contents of the main window and not the
target iframe
  alert(
frames[this.target].document.getElementsByTagName('body')[0].innerHTML() );
  // this error message shows syntax error
  alert('PressPeek Error: Form not submitted because: ' +e);
  return;
}
// snip... what's left is just updating some internal variables
none of which ever happens
}
})

-- 
You received 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] multipart/form-data upload via ajax

2013-01-10 Thread Phil Petree
I think the keyhole method seems to be the best mechanism.  I'll play
around with the callback for a bit and see what I can cobble together.

My overall problem is, the user is creating a folder and I want to make
adding the initial contents as easy as possible... in other words, I don't
want the user to create an empty folder and then go to another place on the
page to manage that folder.

If the user can create the folder, add a cover photo and some contents
(files) all in one swoop it will make for a better user experience.
On Wed, Jan 9, 2013 at 3:55 PM, Walter Lee Davis wa...@wdstudio.com wrote:

 If you want to use the normal upload mechanism, you can use a keyhole
 iframe as the target in your form action to post your file contents
 normally, and a callback function in the window scope of the containing
 page to signal back your updates. It looks like Ajax, but it's really just
 a multipart form post.

 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] highlighting a tablerow

2013-01-03 Thread Phil Petree
Walter,  I tried your method of applying the class to the td's and your
code was throwing an error which is most likely my fault. g

It's saying that object doesn't support that method  on the
elm.addClassName('over');

PROTOTYPE:
var rows = $$('#mail tr');
$('mail').on('mouseover', 'tr', function(elm, evt){
   rows.invoke('removeClassName', 'over');
   elm.addClassName('over');
});
CSS:
#mail tr.over td { background-color: lightgreen; }
HTML:
table class='form' id='mail'
tr
  th align='left'Subject:/th
  th align='left'From:/th
  th align='left'Sent:/th
  thAction/th
/tr
tr id='$id'
  td$subject/td
  td$username/td
  td$sentdate/td
  td valign='middle' align='center'
  img src='/images/icons/delete.png' width='16' height='16'
onclick='deleteMsg(this, $id);'
  img src='/images/icons/reply.png' width='16' height='16'
onclick='replyMsg(this, $id);'
  img src='/images/icons/forward.png' width='16' height='16'
onclick='forwardMsg(this, $id);'
  /td
/tr




On Wed, Jan 2, 2013 at 12:10 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 I usually have to add the color attribute to the td rather than the tr.
 You can make this change at the CSS level. Rather than using setStyle(),
 toggle the classname of the row, and then set your CSS to apply to td
 children of that class of row. For example:

 var rows = $$('#mytable tr');
 $('mytable').on('mouseover', 'tr', function(elm, evt){
   rows.invoke('removeClassName', 'over');
   elm.addClassName('over');
 }

 CSS:
 #mytable tr.over td {
   background-color: #fefefe;
 }

 Walter

 On Jan 1, 2013, at 11:55 PM, Dave Kibble wrote:

  I think there's also something weird about CSS applied to table rows,
  (I think) cells don't inherit all properties from the row they
  'belong' to. Make sure your HTML/CSS works in a stand-alone document
  first to check.
 
  Dave
 
  On 1 January 2013 22:53, Phil Petree phil.pet...@gmail.com wrote:
  I have an empty div that gets an ajax result that contains a table
 which
  looks like this:
 
  HTML:
  table class='form' id='mail' width='100%' border='1'
   tr
 thSubject:/th
 thFrom:/th
 thSent:/th
 thAction/th
   /tr
   tr class='mailrow' onclick='viewMsg( .$id .,\ .$subject .\);' 
 td$subject/td
 td$username/td
 td$sentdate/td
 td valign='middle' align='center'
   img src='/images/icons/delete.png' width='16' height='16'
  onclick='deleteMsg(this, $id);'
   img src='/images/icons/reply.png' width='16' height='16'
  onclick='replyMsg(this, $id, \{$subject}\ );'
   img src='/images/icons/forward.png' width='16' height='16'
  onclick='forwardMsg(this, $id, \{$subject}\ );'
 /td
   /tr
  /table
 
  In the onComplete: I am calling this code to try and cause the rows to
  highlight during the mouseover... I'm getting nothing.  My first
 thought is
  that the table hasn't been rendered when onComplete is called but then,
  onComplete should be called after all other work is done.  What's the
  solution to this?
 
  Prototype:
  $$('tr.mailrow').each(function(item) {
 item.observe('mouseover', function() {
 item.setStyle({ backgroundColor: '#303030' });
 });
 item.observe('mouseout', function() {
 item.setStyle({backgroundColor: '#fff' });
 });
  });
 
  CSS:
  .mailrow tr:hover { color: #303030; }
 
 
 
  --
  You received 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] highlighting a tablerow

2013-01-03 Thread Phil Petree
Thanks Walter!  I tried quite a few things... borrowed 1/2 dozen snippets
from various places and nothing was working till yours.

I still have one question, how do you undo (stopObserving) these events?
When I load new tables into the other tabs via ajax they are not being
monitored which means I need to do a stopEvent and restart with the new
rows.

BTW, I had to add a mouseout because when I take the mouse off the table it
left a row still highlighted.

It now looks like this:
  var rows = $$('#mail tr');
  $('mail').on('mouseover', 'tr', function(evt, elm){
 rows.invoke('removeClassName', 'over');
 elm.addClassName('over');
  });
  $('mail').on('mouseout', 'tr', function(evt, elm){
 rows.invoke('removeClassName', 'over');
  });


On Thu, Jan 3, 2013 at 11:25 AM, Walter Lee Davis wa...@wdstudio.comwrote:


 On Jan 3, 2013, at 8:59 AM, Phil Petree wrote:

  $('mail').on('mouseover', 'tr', function(elm, evt){

 My error, the variables are swapped. Make that line this:

 $('mail').on('mouseover', 'tr', function(evt, elm){

 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] highlighting a tablerow

2013-01-03 Thread Phil Petree
OK, I could do that but I wouldn't want it over every tr, only those within
the mail table.  For instance if you were in an alternate tab viewing an
email, you wouldn't want a mouseover on the to, from, subject or message
rows.  Likewise in the compose tab.
On Jan 3, 2013 2:27 PM, Walter Lee Davis wa...@wdstudio.com wrote:


 On Jan 3, 2013, at 1:41 PM, Phil Petree wrote:

  Thanks Walter!  I tried quite a few things... borrowed 1/2 dozen
 snippets from various places and nothing was working till yours.
 
  I still have one question, how do you undo (stopObserving) these events?
  When I load new tables into the other tabs via ajax they are not being
 monitored which means I need to do a stopEvent and restart with the new
 rows.

 No, you just have to observe from higher up. If you use
 document.on('mouseover'... it will work no matter when or where you insert
 the elements:

 http://scripty.walterdavisstudio.com/table-hover.html

 I'm not using an Ajax call here to create my new tables, but I am
 generating a completely new object after the page load, and that object has
 no observers defined on it. There's just a single observer at the document
 level, and it listens to all mouseover and mouseout events but only acts
 when they happen over a tr.

 Walter

 
  BTW, I had to add a mouseout because when I take the mouse off the table
 it left a row still highlighted.
 
  It now looks like this:
var rows = $$('#mail tr');
$('mail').on('mouseover', 'tr', function(evt, elm){
   rows.invoke('removeClassName', 'over');
   elm.addClassName('over');
});
$('mail').on('mouseout', 'tr', function(evt, elm){
   rows.invoke('removeClassName', 'over');
});
 
 
  On Thu, Jan 3, 2013 at 11:25 AM, Walter Lee Davis wa...@wdstudio.com
 wrote:
 
  On Jan 3, 2013, at 8:59 AM, Phil Petree wrote:
 
   $('mail').on('mouseover', 'tr', function(elm, evt){
 
  My error, the variables are swapped. Make that line this:
 
  $('mail').on('mouseover', 'tr', function(evt, elm){
 
  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.

 --
 You received 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] highlighting a tablerow

2013-01-03 Thread Phil Petree
You were bang on about going up the heirarchy... instead of the top of the
dom, I went to the tabs div and then it was working fine.

I was able to just include the rows in mail...

mail system is 99% functional... will have to add in a contact list type
system but will do that later.

Thanks for all your help!


On Thu, Jan 3, 2013 at 4:56 PM, Walter Lee Davis wa...@wdstudio.com wrote:

 You can be as specific as you want. If you need to highlight only the
 tables that have a particular ancestor, you could make the selector
 something like

 document.on('mouseover', 'table.stripe tr', ...

 and then you would only capture the tables that you had deliberately
 marked as being stripe-able. Or use the ID of that tab to scope the
 selection, or any other CSS tricks you can think of. It's a very flexible
 approach.

 Walter

 On Jan 3, 2013, at 4:48 PM, Phil Petree wrote:

  OK, I could do that but I wouldn't want it over every tr, only those
 within the mail table.  For instance if you were in an alternate tab
 viewing an email, you wouldn't want a mouseover on the to, from, subject or
 message rows.  Likewise in the compose tab.
 
  On Jan 3, 2013 2:27 PM, Walter Lee Davis wa...@wdstudio.com wrote:
 
  On Jan 3, 2013, at 1:41 PM, Phil Petree wrote:
 
   Thanks Walter!  I tried quite a few things... borrowed 1/2 dozen
 snippets from various places and nothing was working till yours.
  
   I still have one question, how do you undo (stopObserving) these
 events?  When I load new tables into the other tabs via ajax they are not
 being monitored which means I need to do a stopEvent and restart with the
 new rows.
 
  No, you just have to observe from higher up. If you use
 document.on('mouseover'... it will work no matter when or where you insert
 the elements:
 
  http://scripty.walterdavisstudio.com/table-hover.html
 
  I'm not using an Ajax call here to create my new tables, but I am
 generating a completely new object after the page load, and that object has
 no observers defined on it. There's just a single observer at the document
 level, and it listens to all mouseover and mouseout events but only acts
 when they happen over a tr.
 
  Walter
 
  
   BTW, I had to add a mouseout because when I take the mouse off the
 table it left a row still highlighted.
  
   It now looks like this:
 var rows = $$('#mail tr');
 $('mail').on('mouseover', 'tr', function(evt, elm){
rows.invoke('removeClassName', 'over');
elm.addClassName('over');
 });
 $('mail').on('mouseout', 'tr', function(evt, elm){
rows.invoke('removeClassName', 'over');
 });
  
  
   On Thu, Jan 3, 2013 at 11:25 AM, Walter Lee Davis wa...@wdstudio.com
 wrote:
  
   On Jan 3, 2013, at 8:59 AM, Phil Petree wrote:
  
$('mail').on('mouseover', 'tr', function(elm, evt){
  
   My error, the variables are swapped. Make that line this:
  
   $('mail').on('mouseover', 'tr', function(evt, elm){
  
   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.
 
  --
  You received 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

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 vkhomyac...@gmail.com 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=322view=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-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 vkhomyac...@gmail.com 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.



[Proto-Scripty] Re: AJAX Tabs Widget

2012-12-28 Thread Phil Petree
I managed to get Rolands tabs.js to work.  Essentially I added another
parameter to the addPanel function called relationship and then used that
in the new Element(). After Roland adds the Panel (creates a new tab) he
calls openPanel which will inturn call the AJAX call back.  Once there it
was easy to supply an AJAX script which then worked just like an existing
tab... actually pretty cool.

On Fri, Dec 28, 2012 at 10:10 AM, Phil Petree phil.pet...@gmail.com wrote:

 Hi All!

 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.

 Think of the problem like this: you have a list of items (kits) and you
 want to view the contents of one of these kits so you click on the kit name
 and a user would expect a new tab to open and the contents of the kit to be
 displayed. The contents of the new tab will be a list of parts. Users will
 want to have more than one kit open at a time and, obviously, you don't
 want to download the contents of 10,000 kits.

 Another, simplier example might be like an inbox that list your emails and
 when you want to view one you click it and a new tab opens displaying the
 contents of the email.

 I found a great implementation by Rolan Franssen located here:
 http://roland.devarea.nl/work/tabs/
 and you can easily assign ajax calls to tabs, dynamically create / delete
 tabs etc. which is perfect for what I need except for one small, seemingly
 simple thing... I can't figure out how to get it to create a tab AND load
 the content via an ajax request and his code is a little out of my league.

 Does anyone know of a good tab control that can do this or has anyone
 modified Rolands code to do this?

 Thanks!

 Pete
 P.S. http://scripteka.com/ seems broken just like Walters scroll bars
 were... using ie9, you can't scroll the widgets list down.





-- 
You received 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] Anyone know of a good image scroller?

2012-12-27 Thread Phil Petree
I checked them both and they are indeed working...

On Tue, Dec 25, 2012 at 11:11 PM, Walter Lee Davis wa...@wdstudio.comwrote:

 I had some older versions of Prototype/Scriptaculous in there, that'd
 explain it, since I was looking on Mac OS, and there was no patch needed
 for those browsers. I've just updated to the latest.

 Walter

 On Dec 25, 2012, at 5:55 PM, Phil Petree wrote:

  On ie9.
 

 --
 You received 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] Anyone know of a good image scroller?

2012-12-25 Thread Phil Petree
Thanks for that pointer... but that's still not what I'm looking for (and
Walter, if you're still haning out here, two of those demos are broken).

I have an ever changing list of product logos (right now 30 and we've not
even launched yet) and I want to:

1) load a prototpe widget on my home page
2) point that widget to a directory containing the logos
3) have that widget issue an ajax call to fetch a logo
4) receive the logo and display in my box
5) Ideally it would scroll it up from the bottom and push the previous off
the top

On Sun, Dec 23, 2012 at 3:37 AM, Agnese Camellini 
agnese.camell...@gmail.com wrote:

 I got one example but it's orizontal scrolling:
 http://scripty.walterdavisstudio.com/

 it's a repo of one other member of this list.

 Hope to help.
 Agnese

 2012/12/22 Phil Petree phil.pet...@gmail.com

  I'm working on a site that needs to have some images (logos) from
 featured products scrolled vertically and the images should loaded via
 ajax.

 I've looked all over and not found anything using prototype... anyone
 have any suggestions?
 (looks like the prototype eco system is diminishing)

 --
 You received 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] Anyone know of a good image scroller?

2012-12-25 Thread Phil Petree
http://scripty.walterdavisstudio.com/scroll/
http://scripty.walterdavisstudio.com/slider.html

On the scroll bar, I can't scroll
On the slider only the left/right links work. I cant grab the block or
click within the slider range.

On ie9.



Decided to roll my own scroller... remembered that I already had the php
based image service piece that I wrote to track logo displays so we could
see how often our newsletter was viewed... used that, a few divs, some
basic prototype and I was done pretty quickly. It rotates through 6 images,
I could tinker some more and have it refresh logos on every cycle but this
is good enough.

On Tue, Dec 25, 2012 at 1:30 PM, Walter Lee Davis wa...@wdstudio.comwrote:


 On Dec 25, 2012, at 6:41 AM, Phil Petree wrote:

  Thanks for that pointer... but that's still not what I'm looking for
 (and Walter, if you're still haning out here, two of those demos are
 broken).
 
  I have an ever changing list of product logos (right now 30 and we've
 not even launched yet) and I want to:
 
  1) load a prototpe widget on my home page
  2) point that widget to a directory containing the logos

 This part is going to be impossible without server-side help. Either PHP
 or Ruby or some other server-side scripting that can read a directory
 contents and do things with that knowledge will be necessary, because
 JavaScript is run on the client, and there's no way the client can read a
 directory on the server.

  3) have that widget issue an ajax call to fetch a logo
  4) receive the logo and display in my box
  5) Ideally it would scroll it up from the bottom and push the previous
 off the top

 The effect part of this is pretty trivial. You might want to look for a
 Carousel effect, of which there are hundreds of examples.

 Walter

 
  On Sun, Dec 23, 2012 at 3:37 AM, Agnese Camellini 
 agnese.camell...@gmail.com wrote:
  I got one example but it's orizontal scrolling:
  http://scripty.walterdavisstudio.com/
 
  it's a repo of one other member of this list.
 
  Hope to help.
  Agnese
 
  2012/12/22 Phil Petree phil.pet...@gmail.com
  I'm working on a site that needs to have some images (logos) from
 featured products scrolled vertically and the images should loaded via
 ajax.
 
  I've looked all over and not found anything using prototype... anyone
 have any suggestions?
  (looks like the prototype eco system is diminishing)
 
  --
  You received 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.



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



[Proto-Scripty] Anyone know of a good image scroller?

2012-12-22 Thread Phil Petree
I'm working on a site that needs to have some images (logos) from featured
products scrolled vertically and the images should loaded via ajax.

I've looked all over and not found anything using prototype... anyone have
any suggestions?
(looks like the prototype eco system is diminishing)

-- 
You received 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 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 jimlong...@gmail.com 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.


 div id=newTableNUMBERS/div

 script type=text/javascript
 function loadScript()  {
 new Ajax.Updater('newTable', 'generateNumbers.js', { method: 'get' ,
 evalScripts: 'true' });
 }
 /script

 form action=input type=button id=resetButton value=Refresh
 Table  onclick=loadScript();/

 In the external js file i have the following

 script type=text/javascript

 alert(Hello);

 /script


 --
 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: 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 jimlong...@gmail.com 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 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('font color=greenSubscribed');
  }
}
function ajax_err(transport)
{
  alert(An AJAX error occurred:  +transport.statusText);
}


On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo jimlong...@gmail.com wrote:

 Thanks Phil,

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

 Here is a page . . .
 div id=myDiv/div
 script type=text/javascript
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 /script

 Here is the page being called . . .
 script  type=text/javascript
 sayHi = function(){
  alert ('Hi');
 };
 /script
 input type=button value=Click Me onclick=sayHi()/
  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 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('font color=greenSubscribed');
 $('my_div').innerHTML = h1AJAX Response/h1p +json.text +/p;
}
}

On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree phil.pet...@gmail.com 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('font color=greenSubscribed');
   }
 }
 function ajax_err(transport)
 {
   alert(An AJAX error occurred:  +transport.statusText);
 }


 On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo jimlong...@gmail.com wrote:

 Thanks Phil,

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

 Here is a page . . .
 div id=myDiv/div
 script type=text/javascript
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 /script

 Here is the page being called . . .
 script  type=text/javascript
 sayHi = function(){
  alert ('Hi');
 };
 /script
 input type=button value=Click Me onclick=sayHi()/
  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 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 jwestbr...@gmail.comwrote:


 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 phil.pet...@gmail.comwrote:

 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('font color=greenSubscribed');
  $('my_div').innerHTML = h1AJAX Response/h1p +json.text
 +/p;
 }
 }

 On Fri, Jul 27, 2012 at 4:05 PM, Phil Petree phil.pet...@gmail.comwrote:

 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('font color=greenSubscribed');
   }
 }
 function ajax_err(transport)
 {
   alert(An AJAX error occurred:  +transport.statusText);
 }


 On Fri, Jul 27, 2012 at 3:40 PM, Jim Longo jimlong...@gmail.com wrote:

 Thanks Phil,

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

 Here is a page . . .
 div id=myDiv/div
 script type=text/javascript
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 /script

 Here is the page being called . . .
 script  type=text/javascript
 sayHi = function(){
  alert ('Hi');
 };
 /script
 input type=button value=Click Me onclick=sayHi()/
  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

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 jimlong...@gmail.com 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('font color=greenSubscribed');
  $('my_div').innerHTML = h1AJAX Response/h1p +json.text
 +/p;
 }
 }

 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('font color=greenSubscribed');
   }
 }
 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 . . .
 div id=myDiv/div
 script type=text/javascript
 new Ajax.Updater('myDiv', 'XYZ.html', {evalScripts: true}) ;
 /script

 Here is the page being called . . .
 script  type=text/javascript
 sayHi = function(){
  alert ('Hi');
 };
 /script
 input type=button value=Click Me onclick=sayHi()/
  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

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 thinsold...@thinsoldier.com 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 head. 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
img src= and the client takes that and updates the image on the client
side with the new image. All in all, pretty neat.

And Greg, thanks again!

Pete

On Wed, Jul 11, 2012 at 2:18 PM, thinsoldier thinsold...@thinsoldier.comwrote:

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



[Proto-Scripty] Image Uploader / Thumbnail creator

2012-07-03 Thread Phil Petree
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 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] Image Uploader / Thumbnail creator

2012-07-03 Thread Phil Petree
We're implementing a CMS for user supplied content (articles and how-to's)
and one of our larger partners suggested that it would be nice if we had
photos (read logos) for the article authors.

Ideally, we'd upload the file, get confirmation, load the image into a div
and allow the user to rotate, crop etc.  Probably not many of our regular
users will avail themselves of of the profile picture but most of our
government/corporate users probably will.

One of the other devs reminded me that we had the php file uploader library
from cutesoft and that it implemented ajax (just not prototype) so I'm
looking at that but we still need an image crop/rotate tool.



On Tue, Jul 3, 2012 at 3:38 PM, Walter Lee Davis wa...@wdstudio.com wrote:

 When you say a thumbnail creator, are you referring to server-side code?
 If so, what's your flavor? As far as an Ajax upload goes, Prototype doesn't
 like to do those without some kicking and screaming. I find that it's
 easiest to create an iframe and post through that. The only trick then is
 to send the message back to the outer page that the upload is complete.

 Walter

 On Jul 3, 2012, at 1:51 PM, Phil Petree 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 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] Scriptaculous draggable JS links

2012-05-15 Thread Phil Petree
Best guess would be versioning... but regardless, link to the modules off
of Google instead of locally.
On May 15, 2012 8:29 AM, Robert shimield robs...@hotmail.co.uk wrote:

 Hi

 Ref: http://madrobby.github.com/scriptaculous/draggable/

 My draggable script works fine when linking to script.aculo like so:
 script type=text/javascript src=http://script.aculo.us/prototype.js
 /script
 script type=text/javascript src=
 http://script.aculo.us/scriptaculous.js;/script

 But downloading the JS files and linking them locally it does not work:
 script type=text/javascript src=http://kuka/drag/prototype.js
 /script
 script type=text/javascript src=http://kuka/drag/scriptaculous.js
 /script

 Can anyone give me a hint why this is so?

 Many thanks,

 Robert Shimield
 Frimley Park Hospital

  --
 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/-/pW0DyDczMbUJ.
 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] Walter Lee Davis is now a moderator

2012-05-15 Thread Phil Petree
Couldn't have been a better choice!
On May 15, 2012 8:51 AM, T.J. Crowder t...@crowdersoftware.com wrote:

 Hi all,

 If you've been on the list for any time at all, you'll know Walter Lee
 Davis. :-)

 Walter was good enough to step forward to help with moderating the list,
 and we seem to have him up and running now (he's approved his first held
 message).

 So please say welcome and thank you to Walter!

 Thanks 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 view this discussion on the web visit
 https://groups.google.com/d/msg/prototype-scriptaculous/-/06WUrGFe6CYJ.
 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] how to center ajax spinning icon

2012-05-09 Thread Phil Petree
I had already tried that...  that set the spinner as the background image
for the page.  Spent two hours mucking around with it and had to move on to
something else.  Ill revist it later thus week.
On May 8, 2012 3:42 PM, Walter Lee Davis wa...@wdstudio.com wrote:

 Try splitting it apart.

background-color: rgba(0,0,0,0.7);
background-image: url(foo.gif);

 Also set a solid color for IE  8 or whatever version can't do rgba… Just
 set background-color: #777; before the one with the rgba color. Or, have a
 look here http://kilianvalkhof.com/2010/css-xhtml/how-to-use-rgba-in-ie/for 
 an IE-only filter attribute you can use in those browsers.

 Walter

 On May 8, 2012, at 12:10 PM, Phil Petree wrote:

  Thanks... i was just getting ready to try this...
 
  On Tue, May 8, 2012 at 11:39 AM, Walter Lee Davis wa...@wdstudio.com
 wrote:
  Sorry, make that position: fixed (brain fade). static means something
 else.
 
  Walter
 
  On May 8, 2012, at 11:03 AM, Walter Lee Davis wrote:
 
   One way to do this is to add an overlay to your page.
  
   div id=overlay/div
  
   #overlay {
 position: static;
 top: 0;
 right: 0;
 bottom: 0;
 left: 0;
 background: url(spinner.gif) rgba(0,0,0,0.7);
 z-index: 1000;
   }
  
   document.observe('dom:loaded',function(){ $('overlay).hide();});
  
   Then slave the show/hide to your Ajax methods, or use the technique
 outlined in the AjaxResponders docs to have one listener for all Ajax
 events: http://api.prototypejs.org/ajax/Ajax/Responders/
  
   Walter
  
   On May 8, 2012, at 10:54 AM, Phil Petree wrote:
  
   Lets say I have this div imbedded in my page:
   div id='systemWorking'img src='spinner.gif'Saving.../div
  
   And I have a list with 1000 entries and the user has scrolled down
 mid way... if I unhide the spinner using this:
  document.getElementById('inProgress').style.display = 'inline';
  
   It shows but it shows in the location where it's imbedded in the page
 (top, bottom etc.) but not necessarily viewable to the user.  I want to
 reposition the div so that its always centered in the screen.
  
   How does one go about this?
  
   Thanks,
  
   Pete
  
   --
   You received 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.

 --
 You received 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] how to center ajax spinning icon

2012-05-09 Thread Phil Petree
Awesome! Other than this, the UI portion of this feature set is done. I
have to finish off the engine today and tomorrow,  then Friday Ill do
this part.

And as usual, you're a gentleman and a scholar!!!

Pete
On May 9, 2012 10:21 AM, Walter Lee Davis wa...@wdstudio.com wrote:

 Here's an example. I realize I left a couple of points out of the CSS --
 background-position and repeat.

 http://scripty.walterdavisstudio.com/loading

 This page also demonstrates two different uses of the overlay technique.
 The first, as in a lightbox, is click to show, click on the overlay to
 hide. The second uses the Ajax.Responders.register method to hook all Ajax
 requests on the page with one behavior. (It also disables the
 click-to-close behavior for the duration, so it becomes a modal overlay.)

 Once this is hooked up, you could have dozens of separate Ajax functions
 running on this page, and each one would trigger the overlay while it was
 running. Note the use of defer inside these methods, you really need that
 in Firefox, maybe Safari, or the overlay will either never show, or never
 hide -- the page will just get stuck during the request.

 Walter

 On May 9, 2012, at 5:26 AM, Phil Petree wrote:

  I had already tried that...  that set the spinner as the background
 image for the page.  Spent two hours mucking around with it and had to move
 on to something else.  Ill revist it later thus week.

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



[Proto-Scripty] how to center ajax spinning icon

2012-05-08 Thread Phil Petree
Lets say I have this div imbedded in my page:
div id='systemWorking'img src='spinner.gif'Saving.../div

And I have a list with 1000 entries and the user has scrolled down mid
way... if I unhide the spinner using this:
document.getElementById('inProgress').style.display = 'inline';

It shows but it shows in the location where it's imbedded in the page (top,
bottom etc.) but not necessarily viewable to the user.  I want to
reposition the div so that its always centered in the screen.

How does one go about this?

Thanks,

Pete

-- 
You received 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] how to center ajax spinning icon

2012-05-08 Thread Phil Petree
Thanks... i was just getting ready to try this...

On Tue, May 8, 2012 at 11:39 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 Sorry, make that position: fixed (brain fade). static means something else.

 Walter

 On May 8, 2012, at 11:03 AM, Walter Lee Davis wrote:

  One way to do this is to add an overlay to your page.
 
  div id=overlay/div
 
  #overlay {
position: static;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(spinner.gif) rgba(0,0,0,0.7);
z-index: 1000;
  }
 
  document.observe('dom:loaded',function(){ $('overlay).hide();});
 
  Then slave the show/hide to your Ajax methods, or use the technique
 outlined in the AjaxResponders docs to have one listener for all Ajax
 events: http://api.prototypejs.org/ajax/Ajax/Responders/
 
  Walter
 
  On May 8, 2012, at 10:54 AM, Phil Petree wrote:
 
  Lets say I have this div imbedded in my page:
  div id='systemWorking'img src='spinner.gif'Saving.../div
 
  And I have a list with 1000 entries and the user has scrolled down mid
 way... if I unhide the spinner using this:
 document.getElementById('inProgress').style.display = 'inline';
 
  It shows but it shows in the location where it's imbedded in the page
 (top, bottom etc.) but not necessarily viewable to the user.  I want to
 reposition the div so that its always centered in the screen.
 
  How does one go about this?
 
  Thanks,
 
  Pete
 
  --
  You received 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] how to center ajax spinning icon

2012-05-08 Thread Phil Petree
I'm completely daft when it comes to css...

background: url(/images/working.gif) rgba(0,0,0,0.7);

Doesn't get loaded in the page in ie9.

On Tue, May 8, 2012 at 12:10 PM, Phil Petree phil.pet...@gmail.com wrote:

 Thanks... i was just getting ready to try this...


 On Tue, May 8, 2012 at 11:39 AM, Walter Lee Davis wa...@wdstudio.comwrote:

 Sorry, make that position: fixed (brain fade). static means something
 else.

 Walter

 On May 8, 2012, at 11:03 AM, Walter Lee Davis wrote:

  One way to do this is to add an overlay to your page.
 
  div id=overlay/div
 
  #overlay {
position: static;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(spinner.gif) rgba(0,0,0,0.7);
z-index: 1000;
  }
 
  document.observe('dom:loaded',function(){ $('overlay).hide();});
 
  Then slave the show/hide to your Ajax methods, or use the technique
 outlined in the AjaxResponders docs to have one listener for all Ajax
 events: http://api.prototypejs.org/ajax/Ajax/Responders/
 
  Walter
 
  On May 8, 2012, at 10:54 AM, Phil Petree wrote:
 
  Lets say I have this div imbedded in my page:
  div id='systemWorking'img src='spinner.gif'Saving.../div
 
  And I have a list with 1000 entries and the user has scrolled down mid
 way... if I unhide the spinner using this:
 document.getElementById('inProgress').style.display = 'inline';
 
  It shows but it shows in the location where it's imbedded in the page
 (top, bottom etc.) but not necessarily viewable to the user.  I want to
 reposition the div so that its always centered in the screen.
 
  How does one go about this?
 
  Thanks,
 
  Pete
 
  --
  You received 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] stupid checkbox question

2012-04-28 Thread Phil Petree
That's what I thought too... but adding CB to the I'd name fixed it.
On Apr 28, 2012 12:35 PM, T.J. Crowder t...@crowdersoftware.com wrote:

 On Friday, 27 April 2012 10:47:51 UTC+1, DaveK wrote:

  input type='checkbox' id='1'

 not a legal ID - must start with a letter


 That's no longer true as of HTML5, which in this case is just documenting
 what browsers already did:
 http://www.w3.org/TR/html5/elements.html#the-id-attribute

 It *was* true for HTML4, but browsers didn't care in terms of
 document.getElementById and such.

 Note that it's still true for CSS (#1 is an invalid selector), and
 browsers *do* care about that (e.g., with querySelectorAll and such):
 http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier

 So while HTML5 is very lax, if you're ever going to use CSS selectors to
 refer to the element, best to stick to the more restrictive CSS rules.

 FWIW,
 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msg/prototype-scriptaculous/-/waBN43eCc84J.
 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] stupid checkbox question

2012-04-27 Thread Phil Petree
Try it passing cb1 into a function as cbValue and then $(cbValue).checked...
On Apr 27, 2012 1:46 AM, Wojtek Zadora woj...@studioatrium.pl wrote:

 Well, I tested it and in my case having input type=checkbox name=1
 value=1 id=cb1

 console.log($('cb1').checked); - returns false
 console.log($('cb1').**readAttribute('checked')); - returns null

 While input type=checkbox name=2 value=2 id=cb2 checked=checked

 console.log($('cb2').checked); - returns true
 console.log($('cb2').**readAttribute('checked')); - returns checked

 -wz


  How do you get the checked state of a single checkbox?
 $('cbID').checked doesn't work...  also tried $F('cbID').checked
 in the following function, the alert comes back with undefined
 cdValue is the id of the checkbox...
 function saveChange(cbValue)
 {
  var strState;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;
  alert(cbState);
  if( cbState == checked  )
strState = checked;
  else
strState = unchecked;
 }
 --
 You received 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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://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 prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://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] stupid checkbox question

2012-04-27 Thread Phil Petree
Dang it... I knew it had to be something stpid!!!  LOL

Thanks!  Its 4a here, I'm gonna get some sleep.
On Apr 27, 2012 4:10 AM, Wojtek Zadora woj...@studioatrium.pl wrote:

  $(cbValue).checked returns boolean (true|false) and you compare it to
 string:

 if( cbState == checked  )

 simply

 strState = (cbState == true) ? checked : unchecked;

 -wz




  Try it passing cb1 into a function as cbValue and then
 $(cbValue).checked...
 On Apr 27, 2012 1:46 AM, Wojtek Zadora woj...@studioatrium.pl wrote:

 Well, I tested it and in my case having input type=checkbox name=1
 value=1 id=cb1

 console.log($('cb1').checked); - returns false
 console.log($('cb1').readAttribute('checked')); - returns null

 While input type=checkbox name=2 value=2 id=cb2
 checked=checked

 console.log($('cb2').checked); - returns true
 console.log($('cb2').readAttribute('checked')); - returns checked

 -wz


  How do you get the checked state of a single checkbox?
 $('cbID').checked doesn't work...  also tried $F('cbID').checked
 in the following function, the alert comes back with undefined
 cdValue is the id of the checkbox...
 function saveChange(cbValue)
 {
  var strState;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;
  alert(cbState);
  if( cbState == checked  )
strState = checked;
  else
strState = unchecked;
 }
 --
 You received 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.


-- 
You received 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] stupid checkbox question

2012-04-27 Thread Phil Petree
Well, that didn't work...

input type='checkbox' id='1' name='approved' onclick=saveChange(1);
checked='checked'/
select id='ajMode_1' name='mode' onchange=saveChange(1);
  option value='read_write' selected='selected'Send and Receive/option
  option value='read_only'Receive Only/option
/select

function saveChange(cbValue)
{
  var strSerialize;
  var strState;
  var strMode;
  var strSelectName = ajMode_ +cbValue;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;
  strState = (cbState == true) ? checked : unchecked;
  // get the value from the selected rw_mode
  strMode = $F(strSelectName);

  // serialize the data and send to the server for saving
  strSerialize = record= +cbValue +state= +strState +mode= +strMode;
  alert(strSerialize);   // always shows strState as unchecked
  autosave(strSerialize);   // make the ajax call
}



On Fri, Apr 27, 2012 at 4:10 AM, Wojtek Zadora woj...@studioatrium.plwrote:

  $(cbValue).checked returns boolean (true|false) and you compare it to
 string:


 if( cbState == checked  )

 simply

 strState = (cbState == true) ? checked : unchecked;

 -wz





  Try it passing cb1 into a function as cbValue and then
 $(cbValue).checked...
 On Apr 27, 2012 1:46 AM, Wojtek Zadora woj...@studioatrium.pl wrote:

 Well, I tested it and in my case having input type=checkbox name=1
 value=1 id=cb1

 console.log($('cb1').checked); - returns false
 console.log($('cb1').readAttribute('checked')); - returns null

 While input type=checkbox name=2 value=2 id=cb2
 checked=checked

 console.log($('cb2').checked); - returns true
 console.log($('cb2').readAttribute('checked')); - returns checked

 -wz


  How do you get the checked state of a single checkbox?
 $('cbID').checked doesn't work...  also tried $F('cbID').checked
 in the following function, the alert comes back with undefined
 cdValue is the id of the checkbox...
 function saveChange(cbValue)
 {
  var strState;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;
  alert(cbState);
  if( cbState == checked  )
strState = checked;
  else
strState = unchecked;
 }
 --
 You received 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.


-- 
You received 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] stupid checkbox question

2012-04-27 Thread Phil Petree
Dave, you're a gentleman and a scholar...

The id was irrelevant because in the original pass I was passing in
this.checked but then someone suggested we allow them to change the mode as
well so then I couldn't use this.checked with an onchange fired via a
select and by then it was wy to late into the wee hours to see what
was wrong.

Thanks!

On Fri, Apr 27, 2012 at 5:47 AM, Dave Kibble davekib...@gmail.com wrote:

 On 27 April 2012 09:12, Phil Petree phil.pet...@gmail.com wrote:
  Its 4a here, I'm gonna get some sleep.

 On 27 April 2012 10:04, Phil Petree phil.pet...@gmail.com wrote:
  Well, that didn't work...

 not enough sleep!

  input type='checkbox' id='1'

 not a legal ID - must start with a letter

  onclick=saveChange(1);

 1 is a number, '1' is a string


  function saveChange(cbValue)

 a better name for the parameter would be cbID


 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.



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



[Proto-Scripty] stupid checkbox question

2012-04-26 Thread Phil Petree
How do you get the checked state of a single checkbox?

$('cbID').checked doesn't work...  also tried $F('cbID').checked

in the following function, the alert comes back with undefined

cdValue is the id of the checkbox...

function saveChange(cbValue)
{
  var strState;
  var cbState;

  // get the value of the checkbox
  // we do it here incase this is called
  // from the onchange attached to the select
  cbState = $(cbValue).checked;
  alert(cbState);

  if( cbState == checked  )
strState = checked;
  else
strState = unchecked;
}

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



[Proto-Scripty] Tactical Advice: Many rows, one checkbox per row

2012-04-25 Thread Phil Petree
Hey All,

My need is to create a easy approval process for what could be a handful of
subscribers up to 1000's of subscribers.

The idea thus far is to create a table that has (and needs) only a few
columns of information:
RecordID (hidden)  |  Approved [checkbox]  |  Subscriber Name (read_only
text)  |  Subscriber City/State (read_only text)

refrain ad nausem 'x' times

What I want to do is to allow the user to CHECK/UNCHECK the check box and
that event will call an ajax function that will submit the RecordID and
Approved box[checked/unchecked]

I don't want to submit ALL rows, only the row that was just clicked.
I'm pretty sure the FormObserver is the wrong way to go
I'm pretty sure the $('approved').observe('change', xxx); isn't right
either as that could create 1000's of observers

I could do an onchange event for each checkbox... but if I do that, how do
I serialize two fields of data?

Advice please

Pete

-- 
You received 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] Tactical Advice: Many rows, one checkbox per row

2012-04-25 Thread Phil Petree
Funny, I had just figured out what you had suggested for getting rid of the
hidden field and making the record id the value.

The problem is that ONLY the checked items get passed... if someone is
unchecked their approval is revoked so I need to update the table for
that as well.

On Wed, Apr 25, 2012 at 12:18 PM, Brian Marquis br...@quotepro.com wrote:

 Why not get rid of the hidden field and assign the record id as the value
 of the checkboxes. When you submit the form (or serialize it) only the
 checked items will be passed to the server.

 For example:

 ** **

 input name=ApprovedSubscribers value=123 type=checkbox
 checked=checked/ Joe Cool

 input name=ApprovedSubscribers value=456 type=checkbox / Fred
 Flintstone

 input name=ApprovedSubscribers value=789 type=checkbox
 checked=checked / Barney Rubble

 ** **

 Becomes ApprovedSubscribers=123, 789 when submitted.

 ** **

 You can then observe the form for changes and submit via ajax with a
 normal form submit for graceful degradation.

 Brian Marquis | Quotepro® | Senior Developer | b...@quotepro.com | Phone: 
 312.654.8045
 x122 / Fax: 312.654.1285

 [image: image001]

 *The information in this e-mail is confidential and may be legally
 privileged.  It is intended solely for the addressee.   Access to this
 e-mail by anyone else is unauthorized.*

 ** **

 *From:* prototype-scriptaculous@googlegroups.com [mailto:
 prototype-scriptaculous@googlegroups.com] *On Behalf Of *Phil Petree
 *Sent:* Wednesday, April 25, 2012 10:39 AM
 *To:* prototype-scriptaculous@googlegroups.com
 *Subject:* [Proto-Scripty] Tactical Advice: Many rows, one checkbox per
 row

 ** **

 Hey All,

  

 My need is to create a easy approval process for what could be a handful
 of subscribers up to 1000's of subscribers.

  

 The idea thus far is to create a table that has (and needs) only a few
 columns of information:

 RecordID (hidden)  |  Approved [checkbox]  |  Subscriber Name (read_only
 text)  |  Subscriber City/State (read_only text)

  

 refrain ad nausem 'x' times

  

 What I want to do is to allow the user to CHECK/UNCHECK the check box and
 that event will call an ajax function that will submit the RecordID and
 Approved box[checked/unchecked]

  

 I don't want to submit ALL rows, only the row that was just clicked.

 I'm pretty sure the FormObserver is the wrong way to go

 I'm pretty sure the $('approved').observe('change', xxx); isn't right
 either as that could create 1000's of observers

  

 I could do an onchange event for each checkbox... but if I do that, how do
 I serialize two fields of data?

  

 Advice please

  

 Pete

  


  

  

  

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

image002.png

Re: [Proto-Scripty] Tactical Advice: Many rows, one checkbox per row

2012-04-25 Thread Phil Petree
I'm now wondering if the onchange event will allow me to set the value of
the hidden field BEFORE the form.observer fires the ajax call I'll test
that tomorrow... My thinking is that I'll set the value of a hidden field
to on/off and the name of the field to the record #.

On Wed, Apr 25, 2012 at 4:05 PM, Brian Marquis br...@quotepro.com wrote:

 Yes, that's the nature of checkboxes and radio buttons.  If you need the
 value submitted in all circumstances, then you're back to the hidden field
 implementation. Problem with that approach is that it won't work if the
 user has javascript disabled.

 ** **

 A few options for event listeners (untested):

 ** **

 $('tableid').observe('click',function(event) {

   var element = Event.element(event);

   if ( element.name ==  ApprovedSubscribers ) {

new Ajax.Request( url, $H({ RecordId: element.value, Checked:
 element.checked }));

 }

 });

 ** **

 Or

 ** **

 $$(input[type='checkbox']).invoke(observe,click,function(event) {***
 *

   var element = Event.element(event);

   if ( element.name ==  ApprovedSubscribers ) {

new Ajax.Request( url, $H({ RecordId: element.value, Checked:
 element.checked }));

 }

 });

 Brian Marquis | Quotepro® | Senior Developer | b...@quotepro.com | Phone: 
 312.654.8045
 x122 / Fax: 312.654.1285

 [image: image001]

 *The information in this e-mail is confidential and may be legally
 privileged.  It is intended solely for the addressee.   Access to this
 e-mail by anyone else is unauthorized.*

 ** **

 *From:* prototype-scriptaculous@googlegroups.com [mailto:
 prototype-scriptaculous@googlegroups.com] *On Behalf Of *Phil Petree
 *Sent:* Wednesday, April 25, 2012 2:01 PM
 *To:* prototype-scriptaculous@googlegroups.com
 *Subject:* Re: [Proto-Scripty] Tactical Advice: Many rows, one checkbox
 per row

 ** **

 Funny, I had just figured out what you had suggested for getting rid of
 the hidden field and making the record id the value.

  

 The problem is that ONLY the checked items get passed... if someone is
 unchecked their approval is revoked so I need to update the table for
 that as well.

 On Wed, Apr 25, 2012 at 12:18 PM, Brian Marquis br...@quotepro.com
 wrote:

 Why not get rid of the hidden field and assign the record id as the value
 of the checkboxes. When you submit the form (or serialize it) only the
 checked items will be passed to the server.

 For example:

  

 input name=ApprovedSubscribers value=123 type=checkbox
 checked=checked/ Joe Cool

 input name=ApprovedSubscribers value=456 type=checkbox / Fred
 Flintstone

 input name=ApprovedSubscribers value=789 type=checkbox
 checked=checked / Barney Rubble

  

 Becomes ApprovedSubscribers=123, 789 when submitted.

  

 You can then observe the form for changes and submit via ajax with a
 normal form submit for graceful degradation.

 Brian Marquis | Quotepro® | Senior Developer | b...@quotepro.com | Phone: 
 312.654.8045
 x122 / Fax: 312.654.1285

 [image: image001]

 *The information in this e-mail is confidential and may be legally
 privileged.  It is intended solely for the addressee.   Access to this
 e-mail by anyone else is unauthorized.*

  

 *From:* prototype-scriptaculous@googlegroups.com [mailto:
 prototype-scriptaculous@googlegroups.com] *On Behalf Of *Phil Petree
 *Sent:* Wednesday, April 25, 2012 10:39 AM
 *To:* prototype-scriptaculous@googlegroups.com
 *Subject:* [Proto-Scripty] Tactical Advice: Many rows, one checkbox per
 row

  

 Hey All,

  

 My need is to create a easy approval process for what could be a handful
 of subscribers up to 1000's of subscribers.

  

 The idea thus far is to create a table that has (and needs) only a few
 columns of information:

 RecordID (hidden)  |  Approved [checkbox]  |  Subscriber Name (read_only
 text)  |  Subscriber City/State (read_only text)

  

 refrain ad nausem 'x' times

  

 What I want to do is to allow the user to CHECK/UNCHECK the check box and
 that event will call an ajax function that will submit the RecordID and
 Approved box[checked/unchecked]

  

 I don't want to submit ALL rows, only the row that was just clicked.

 I'm pretty sure the FormObserver is the wrong way to go

 I'm pretty sure the $('approved').observe('change', xxx); isn't right
 either as that could create 1000's of observers

  

 I could do an onchange event for each checkbox... but if I do that, how do
 I serialize two fields of data?

  

 Advice please

  

 Pete

  


  

  

  

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

Re: [Proto-Scripty] Confused on setValue encoding

2012-03-05 Thread Phil Petree
just use: $('var_name').value = form_data_you_want;


On Sun, Mar 4, 2012 at 8:01 PM, kstubs kst...@gmail.com wrote:

 Does setValue() encode in anyway the value you set on a form input?
  Specifically, I am setting a hidden form element.
 I seem to be getting mixed results and I have both encoded and non-encoded
 values to test with.  I am getting inconsistent results.

 When I invoke submit(), is there an encoding occurring?  I'm a little
 confused.

 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/-/E45p2JDfyK8J.
 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] Confused on setValue encoding

2012-03-05 Thread Phil Petree
$().value = is working across all browsers and versions on my site
On Mar 5, 2012 10:19 AM, kstubs kst...@gmail.com wrote:

 Is this supported across all the browsers?  I'm still hoping to get some
 input on the setValue method and the encoding that takes place behind the
 sheets.  I'd like to use this method and don't understand the behavior.

 Karl..

 On Monday, March 5, 2012 1:28:27 AM UTC-7, ppetree wrote:

 just use: $('var_name').value = form_data_you_want;


 On Sun, Mar 4, 2012 at 8:01 PM, kstubs kst...@gmail.com wrote:

 Does setValue() encode in anyway the value you set on a form input?
  Specifically, I am setting a hidden form element.
 I seem to be getting mixed results and I have both encoded and
 non-encoded values to test with.  I am getting inconsistent results.

 When I invoke submit(), is there an encoding occurring?  I'm a little
 confused.

 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/-/**E45p2JDfyK8Jhttps://groups.google.com/d/msg/prototype-scriptaculous/-/E45p2JDfyK8J
 .
 To post to this group, send email to prototype-scriptaculous@**
 googlegroups.com prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to prototype-scriptaculous+**
 unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at http://groups.google.com/**
 group/prototype-scriptaculous?**hl=enhttp://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/-/DFeV9Sfw1FkJ.
 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] cant quite figure out how to process multiple forms to one processing script.

2012-02-03 Thread Phil Petree
Mobile phone answer: You can't have multiple forms with the same name on
the same page.
On Feb 3, 2012 6:17 AM, Thats Broken thats.bro...@gmail.com wrote:

 I have a case where i have a form repeated several times on a page,
 the goal is to be able to submit each form independently, using unique
 values for each submit button and unique form id's.

 However, when I submit the first form, it does what i expect; all
 remaining forms dont work.

 Is there a way to submit multiple forms to the same processing script
 using the same names but unique values on each form input fields?

 If this isnt an appropriate forum for such questions, forgive me, a
 suggestion on where else to look would be appreciated.

 thanks in advance,
 -jc

 --
 You received 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 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 james.hargrea...@gmail.com
wrote:

 I wish I had time to commit...

 Apple, fancy sponsoring?!

 On 6 Jan 2012, at 19:09, T.J. Crowder t...@crowdersoftware.com wrote:

  Hi,
 
  On Jan 6, 12:49 pm, James Hargreaves james.hargrea...@gmail.com
  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] Status of prototype

2012-01-06 Thread Phil Petree
Last I heard was the developer said it was still active but on a catch as
catch can basis and then several other comments said it was dead.  I have
seen no forward movement so my plan became to continue using it as long as
its still working but all new code is developed with an eye towards moving
to another platform.



On Fri, Jan 6, 2012 at 7:49 AM, James Hargreaves james.hargrea...@gmail.com
 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

 --
 You received 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 lily.o...@gmail.com 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 phil.pet...@gmail.com wrote:
  I would try using a later version of proto on just that page.
  On Dec 15, 2011 1:43 PM, web_dev_ajax lily.o...@gmail.com 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] IE8 + Prototype AJAX = HTTP Status 12019

2011-12-15 Thread Phil Petree
I would try using a later version of proto on just that page.
On Dec 15, 2011 1:43 PM, web_dev_ajax lily.o...@gmail.com 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.



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 vkhomyac...@gmail.com wrote:

 1. Declaration with value assignment
 2. Declare loop variables and cache length inside of for() - this can
 increase performance http://jsperf.com/caching-array-length/67 -
 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: 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, cilsil...@gmail.com wrote:

 I think android specified by Joe still †ђξ production options Jimmy.
 Sent from my BlackBerry wireless device from MTN

 -Original Message-
 From: joe t. thooke...@gmail.com
 Sender: prototype-scriptaculous@googlegroups.com
 Date: Fri, 18 Nov 2011 18:44:58
 To: Prototype  script.aculo.usprototype-scriptaculous@googlegroups.com
 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. thooke...@gmail.com 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 isu...@gmail.com 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: 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 t...@crowdersoftware.com 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 jazz...@gmail.com 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]
  html
  head
  titlef1/title
  script type=text/javascript
  if (!window.XMLHttpRequest) {
window.XMLHttpRequest = function() {
  return new ActiveXObject('Microsoft.XMLHTTP');
}}
 
  /script
  script type=text/javascript src=prototype.js/script
  script type=text/javascript
  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=6680prg=menuframe=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);
  },
  });
 
  }
 
  /script
  /head
  body
  div id=cartnamePlease select a cart./div
  input type=hidden id=toggleval name=toggleval value=yes
  /body
  /html
  [/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: 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 vkhomyac...@gmail.com 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 form name=... in your
 example, but *name* attribute is obsolete for *form* tag in XHTML1.0, or
 maybe you have *nbsp;* 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] Rant - IE7 Sucks

2011-10-26 Thread Phil Petree
I'm not sure I understand, tell us again how you REALLY feel about IE7! LOL
On Oct 25, 2011 11:23 AM, kstubs kst...@gmail.com wrote:

 I have spent days now (more than days really) trying to get my code to work
 in IE7.  I'm about to say, * screw it, IE7 not supported *.  I can't begin
 to explain how/when/why the problem, and am not seeking help, I'm just
 ranting.

 I feel better now..

 --
 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/-/asqT-Hh8WssJ.
 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:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
And the serialize failed.

I changed several things:
The doctype now reads:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
Which in and of itself did NOT fix the problem.

So I forced compatibility mode using:
meta http-equiv=X-UA-Compatible content=IE=8 /

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 colin.f...@pace.com 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.



[Proto-Scripty] Form.Serialize returning nada

2011-10-24 Thread Phil Petree
Hey All,

Wierdness...  I've not seen this before and I swear on my grandma's knickers
this was working!

function dofill(url) {
  var options = {
method: 'post',
parameters: $('myform').serialize(),
onSuccess: fill_in,
onFailure: ajax_err,
on0: ajax_err
  };
  new Ajax.Request( url+.php, options );
}

The form header looks like this:
form name='anisForm' id='myform' action='users' method='post'
input type='hidden' id='ajStatus' name='status' value=''
input type='hidden' id='ajRecord' name='record' value='?php echo
$_SESSION['userid']; ?'
The form is NOT disabled and it has several hidden fields with data but when
I inspect options before the call parameters is  and when I verify/inspect
the $_POST variable in php it's essentially empty...

Any clues as to why this would not work (or stop working)?

BTW, I'm using 1.6.1

Thanks!

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



Re: [Proto-Scripty] Silly Question

2011-10-11 Thread Phil Petree
I'm with you Richard.

I have a hidden div that loads the spinner and in the AJAX onCreate I
disable the form and unhide the div while in the  onComplete I hide the div
and enable the form.

What I have found is that if the AJAX call starts and completes quickly then
the spinner never gets displayed as the browser is smart enough not to do
a repaint if not needed.

On Tue, Oct 11, 2011 at 7:12 AM, Richard Quadling rquadl...@gmail.comwrote:

 On 11 October 2011 00:04, nelian i...@myskills.co.za wrote:
  I am somewhat new to AJAX, but one thing that I have not touch upon is
  the following -
 
  When my App is making an AJAX call, from the users perspective it
  seems to be doing nothing, how does one go about freezing the page
  (Not sure what else to call it) and indicate to the user that
  something is happening?
  (I have seen it on a couple of sites, but cannot seem to find an
  example at the moment)
 
  Thanks in advance for the help
 
  Ian
 
  --
  You received 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.
 
 

 I use the Ajax.Responders
 (http://api.prototypejs.org/ajax/Ajax/Responders/) to allow me to
 handle the creation and completion of all AJAX requests.

 In my requests, I fade in a little spinner image after 0.25s. It fades
 out on completion.

 So, if the request is handled in handled in under 0.25s, then no spinner.

 This seems to work quite well for me.

 --
 Richard Quadling
 Twitter : EE : Zend : PHPDoc
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

 --
 You received 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] Image cache problem with Ajax

2011-09-30 Thread Phil Petree
I never meant to imply that onComplete did the same thing as onSuccess, what
I meant to state was that onComplete ALWAYS gets called last.  onSuccess can
always set a flag and onComplete can do the UI updates right before turning
off the spinner.   This is useful if you're experiencing those
asynchronicity problems that the OP thought he had...  Almost a poor mans
semaphore manager.

On Fri, Sep 30, 2011 at 7:53 AM, Chris Sansom ch...@highway57.co.uk wrote:

 On 30 Sep 2011, at 12:32, Richard Quadling wrote:

  onFailure / onSuccess is in response to a working result from the AJAX
 call.
 
  onComplete is in response to the AJAX mechanism shutting down.
 
  onComplete will always be called, but it isn't its job to deal with
  the data from the call. That is onSuccess. If the call failed for some
  reason, onComplete wouldn't have any data to work with and could make
  things worse.
 
  I use onCreate and onComplete to turn on/off a little spinner showing
  that the app is doing something behind the scenes.

 Right - thanks. That could be useful.

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

 --
 You received 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] Image cache problem with Ajax

2011-09-29 Thread Phil Petree
This is an interesting problem... my first reaction is that you'd want
to use onComplete to update the div's instead of onSuccess.

Test this with a couple of alerts and see which one gets called first and
which is last (just as onCreate is the first call, onComplete is the last).

To my way if thinking, if you wait until onComplete gets triggered before
you do any UI updates, all the images on the server should be properly in
place.

On Thu, Sep 29, 2011 at 12:15 PM, Richard Quadling rquadl...@gmail.comwrote:

 On 29 September 2011 16:58, Chris Sansom ch...@highway57.co.uk wrote:
  On 29 Sep 2011, at 15:51, Richard Quadling wrote:
 
  Does ALL the JS work take place inside the onSuccess callback?
 
  The Back in JS bit has to be part of the onSuccess callback
  otherwise it will happen out of sequence. The A in AJAX is potentially
  the hiccough here.
 
  That's what I suspected but yes, all the 'back in JS' stuff does indeed
 happen in the onSuccess. (I also tried onComplete, but got the same result.)
 I think the problem may be that the div, inevitably, is replaced right at
 the end of the process (at the end of the onSuccess), and only then is the
 offending img tag unleashed, calling either the image itself or my little
 php script... but then I'd have thought preloading it might help, but it
 doesn’t seem to. I also tried loading it via a php exec() call to the image
 script in advance of returning the output string to JS, but that didn’t
 help.
 
  What also convinces me that you're right about the A in AJAX is that
 when, for testing, I put a sleep(5) in the image script - which should hold
 it up by a whole 5 seconds - the div is still replaced immediately. When I
 first load the page (which also calls this script), I get a broken image
 icon where the image should have been, replaced after 5 seconds by the
 image, but when the div is replaced by the ajax call that doesn’t happen - I
 just get no change of image as before.
 
  It really would be /so/ nice if I could get this working! It's for a
 password-protected CMS, so the world at large will never get the benefit,
 and I could simply reload the whole page instead of just the one div, but
 it's become a challenge!

 Create a test case where it goes wrong. Write new clean code that
 doesn't want/need/use anything from the main project.

 At best, this will be a small HTML page with some divs and images, a
 JS file to allow the onclick to fire the AJAX code, along with the
 onsuccess and the server side code to handle the request and to return
 the new HTML markup.


 Without seeing the server and client side code, you are going to be
 stuck with a limited level of support.

 If you can't reduce the problem to something that can be read, I doubt
 anyone can realistically provide any more ideas on this.


 --
 Richard Quadling
 Twitter : EE : Zend : PHPDoc
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

 --
 You received 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] Image cache problem with Ajax

2011-09-29 Thread Phil Petree
I didnt address the caching because I had to look to see if I could find
where I had saved this link off the last time I had this problem... found
it!

The caching is probably on the browser side, not the server side.  Setting
the server side cache variables will only affect the page reload.

The browser knows better than to cache on refresh/reload BUT technically, to
the browser, you are not reloading and since the image has the same name it
doesn't really know that you need a refresh.

This guy had a solution that worked for me:
http://www.irt.org/script/416.htm

I have also used the cheap trick of adding a random query string on to the
end of the image url:
http://www.somedomain.com/images/newname.jpg?id=random_number and since this
will always generate a new url, the browser will refresh the image.


On Thu, Sep 29, 2011 at 1:04 PM, Phil Petree phil.pet...@gmail.com wrote:

 This is an interesting problem... my first reaction is that you'd want
 to use onComplete to update the div's instead of onSuccess.

 Test this with a couple of alerts and see which one gets called first and
 which is last (just as onCreate is the first call, onComplete is the last).

 To my way if thinking, if you wait until onComplete gets triggered before
 you do any UI updates, all the images on the server should be properly in
 place.

 On Thu, Sep 29, 2011 at 12:15 PM, Richard Quadling rquadl...@gmail.comwrote:

 On 29 September 2011 16:58, Chris Sansom ch...@highway57.co.uk wrote:
  On 29 Sep 2011, at 15:51, Richard Quadling wrote:
 
  Does ALL the JS work take place inside the onSuccess callback?
 
  The Back in JS bit has to be part of the onSuccess callback
  otherwise it will happen out of sequence. The A in AJAX is potentially
  the hiccough here.
 
  That's what I suspected but yes, all the 'back in JS' stuff does indeed
 happen in the onSuccess. (I also tried onComplete, but got the same result.)
 I think the problem may be that the div, inevitably, is replaced right at
 the end of the process (at the end of the onSuccess), and only then is the
 offending img tag unleashed, calling either the image itself or my little
 php script... but then I'd have thought preloading it might help, but it
 doesn’t seem to. I also tried loading it via a php exec() call to the image
 script in advance of returning the output string to JS, but that didn’t
 help.
 
  What also convinces me that you're right about the A in AJAX is that
 when, for testing, I put a sleep(5) in the image script - which should hold
 it up by a whole 5 seconds - the div is still replaced immediately. When I
 first load the page (which also calls this script), I get a broken image
 icon where the image should have been, replaced after 5 seconds by the
 image, but when the div is replaced by the ajax call that doesn’t happen - I
 just get no change of image as before.
 
  It really would be /so/ nice if I could get this working! It's for a
 password-protected CMS, so the world at large will never get the benefit,
 and I could simply reload the whole page instead of just the one div, but
 it's become a challenge!

 Create a test case where it goes wrong. Write new clean code that
 doesn't want/need/use anything from the main project.

 At best, this will be a small HTML page with some divs and images, a
 JS file to allow the onclick to fire the AJAX code, along with the
 onsuccess and the server side code to handle the request and to return
 the new HTML markup.


 Without seeing the server and client side code, you are going to be
 stuck with a limited level of support.

 If you can't reduce the problem to something that can be read, I doubt
 anyone can realistically provide any more ideas on this.


 --
 Richard Quadling
 Twitter : EE : Zend : PHPDoc
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

 --
 You received 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: Image cache problem with Ajax

2011-09-29 Thread Phil Petree
Walter, you're right that's generally all that's needed but since one img
name would stay the same the browser would look in cache first and not
reload the image... which is what he's experiencing.
On Sep 29, 2011 9:39 PM, Walter Lee Davis wa...@wdstudio.com wrote:
 What I have done in the past is to simply update the src attribute of the
image. The result is immediate and doesn't suffer from any cache issues.

 Walter

 On Sep 29, 2011, at 8:58 PM, ncubica wrote:

 i know you resolve your problem but It wont be easy if you delete from
 the dom the img / tag storing the actual images then... create new
 new Images() append to the div and finally add a query cheat link???
 just a shot...

 best
 ncubica...

 On 29 sep, 13:28, Phil Petree phil.pet...@gmail.com wrote:
 I didnt address the caching because I had to look to see if I could find
 where I had saved this link off the last time I had this problem...
found
 it!

 The caching is probably on the browser side, not the server side.
Setting
 the server side cache variables will only affect the page reload.

 The browser knows better than to cache on refresh/reload BUT
technically, to
 the browser, you are not reloading and since the image has the same name
it
 doesn't really know that you need a refresh.

 This guy had a solution that worked for me:
http://www.irt.org/script/416.htm

 I have also used the cheap trick of adding a random query string on to
the
 end of the image url:
http://www.somedomain.com/images/newname.jpg?id=random_numberand since this
 will always generate a new url, the browser will refresh the image.







 On Thu, Sep 29, 2011 at 1:04 PM, Phil Petree phil.pet...@gmail.com
wrote:
 This is an interesting problem... my first reaction is that you'd want
 to use onComplete to update the div's instead of onSuccess.

 Test this with a couple of alerts and see which one gets called first
and
 which is last (just as onCreate is the first call, onComplete is the
last).

 To my way if thinking, if you wait until onComplete gets triggered
before
 you do any UI updates, all the images on the server should be properly
in
 place.

 On Thu, Sep 29, 2011 at 12:15 PM, Richard Quadling rquadl...@gmail.com
wrote:

 On 29 September 2011 16:58, Chris Sansom ch...@highway57.co.uk
wrote:
 On 29 Sep 2011, at 15:51, Richard Quadling wrote:

 Does ALL the JS work take place inside the onSuccess callback?

 The Back in JS bit has to be part of the onSuccess callback
 otherwise it will happen out of sequence. The A in AJAX is
potentially
 the hiccough here.

 That's what I suspected but yes, all the 'back in JS' stuff does
indeed
 happen in the onSuccess. (I also tried onComplete, but got the same
result.)
 I think the problem may be that the div, inevitably, is replaced right
at
 the end of the process (at the end of the onSuccess), and only then is
the
 offending img tag unleashed, calling either the image itself or my
little
 php script... but then I'd have thought preloading it might help, but
it
 doesn’t seem to. I also tried loading it via a php exec() call to the
image
 script in advance of returning the output string to JS, but that
didn’t
 help.

 What also convinces me that you're right about the A in AJAX is that
 when, for testing, I put a sleep(5) in the image script - which should
hold
 it up by a whole 5 seconds - the div is still replaced immediately.
When I
 first load the page (which also calls this script), I get a broken
image
 icon where the image should have been, replaced after 5 seconds by the
 image, but when the div is replaced by the ajax call that doesn’t
happen - I
 just get no change of image as before.

 It really would be /so/ nice if I could get this working! It's for a
 password-protected CMS, so the world at large will never get the
benefit,
 and I could simply reload the whole page instead of just the one div,
but
 it's become a challenge!

 Create a test case where it goes wrong. Write new clean code that
 doesn't want/need/use anything from the main project.

 At best, this will be a small HTML page with some divs and images, a
 JS file to allow the onclick to fire the AJAX code, along with the
 onsuccess and the server side code to handle the request and to return
 the new HTML markup.

 Without seeing the server and client side code, you are going to be
 stuck with a limited level of support.

 If you can't reduce the problem to something that can be read, I doubt
 anyone can realistically provide any more ideas on this.

 --
 Richard Quadling
 Twitter : EE : Zend : PHPDoc
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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

Re: [Proto-Scripty] Re: Prototype's evolution

2011-09-02 Thread Phil Petree
I'm going to violate one of my personal rules about responding to posts when
I have had a glass or two of wine (or, in this case, margharitas):

What has been sticking in my head from Andrews response are these two
phrases (in quotes):

 Prototype's development over the past few years has been typified by a
 few months of inactivity, then a furious week of activity,* and I doubt
 that will change anytime soon*.


 So don't read anything into the periods of inactivity. *I don't have
 any plans to stop working on Prototype*.

What I read in to this is that Andrew has said he is not planning on
ceasing development anytime soon BUT plans change and when something else
takes his attention away, then development will cease.

Now, it could be like my own forms generator... I don't write code for it
every day.  In fact I only upgrade it or fix a bug when I need a new feature
or I find a bug (no one else has reported any).  If that's the case then I
understand but then I might use my form generator to crank out a few forms
but I wouldnt build a business that depended on my supporting that product
for the next 'x' years.

I think what I and others were looking for was some form of commitment... a
commitment to moving the community forward was a commitment to prototypes
future and I am left with the feeling that prototypes future is uncertain.

Andrew, this isn't a personal attack, I just need to speak frankly and
honestly because I personally own my own sites and I write the code behind
them.  If I invest tons of time in a framework like prototype then I am
hitching my star to yours.  If you quit working on prototype then I am left
with some major rewrites and those rewrites are not trivial and in one case
could cost lives.

I am still left not knowing which way to turn.

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



Re: [Proto-Scripty] help needed.

2011-08-21 Thread Phil Petree
They are using a script called simple-slide-show.js which is a rewrite of
someone elses script.

http://www.deepbluesky.com/blog/-/simple-slide-show-for-prototype-scriptaculous_38/



On Sat, Aug 20, 2011 at 11:09 AM, omer omerjaw...@gmail.com wrote:

 hi
 I really like scriptaclusous and I see it in this website
 http://www.dwrga.com/
 as a content slider.I want to do the same but I don't know what to do?
 what file I do need? some instruction will be appreciated.

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



-- 
You received 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 evolution

2011-08-18 Thread Phil Petree
I believe this is the 3rd time this subject has been brought up in the past
year and, to my knowledge, devs have made no comment nor provided any
direction so, as they say, no answer is an answer!

On Thu, Aug 18, 2011 at 1:20 PM, shellster shellsterd...@gmail.com wrote:

 Well written.

 As an opensource developer (aside from my day job), I am aware of the
 danger of caring too much about what the user thinks.
 I am also aware of the potential dangers of forking a project.

 What I want is some sort of answer from the Prototype devs on how they
 want the community to pitch in.  Do they want us to develop our own
 plugin websites, or do they want us to create an interface for their
 main site?  Do they want to develop it?  Do they want us to develop a
 comprehensive library as an extension of Prototype or as part of
 Prototype?  Will they ever official endorse such efforts (assuming
 certain obvious caveats)?  Unfortunately, it seems that the devs don't
 care to provide any feedback on any of these issues.  I am not
 expecting anything more from the devs, but as a matter of courtesy I
 would like them to explain how they would like us to get involved
 instead of users just doing their own thing.

 Also, the answer of submit a patch for consideration doesn't really
 cut it in this case, because I've personally seen patches never get
 acknowledged, let alone get added.  I've yet to see a patch get
 added.  Users aren't going to waste their time writing and cleaning up
 code, if there's not at least a good chance of their patch being
 considered.

 In short PrototypeJS needs to address these questions before the
 project either falls into disuse or the users take matters into their
 own hands and strike out willy-nilly and fully fork the project.



 On Aug 17, 8:04 am, Phil Petree phil.pet...@gmail.com wrote:
  This is the same old discussion that's been going on for months and I
 wonder
  if it will ever get resolved to the satisfaction of those of us who use
 the
  tool to enhance our sites.
 
  From what I can tell, there seems to be an uber-geek philosophy of make
 it
  better and they will come and, to a degree that's correct. The problem
 is,
  history is filled with technically superior products that ultimately
 failed
  because of poor marketing and/or not listening to their users (betamax vs
  vhs and myspace vs facebook for two glowing examples).
 
  My fear is that prototype will ultimately face the same fate...  be a
  technically superior product with a few guys pitching in and carrying the
  weight (anyone who follows this feed knows who the guys are who always
 pitch
  in with an answer) while marketing, support, easy access to developed
 libs
  and all the other goodies go ignored which causes adoption of the product
 to
  dwindle because these things exist on another platform.
 
  Why is this important?  I have a buddy that has a very successful site
  written in cold fusion, he developed the site just to familiarize himself
  with the language.  Turns out, the site took off, he quit is day job, ran
  the site, and recently got a contract for heaps and tons of $$$ for the
  site.  The catch?  He has to rewrite the site in either .php or .net
 because
  the buyer won't take it as a CF site.
 
  Does anyone want to end up with a site that, when its time to sell, will
 be
  told, that's all great but we're a jquery shop so you have to get rid of
  prototype... nobody uses that anymore!
 
  From a product standpoint, I'm sure the developers have their hands full
 and
  they do a really great job delivering a product that, for the most
  part, takes us away from browser level coding in a reliable and
 consistent
  manner. Personally, I am extremely appreciative of their efforts and I
 hope
  they keep up the good work!
 
  We all know what the but is... But I do think they need to set some
  community direction and allow the product to grow.
 
 
 
 
 
 
 
  On Wed, Aug 17, 2011 at 8:11 AM, shellster shellsterd...@gmail.com
 wrote:
   I'm seriously considering building my own site to start adding things
   like community documentation, additions to prototype, and plug-ins.
   While the Prototype Dev's certainly don't owe me anything, I've been
   pretty disappointed in there response time to user requests and even
   submitted patches.  I think if someone were to essentially fork the
   project (me), but still give prototype all the credit it deserves, it
   might be the best thing for the community.  If I could generate enough
   community buzz, and add a bunch of well written features to prototype,
   perhaps then, the devs would start pulling some of the changes back
   into prototype's core.
 
   On Aug 13, 4:43 pm, Cantrelle Vincent vcantre...@gmail.com wrote:
Hi all,
 
I'm happy to see that the topic is not dead and that some ideas are
coming out ...
(too much work sometimes)
 
@Sander: maybe I'm missing something (sorry in this case), but do you
have finally any

Re: [Proto-Scripty] Re: Prototype's evolution

2011-08-17 Thread Phil Petree
This is the same old discussion that's been going on for months and I wonder
if it will ever get resolved to the satisfaction of those of us who use the
tool to enhance our sites.

From what I can tell, there seems to be an uber-geek philosophy of make it
better and they will come and, to a degree that's correct. The problem is,
history is filled with technically superior products that ultimately failed
because of poor marketing and/or not listening to their users (betamax vs
vhs and myspace vs facebook for two glowing examples).

My fear is that prototype will ultimately face the same fate...  be a
technically superior product with a few guys pitching in and carrying the
weight (anyone who follows this feed knows who the guys are who always pitch
in with an answer) while marketing, support, easy access to developed libs
and all the other goodies go ignored which causes adoption of the product to
dwindle because these things exist on another platform.

Why is this important?  I have a buddy that has a very successful site
written in cold fusion, he developed the site just to familiarize himself
with the language.  Turns out, the site took off, he quit is day job, ran
the site, and recently got a contract for heaps and tons of $$$ for the
site.  The catch?  He has to rewrite the site in either .php or .net because
the buyer won't take it as a CF site.

Does anyone want to end up with a site that, when its time to sell, will be
told, that's all great but we're a jquery shop so you have to get rid of
prototype... nobody uses that anymore!

From a product standpoint, I'm sure the developers have their hands full and
they do a really great job delivering a product that, for the most
part, takes us away from browser level coding in a reliable and consistent
manner. Personally, I am extremely appreciative of their efforts and I hope
they keep up the good work!

We all know what the but is... But I do think they need to set some
community direction and allow the product to grow.

On Wed, Aug 17, 2011 at 8:11 AM, shellster shellsterd...@gmail.com wrote:

 I'm seriously considering building my own site to start adding things
 like community documentation, additions to prototype, and plug-ins.
 While the Prototype Dev's certainly don't owe me anything, I've been
 pretty disappointed in there response time to user requests and even
 submitted patches.  I think if someone were to essentially fork the
 project (me), but still give prototype all the credit it deserves, it
 might be the best thing for the community.  If I could generate enough
 community buzz, and add a bunch of well written features to prototype,
 perhaps then, the devs would start pulling some of the changes back
 into prototype's core.

 On Aug 13, 4:43 pm, Cantrelle Vincent vcantre...@gmail.com wrote:
  Hi all,
 
  I'm happy to see that the topic is not dead and that some ideas are
  coming out ...
  (too much work sometimes)
 
  @Sander: maybe I'm missing something (sorry in this case), but do you
  have finally any answer (from Prototype's side) concerning your email
  your decribed on th 20 Jul ?
 
  Regards
  Vinc.

 --
 You received 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] how to implement move/shift left/right effect

2011-08-10 Thread Phil Petree
I looked at that once for a project I was working on.. they weren't really
shifting left/right what they were doing was inserting a new listbox to the
right of the previous box.

So:  listbox A has the drives and you click on one, you then insert another
listbox B to the right of A and then use an ajax call to populate listbox B
with the files/folders on the clicked drive.  When you click on a folder in
listbox B you insert listbox C to the right of B and so on and so on...

That was the problem with the implementation I saw, you could have 10
listboxes and the screen got too crowded.  I suppose though, that now that I
have a minisucle of experience that one could always place the listboxes in
a carosel so that only 3 were shown at once.

On Wed, Aug 10, 2011 at 6:14 AM, Dmitry Trunikov
dmitry.truni...@gmail.comwrote:

 Dear colleagues,

 At
 https://github.com/sstephenson/prototype/tree/2a6914089ad6f0b398d9f4ef7032e6bab818dd51
 I've seen spectacular effect when pane with list of directories/files
 effectively shifted left/right during navigation between directories.
 Can you give me a clue how it can be implemented with Prototype 1.6.X
 and script.aculo.us?

 Thanks,
 Dmitry

 --
 You received 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] Ajax onchange select

2011-07-30 Thread Phil Petree
I have found that you have to use post AND serialize your data in order to
get it to work.

function dofill(url) {
  var options = {
method: 'post',
parameters: $('myform').serialize(),  // just serialize for the one item
onSuccess: fill_in,
onFailure: ajax_err,
on0: ajax_err
  };
  new Ajax.Request( http://0.0.0.0:3000/, options );


On Sat, Jul 30, 2011 at 11:53 AM, emygdio rodrigo.emyg...@gmail.com wrote:

 Hi,

   I have a script that takes the value of selected option in a form,
 and makes a request ajax to a rails application. The ideia  will be
 make a  ajax request and return a option string to populate a select.
 At this moment I just made some tests,  when the prototype makes a
 ajax request, this request wasn't made with post method. And the rails
 didn't understood the method used by request, as you can see bellow:

 The script:
 pre
 script type=text/
 javascript
   // we will add our javascript code here
var SelectSubCat = Class.create();
SelectSubCat.prototype = {
initialize: function(select){
this.category = $(select);
this.category.onchange =
 this.request_ajax.bindAsEventListener(this);
},

request_ajax: function(e){
new Ajax.Request(http://0.0.0.0:3000/
 search_sub_cat_and_return_option_to_select.json, {

  method: 'post',

  parameters: {id: this.category.value},

 onSuccess: function(transport){

var json = transport.responseText.evalJSON();

}
});
alert(json);
}
  };




  /script
 form
select name=cat id=cat size=0
option value=54 Academia/option
option value=54 Restaurante/option
option value=54 Bares/option
/select
select name=sub id=sub
option value=--  Selecione Sub
 Categorias --/otion
/select
  /form
 /pre

 When the request was made with the ajax, the following message I see
 in the console:

 Started OPTIONS /search_sub_cat_and_return_option_to_select.json for
 127.0.0.1 at Sat Jul 30 12:05:54 -0300 2011
 DEPRECATION WARNING: You are using the old router DSL which will be
 removed in Rails 3.1. Please check how to update your routes file at:
 http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/.
 (called from /home/emygdio/Documentos/Projetos/GuiaDF/
 ws_guia_comercial_df/config/routes.rb:1)

 ActionController::RoutingError (No route matches /
 search_sub_cat_and_return_option_to_select.json):


 I made some test with another form post, to test the request to rails
 as you can see bellow:
 form action=http://0.0.0.0:3000/
 search_sub_cat_and_return_option_to_select.json method='post'
select name=id id=cat size=0
option value=54 Academia/option
option value=54 Restaurante/option
option value=54 Bares/option
/select
input type=submit
  /form


 And  the result in console was:

 Started POST /search_sub_cat_and_return_option_to_select.json for
 127.0.0.1 at Sat Jul 30 12:18:31 -0300 2011
  Processing by
 CatK2ItemController#search_sub_cat_and_return_option_to_select as JSON
  Parameters: {id=54}
  CatK2Item Load (0.1ms)  SELECT `gdf_k2_categories`.* FROM
 `gdf_k2_categories` WHERE `gdf_k2_categories`.`parent` = 54
 [{option:'option value='669'Auditores /optionoption
 value='670'Contabilidade - Escritórios /option'}]
 Completed 200 OK in 21ms (Views: 4.1ms | ActiveRecord: 0.1ms)


 As can you see the rails understands properly the request, but the
 ajax request didn't made the request with the correct method.
 How Can I fix this?

 Thanks

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



-- 
You received 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 evolution

2011-07-26 Thread Phil Petree
The core devs need to appoint a Community Activist whose responsibility it
is to build the community and who has the decision making authority to
implement these changes without bugging the devs with all our needs.

On Tue, Jul 26, 2011 at 1:42 PM, Jason jwestbr...@gmail.com wrote:


 So based on a handful of responses - there would be a benefit to
 having margins - but we still need a blessing from the core devs to
 either give the right people access or to start implementing it.

 Any of the Prototype Devs out there?


 On Jul 25, 11:31 am, Tom Gregory tagreg...@gmail.com wrote:
  Plus one from me too.
 
  I agree there should be an easy way for writing in the margins (as
  Walter put it). I wouldn't encourage allowing those pages to be used
  for help requests (which could get overwhelming for a reader to slog
  through), but like the php.net docs, neat solutions and gotchas
  related to the page's topic. Good comments could be incorporated into
  the docs. It's a low-commitment way to encourage contributions (w/o
  the need for git, patches, etc.)
 
  TAG
 
  On Jul 21, 9:42 pm, Walter Lee Davis wa...@wdstudio.com wrote:
 
 
 
 
 
 
 
   On Jul 21, 2011, at 8:32 PM, Jason wrote:
 
I agree with both Richard and Sander - and there might be a middle
ground
 
I think that community comments, examples etc are a good addition to
documentation and help users that are starting out - it would also
give the new user a sense there was someplace to go for help. There
has been many times I was working with a new function and was able to
figure it out from the community comments instead of the official
documentation (no offense intended)
 
On the other hand full blown PHP documentation like is overkill and
 is
too much too fast
 
On the third hand - I would be more than happy to contribute to
building the community section, but I'm not sure if a PHP guru will
 be
much help (as I'm assuming its built on Ruby)
 
   The current documentation (1.7) is generated directly from the source
   code using a tool written by one of the core guys -- I think it's
   called jsDoc or something like that. Anyway, it's just static HTML,
   CSS and JavaScript (naturally) once that tool is done.
 
   I think that if there was enough energy for moderation, or some sort
   of community moderation system, that a great add-on to the site would
   be something like Disqus, so the user comments and corrections could
   be added to the mix. That's the thing I really love about the PHP
   site, and miss in other languages. It's an annotated encyclopedia that

   has lots of interesting stuff written in the margins by everyone else
   who ever used it. I can't count the number or really hard problems I
   was able to solve by looking at someone's example code in the comments.
 
   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: Prototype's evolution

2011-07-15 Thread Phil Petree
I certainly have the resouces to host the forums and would have no problem
in putting them up and maintaining them but it would take a consensus of the
powers that be because if none of the guys that answer the majority of the
questions are interested then it would just be like the french forums when
no one replied.

I dont mind investing time but I hate wasting it...

On Fri, Jul 15, 2011 at 12:41 PM, Cantrelle Vincent vcantre...@gmail.comwrote:

 Hi all,

 Thanks all for your answers.
 I agree with the fact that the communication around Prototype.js is
 not enough, and that it certainly miss a dedicated forum, with FAQ,
 samples codes and so on to be frankly speaking, for example
 scripteka was not really in my mind, and so I re-discover this kind of
 ressource. For the french forum I was talking about, they have
 proposed to open a FAQ section about Prototype, but nobody
 answered ... (compared to the activity on Mootol and jQuery, that's a
 pity) I should try to take a little bit of my time to propose some Q/
 A, even if I think that I'm not the best to do that (javascript is not
 all of my job, and I have a thousand of opened things to do).



 On 15 juil, 02:31, P.J. pjfontil...@gmail.com wrote:
  Prototype is still heavily used at The New York Times. And even though
  we've begun incorporating jQuery into more of our projects I don't see
  Prototype going away any time soon.
 
  On Jul 13, 10:36 am, Cantrelle Vincent vcantre...@gmail.com wrote:
 
 
 
 
 
 
 
   Dear all,
 
   This is just a simple question related to the fact that everywhere I
   look, especially on some french forums for developers,
   it seems that the number of users of the jQuery library is growing /
   increasing, and it's not really the case for Prototype.
   I have always prefered to work with Prototype.js, but I must say that
   sometimes I feel a little bit worried.
   May be I'm wrong, I hope I'm wrong, and so I hope that I have a
   truncated view of the situation, and that the number of users for
   Prototype.js is still high enough, and the motivation of the core
   team too, so that this library will be still maintained / improved in
   the futur.
   Can somebody give me a hint about that ?
 
   Thanks in advance,
   Vincent.

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



  1   2   >