[Proto-Scripty] Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

Hello shiny people!! :)

can somebody understand as to why this code doesn't work on IE and
Opera, while working fine in other browsers?

function commentUpdate(){
// finally prepare data and make a new AJAX call...
 var updatedata = document.getElementById('updatedata').value;
 var appendarray = document.getElementById('appendarray').value;
 var pageopened = document.getElementById('pageopened').value;
// document.getElementById('tempholder').value = Updating...;
 var url = '/components/com_cbactivity/add-on1/helpers/
commentupdate.php';
 var pars = 'updatedata='+updatedata+'appendarray='+appendarray
+'pageopened='+pageopened;
 var target = 'hidden-div';
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: pars});

I don't see any syntax error, I tried both methods (getpost),
everything gets executed, until Ajax.Updater!
Then, it simply doesn't enter the  file!

All this, ONLY on IE and Opera! Other browsers working fine! And this
is what's surprising! Because the target file (commentupdate.php) is a
pure PHP file, which means everything is server-processed!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread Alex McAuley

try URIencoding it ..

Also if its post why are you sending it as key/value pairs . try the 
following to see if its whats messing it up

var myAjax = new Ajax.Updater(target, url+'?'+pars, {method: 'post', 
parameters: foo: 'BAR'}); // notice i am sending your key value pairs in the 
URL string ... then on the php end do
print_r($_GET);
echo(\n);
print_r($_POST);

And see what the server says
HTH

ALex

- Original Message - 
From: partypeopl...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 02, 2009 3:20 AM
Subject: [Proto-Scripty] Problem with Ajax.Updater...



 Hello shiny people!! :)

 can somebody understand as to why this code doesn't work on IE and
 Opera, while working fine in other browsers?

 function commentUpdate(){
 // finally prepare data and make a new AJAX call...
 var updatedata = document.getElementById('updatedata').value;
 var appendarray = document.getElementById('appendarray').value;
 var pageopened = document.getElementById('pageopened').value;
 // document.getElementById('tempholder').value = Updating...;
 var url = '/components/com_cbactivity/add-on1/helpers/
 commentupdate.php';
 var pars = 'updatedata='+updatedata+'appendarray='+appendarray
 +'pageopened='+pageopened;
 var target = 'hidden-div';
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
 parameters: pars});

 I don't see any syntax error, I tried both methods (getpost),
 everything gets executed, until Ajax.Updater!
 Then, it simply doesn't enter the  file!

 All this, ONLY on IE and Opera! Other browsers working fine! And this
 is what's surprising! Because the target file (commentupdate.php) is a
 pure PHP file, which means everything is server-processed!

 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working

2009-06-02 Thread IMBI-Indie-Portal

Thanks Colin, but, there is a space, if you check the source code
page, It didn't fit to well into the post.
As you can see, it works as a HTMLDOM style, almost the same code..
border: this.olc_divborder+'px' +this.olc_bordercol+ 'solid'
there is one space on each side.

The way I read it from the DOCS is that if it works as a HTMLDOM
shorthand method, it should work in setStyle(); ???
The W3 page doesn't show any value/rule references...
I'll try the backgroundImage without the extras - I'm sure I saw an
example somewhere using all though.

The extra $$('head') is not really there, I tried to use that at the
beginning, but it did not work as expected, I just pasted it there on
the end instead of deleting it, just ignore it please

The actual problem there is that IE wont append data into the  the
style tag. Firefox woks OK.
- headElement.appendChild(styleElement); (fails in IE)

I tried the  headElement = $$('head') thinking it would extend some
methods on the head object to help prototype deal with the IE
business, but to no avail??

I'm wonder is there a way Prototype can deal with this IE
appendTextNode problem??

THat popup is the 4th one down on the right on the sample page if you
want to try it out live..
http://www.imbi.com.au/overlib-clone-mini-prototype-class/overlib-clone-sample.php

Apart from that she works quite well
Can't say more than that.

Regards and Thanks,
  Gilbert R


On Jun 1, 11:19 pm, ColinFine colin.f...@pace.com wrote:
 On May 31, 1:37 pm, Imbi Rehling imbil...@tpg.com.au wrote:



   if(this.olc_divborder) {
      $(id).style.border=this.olc_divborder+'px solid '+this.olc_bordercol;
      /* $(id).setStyle({ border: this.olc_divborder+'px' +this.olc_bordercol+
   'solid' }); */
      this.diagnostics('div border set to '+this.olc_divborder+'px');
   }

 In the commented-out code there are no spaces after 'px' or before
 'solid'.

   The commented out code is not working. Any thoughts???
   Second Part:
   if(this.olc_background){
      $('textDiv').style.backgroundImage=url(+this.olc_background+);
      /* $('textDiv').setStyle({ backgroundImage:
   'url('+this.olc_background+') top left' }); */
      this.diagnostics('text area background set!');
   }

 backgroundImage wants only the image. If you want to give more than
 one property, you need to use the other 'backgroundXxx' properties, or
 use 'background' to give them all together.







   No2:
      I created a method to add a style tag into the head and add some
   selector-rules code into it. Firstly its for the (Click to Close Link) and
   for generating fixed classes for various popup elements including the new
   (Feature Selector) method...
          It works OK in firefox, but, apparently IE has some issues adding a
   'textnode' into a style element (tag). I had hoped that prototype would
  have
   circumvented this problem??
   The method called 'add_style is on line 504..
   Here is the code I'm using within the method:

   var headElement = document.getElementsByTagName(head)[0], styleElement =
   document.createElement(style), selector, rule; /* headElement =
   document.getElementsByTagName(head)[0], headElement = $$('head') */

 In your commented code you're setting 'headElement' twice, and the
 second time you're setting it to an Array, not an Element.

 Why not use just use var headElement = head; (or window.head if you
 prefer) since there's only one of them?

 I haven't looked to see if there are any other errors: these are just
 the obvious ones at the start.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working

2009-06-02 Thread Walter Lee Davis

Yes, but...

If you pick one format for the first element in the hash, you have to  
follow it through all the way. So if you use camelCase notation for  
the first rule name, you can't use the quoted name for the second, and  
vice-versa.

When in doubt, quote them all (names and values) and use the regular  
CSS name of the style attribute.

Walter

On Jun 2, 2009, at 8:37 AM, IMBI-Indie-Portal wrote:

 The way I read it from the DOCS is that if it works as a HTMLDOM
 shorthand method, it should work in setStyle(); ???
 The W3 page doesn't show any value/rule references...
 I'll try the backgroundImage without the extras - I'm sure I saw an
 example somewhere using all though.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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] Prototype Xml representation

2009-06-02 Thread confiteor

Hi,
 I try find Xml representation of Prototype library.
Is something like this exist?

Best regards,
   confi

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Cant get focus to work with change event when tabbing out of input

2009-06-02 Thread molo

Thank you both for your responses. It's nice to get help. I agree with
you on the alert being annoying, so I will put a error message out on
the screen instead of an alert, time permitting (I'm under the gun)

The defer did not work I got  a javascript error  saying this.focus is
not a function. However, the setTimeout did work

Maurice


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: OverLIB Clone - IE not appending to Style Tag - setStyle() sometimes not working

2009-06-02 Thread ColinFine



On Jun 2, 1:37 pm, IMBI-Indie-Portal imbil...@tpg.com.au wrote:
 Thanks Colin, but, there is a space, if you check the source code
 page, It didn't fit to well into the post.
 As you can see, it works as a HTMLDOM style, almost the same code..
 border: this.olc_divborder+'px' +this.olc_bordercol+ 'solid'
 there is one space on each side.

There is not. There is a space *outside* the quotes, but not one that
will go into the string which you are generating. This will pass an
object like

{ border: '222pxblacksolid' }

 The way I read it from the DOCS is that if it works as a HTMLDOM
 shorthand method, it should work in setStyle(); ???

Yes. But the shorthand property  has a different name from the
individual property. You appeared to be trying to say
{ backgroundImage: 'url(xxx) top left' }
instead of
{ background: 'url(xxx) top left' }
or
{ backgroundImage: 'url(xxx)',
  backgroundPosition: 'top left' }

I don't know about the appendChild problem.
http://www.phpied.com/dynamic-script-and-style-elements-in-ie/ gives a
solution, but I think you know this and are asking about whether
Prototype helps with it or not, and I don't know the answer.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

@Alex
I encodeURIComponent them now, thanks for suggestion

notice that when you are sending the key values with the url, they get
caught as $_GET, no matter if you use {method: 'post'} (!)

@T.J.
all your assumptions are right ;)

anyway, if you add some alerts to see what's going on like this:
...
 alert ('initiating...');
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: pars, onComplete:function(){alert ('ajax completed!');}});

IE will show the first alert, but not the second, which means that for
some unknown reason, ajax doesn't complete.
maybe IE doesn't like my parameters???

here they are:
[updatedata] = Itemid=96-epomeno-, c.cb_gender AS cb_gender-epomeno--
epomeno--epomeno-GUESTS ALLOWED-epomeno-0-epomeno-1-epomeno-1-
epomeno-1-epomeno-1-epomeno-1-epomeno-1-epomeno-62

(-epomeno- is string used to explode updatedata to an array, means -
next- in greek)

[appendarray] = 2195,2194,2191,2188,2159,2158,2148,2138,2134,2130

[pageopened] = 1243949520

what could it be that can prevent execution in IE, while works fine on
other browsers?
any thoughts?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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] JSON-WCF calls - empty resultset clientside

2009-06-02 Thread devvvy

hello

THE PROBLEM

I have an WCF operation exposed using an endpoint configured to use
webHttpBinding. My problem is, while response code it seems to
suggest that operation was indeed completed successfully and returned
array of one Blog object (and I ran debugger on Visual Studio
against WCF operation code and it returned successfully and returned
one Blog object),  responseJSON, responseText was all NULL (I am
expecting one Blog object, as seen on debugger attached to WCF on
server side).


DETAIL - WCF Operation Contract

[WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest,
 ResponseFormat = 
WebMessageFormat.Json)]
Blog[] GetBlogstring strLogon);



DETAIL - Javascript invoke using prototype.js - Ajax.Request

I called it from Javascript:

function FindBlog() {
var url = '%=FindBlogServiceOpURL%';
var oUserNameTxt = document.getElementById('txtUserName');
var oParam = 'strLogon=' + oUserNameTxt.value;

var myAjax = new Ajax.Request(
url,
{
method: 'get',
contentType:
'application/json',
parameters: oParam,
onComplete: showResponse,
   onFailure: function() {
   alert(FindAssociatedGroup call
   failed.);
}
 }
  );
}


DETAIL - Javascript response handler

function showResponse(originalRequest) {
var oLoading = document.getElementById('loadingimg');
var oDivGroups = document.getElementById('divgroups');
var oLoadingFailed = document.getElementById('loadingfailed');

/* REF: 
http://www.prototypejs.org/api/ajax/response

0 corresponds to Uninitialized
1 to Loading
2 to Loaded
3 to Interactive
4 to Complete
*/
if (originalRequest.readyState == 4) {
alert('showResponse, operation completed. ' + 
originalRequest);
alert('responseJSON: ' + originalRequest.responseJSON + 
',
headerJSON: ' + originalRequest.headerJSON + ', responseText: ' +
originalRequest.responseText);

...
oDivBlogs.innerHTML = originalRequest.responseJSON;

} else {
alert('showResponse, operation failed.' + 
originalRequest);
... more code ...
}
}

Any suggestion please? Thanks


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



[Proto-Scripty] Re: Problem with Ajax.Updater...

2009-06-02 Thread Alex McAuley

You have a syntax error

Internet explorer chokes on commas in JSON notation (i learnt the hard way 
on this)

For example

var foo= {

method_1: funciton() {
alert('Method 1 Baa');
}, // this is wrong as it needs no trailing comma

}
var foo= {

method_1: funciton() {
alert('Method 1 Baa');
}// this is right as there is no comma

}


In your example you have a trailing comma
var myAjax = new Ajax.Updater(target, url,
{
method: 'post',
parameters:
{
params:pars
}, // end parameters ... you had a comma here but no curly braces enclosing 
the parameters (possibly anlther synatical mistake as it may expect a Json 
array/object rather than one variable
onComplete : function(){
alert ('ajax completed!');
} // end onComplete
}// end options
);// end ajax initialisation



HTH

Alex
- Original Message - 
From: partypeopl...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 02, 2009 3:13 PM
Subject: [Proto-Scripty] Re: Problem with Ajax.Updater...



 @Alex
 I encodeURIComponent them now, thanks for suggestion

 notice that when you are sending the key values with the url, they get
 caught as $_GET, no matter if you use {method: 'post'} (!)

 @T.J.
 all your assumptions are right ;)

 anyway, if you add some alerts to see what's going on like this:
 ...
 alert ('initiating...');
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
 parameters: pars, onComplete:function(){alert ('ajax completed!');}});

 IE will show the first alert, but not the second, which means that for
 some unknown reason, ajax doesn't complete.
 maybe IE doesn't like my parameters???

 here they are:
 [updatedata] = Itemid=96-epomeno-, c.cb_gender AS cb_gender-epomeno--
 epomeno--epomeno-GUESTS ALLOWED-epomeno-0-epomeno-1-epomeno-1-
 epomeno-1-epomeno-1-epomeno-1-epomeno-1-epomeno-62

 (-epomeno- is string used to explode updatedata to an array, means -
 next- in greek)

 [appendarray] = 2195,2194,2191,2188,2159,2158,2148,2138,2134,2130

 [pageopened] = 1243949520

 what could it be that can prevent execution in IE, while works fine on
 other browsers?
 any thoughts?
 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Revert sortable on return value true? Possible?

2009-06-02 Thread terry-5-

Hi Alex,

Thanks for being so patient. I deleted the previous message because I
saw your link to the patch after I submitted it. Wow, this is just a
mistery to me, but I added the patch, added revert to the sortable
decleration, checked the return value which is true for what I am
checking and still it doesn't work.

I get a lot of warnings in firebug for prototyp.js, effects.js, and
dragdrop.js.
I haven't invastigated, but I don't think it has anything directly to
do with the patch. Does the patch only work with a certain version of
the files?

Sortable.create('blank_1',{tag:'span',dropOnEmpty: true,
constraint:true, containment:sections, only:'lineitem',
onUpdate:function(el){changeClass(el)}, revert:changeClass});

function changeClass(el){
var flag =false;
var sections = document.getElementsByClassName('section');

sections.each(function(section) {
var sectionID = el.id;
var sectionall_ID = section.id;
var sequence=(Sortable.sequence(el.id));
});

str_post=str_post.join(,);
if(str_post.match(,)){
flag =true;
}
alert((flag == true)?true:false);
return (flag == true)?true:false;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

Hello Alex,
no I didnt have a trailing comma after the closing bracket, because
there is no closing bracket there!

syntax:
Ajax.Updater(container, url[, options])

quoting my line of code:

var myAjax = new Ajax.Updater
  (target,
  url,
  { /* opening bracket for options...
   method: 'post',
   parameters: pars, /* notice here there is no closing
bracket! ;) */
   onComplete:function(){
   alert ('ajax completed!');
   } /* end of anonymous function*/
  } /* closing bracket of options
 ); // end of Ajax.Updater line

By the way, I tried this code on a totally different site/totally
different page and it still didn't work in IE. Oh, I hate this browser
so much!

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



[Proto-Scripty] Re: Problem with Ajax.Updater...

2009-06-02 Thread Alex McAuley

Did you read the las paragraph of my reply ?...

Check if paramters expects an object or a variable, i think u will find it 
expects an Object


parameters : {

foo: 'BAR'

}
- Original Message - 
From: partypeopl...@gmail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 02, 2009 8:29 PM
Subject: [Proto-Scripty] Re: Problem with Ajax.Updater...



 Hello Alex,
 no I didnt have a trailing comma after the closing bracket, because
 there is no closing bracket there!

 syntax:
 Ajax.Updater(container, url[, options])

 quoting my line of code:

 var myAjax = new Ajax.Updater
  (target,
  url,
  { /* opening bracket for options...
   method: 'post',
   parameters: pars, /* notice here there is no closing
 bracket! ;) */
   onComplete:function(){
   alert ('ajax completed!');
   } /* end of anonymous function*/
  } /* closing bracket of options
 ); // end of Ajax.Updater line

 By the way, I tried this code on a totally different site/totally
 different page and it still didn't work in IE. Oh, I hate this browser
 so much!

 thank you,
 Chris
 
 


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



[Proto-Scripty] Re: Revert sortable on return value true? Possible?

2009-06-02 Thread Alex McAuley

i'll investigate in the morning for you
- Original Message - 
From: terry-5- nathaliesteinf...@gmx.net
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, June 02, 2009 5:48 PM
Subject: [Proto-Scripty] Re: Revert sortable on return value true? Possible?



 Hi Alex,

 Thanks for being so patient. I deleted the previous message because I
 saw your link to the patch after I submitted it. Wow, this is just a
 mistery to me, but I added the patch, added revert to the sortable
 decleration, checked the return value which is true for what I am
 checking and still it doesn't work.

 I get a lot of warnings in firebug for prototyp.js, effects.js, and
 dragdrop.js.
 I haven't invastigated, but I don't think it has anything directly to
 do with the patch. Does the patch only work with a certain version of
 the files?

 Sortable.create('blank_1',{tag:'span',dropOnEmpty: true,
 constraint:true, containment:sections, only:'lineitem',
 onUpdate:function(el){changeClass(el)}, revert:changeClass});

 function changeClass(el){
 var flag =false;
 var sections = document.getElementsByClassName('section');

 sections.each(function(section) {
 var sectionID = el.id;
 var sectionall_ID = section.id;
 var sequence=(Sortable.sequence(el.id));
 });

 str_post=str_post.join(,);
 if(str_post.match(,)){
 flag =true;
 }
 alert((flag == true)?true:false);
 return (flag == true)?true:false;
 }
 
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Revert sortable on return value true? Possible?

2009-06-02 Thread terry-5-

Thanks Alex.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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] Ajax.Updater related question

2009-06-02 Thread anthony

I have got a working example, but now I need to add something, and I
am not sure how to do it.

I have a function:
script type=text/javascript language=JavaScript
function getAdjForm() {
   var params = Form.serialize($('createAdjForm'));
   new Ajax.Updater(
   adjForm,
   /link/to/somewhere,
   {method:'post',
   parameters: params});
}
/script

My HTML
select name=adjType id=adjType onChange=getAdjForm()
.//Lots of options listed
/select
.
.
.
More HTML
.
.
.
div id=adjForm
/div

This works, and my text appears inside the div id=adjForm
/div. My problem is where I have the more HTML code, I need to have
dynamic text appear there as well, but it is based on the same logic.
Is there a way to do this w/o calling a second url in my function?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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] IE 8 Prototype Issue

2009-06-02 Thread CMRstar430

Hello All,

I am having an issue with lightwindow in IE 8.0.

http://proofs.icongraphics.com/usbe/services.asp

If you go to this link in IE 8 and then click on the link in the body
that says MORE, you will see what is going on. It is supposed to
open up a window like any other lightwindow, light box etc...

It keeps saying Error on page and when i look at the details it says
it is a line in the Prototype. The error message is saying that it is
on line 2254, character 9:

This is that line: elementStyle[(property == 'Float' || property ==
'cssFloat') ?

I downloaded and used the new version of prototype: version 1.6.1_rc2

Anyone have this issue before or know a way to fix it???  Please help!

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



[Proto-Scripty] Re: Cant get focus to work with change event when tabbing out of input

2009-06-02 Thread T.J. Crowder

 The defer did not work I got  a javascript error  saying this.focus is
 not a function. However, the setTimeout did work

Doh!  My bad.  Should be:

else {
var self = this;
(function(){
self.focus();
}).defer();
alert(invalid number);
return false;

}

-- T.J.

On Jun 2, 2:49 pm, molo maurice_lowent...@ssga.com wrote:
 Thank you both for your responses. It's nice to get help. I agree with
 you on the alert being annoying, so I will put a error message out on
 the screen instead of an alert, time permitting (I'm under the gun)

 The defer did not work I got  a javascript error  saying this.focus is
 not a function. However, the setTimeout did work

 Maurice
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

ok, I tried your suggestion but this doesn't work at all

have you ever tried the syntax you are suggesting? Because I think
it's wrong...

Caught also in FF's error console as:

Error: missing } after property list
Source File: 
http://www.sitedarling.com/partyspots/components/com_cbactivity/add-on1/js/ajax.js
Line: 52, Column: 94
Source Code:
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: { params: pars } onComplete:function(){

and indicating exactly the parameters string, as to say you cannot
open a bracket there, unless you close the previous one

However, putting a trailing coma after the parameters corrects this
syntax error, and everything works again

Nevertheless, IE denies to deliver, even using this syntax :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

ok, I tried your suggestion but this doesn't work at all

have you ever tried the syntax you are suggesting? Because I think
it's wrong...

Caught also in FF's error console as:

Error: missing } after property list
Source File: 
Line: 52, Column: 94
Source Code:
 var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: { params: pars } onComplete:function(){

and indicating exactly the parameters string, as to say you cannot
open a bracket there, unless you close the previous one

However, putting a trailing coma after the parameters corrects this
syntax error, and everything works again

Nevertheless, IE denies to deliver, even using this syntax :(

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread T.J. Crowder

@alex:

You can pass a string, that's still supported.

@OP:

Again, try step #3 from here:
http://proto-scripty.wikidot.com/faq#xyzprob

...and then if it still doesn't work, post the complete code.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Jun 2, 8:36 pm, Alex McAuley webmas...@thecarmarketplace.com
wrote:
 Did you read the las paragraph of my reply ?...

 Check if paramters expects an object or a variable, i think u will find it
 expects an Object

 parameters : {

 foo: 'BAR'

 }
 - Original Message -
 From: partypeopl...@gmail.com
 To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
 Sent: Tuesday, June 02, 2009 8:29 PM
 Subject: [Proto-Scripty] Re: Problem with Ajax.Updater...

  Hello Alex,
  no I didnt have a trailing comma after the closing bracket, because
  there is no closing bracket there!

  syntax:
  Ajax.Updater(container, url[, options])

  quoting my line of code:

  var myAjax = new Ajax.Updater
   (target,
       url,
       { /* opening bracket for options...
            method: 'post',
            parameters: pars, /* notice here there is no closing
  bracket! ;) */
            onComplete:function(){
                alert ('ajax completed!');
            } /* end of anonymous function*/
       } /* closing bracket of options
  ); // end of Ajax.Updater line

  By the way, I tried this code on a totally different site/totally
  different page and it still didn't work in IE. Oh, I hate this browser
  so much!

  thank you,
  Chris


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



[Proto-Scripty] Re: Problem with Ajax.Updater...

2009-06-02 Thread T.J. Crowder

Hi,

Guys, you're talking past each other.

@Alex:

This is perfectly valid:

var x = one=1two=2three=3;
new Ajax.Updater(target, url, {parameters: x});

@OP:

This is perfectly valid (and preferred):

new Ajax.Updater(target, url, {
parameters: {
'one':1,
'two':2,
'three':  3
}
});

-- T.J.

On Jun 2, 9:37 pm, partypeopl...@gmail.com partypeopl...@gmail.com
wrote:
 ok, I tried your suggestion but this doesn't work at all

 have you ever tried the syntax you are suggesting? Because I think
 it's wrong...

 Caught also in FF's error console as:

 Error: missing } after property list
 Source File: 
 Line: 52, Column: 94
 Source Code:
      var myAjax = new Ajax.Updater(target, url, {method: 'post',
 parameters: { params: pars } onComplete:function(){

 and indicating exactly the parameters string, as to say you cannot
 open a bracket there, unless you close the previous one

 However, putting a trailing coma after the parameters corrects this
 syntax error, and everything works again

 Nevertheless, IE denies to deliver, even using this syntax :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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: Problem with Ajax.Updater...

2009-06-02 Thread Rick Waldron
I noticed you're missing a comma...


var myAjax = new Ajax.Updater(target, url, {method: 'post',
parameters: { params: pars } onComplete:function(){


Between { params: pars } onComplete (should be right before onComplete)


That may be unrelated, but an observation worth noting.





On Tue, Jun 2, 2009 at 4:47 PM, T.J. Crowder t...@crowdersoftware.com wrote:


 Hi,

 Guys, you're talking past each other.

 @Alex:

 This is perfectly valid:

 var x = one=1two=2three=3;
 new Ajax.Updater(target, url, {parameters: x});

 @OP:

 This is perfectly valid (and preferred):

 new Ajax.Updater(target, url, {
 parameters: {
'one':1,
'two':2,
'three':  3
}
 });

 -- T.J.

 On Jun 2, 9:37 pm, partypeopl...@gmail.com partypeopl...@gmail.com
 wrote:
  ok, I tried your suggestion but this doesn't work at all
 
  have you ever tried the syntax you are suggesting? Because I think
  it's wrong...
 
  Caught also in FF's error console as:
 
  Error: missing } after property list
  Source File: 
  Line: 52, Column: 94
  Source Code:
   var myAjax = new Ajax.Updater(target, url, {method: 'post',
  parameters: { params: pars } onComplete:function(){
 
  and indicating exactly the parameters string, as to say you cannot
  open a bracket there, unless you close the previous one
 
  However, putting a trailing coma after the parameters corrects this
  syntax error, and everything works again
 
  Nevertheless, IE denies to deliver, even using this syntax :(
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, 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 do I access 'this' from within Ajax.Request onSuccess?

2009-06-02 Thread Col

I'm a little confused about context and how to access things correctly
when my ajax request onSuccess function runs.

My code currently looks something like this:

var MyObject = Class.create({
  initialize: function() {
this.items = [];
  },
  loadItemsFromUrl: function(url) {
new Ajax.Request(url, {
  method: 'get',
  onSuccess: function(transport) {
// how can I access 'this.items' from here ???
  }
});
  }
});

var myObject = new MyObject();
myObject.loadItemsFromUrl('http://www.blah.com/items');

I realise that 'this' will not actually point to the instance of
myObject when the callback is run but how CAN I access it ?

thanks


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



[Proto-Scripty] Re: Ajax.Updater related question

2009-06-02 Thread Walter Lee Davis

Sure.
On Jun 2, 2009, at 9:46 AM, anthony wrote:


 I have got a working example, but now I need to add something, and I
 am not sure how to do it.

 I have a function:
 script type=text/javascript language=JavaScript
 function getAdjForm() {
   var params = Form.serialize($('createAdjForm'));
   new Ajax.Updater(
   adjForm,
   /link/to/somewhere,
   {method:'post',
   parameters: params,

evalScripts: true

 });
 }
 /script

 My HTML
 select name=adjType id=adjType onChange=getAdjForm()
 .//Lots of options listed
 /select
 .
 .
 .
 More HTML
 .
 .
 .
 div id=adjForm
 /div

 This works, and my text appears inside the div id=adjForm
 /div. My problem is where I have the more HTML code, I need to have
 dynamic text appear there as well, but it is based on the same logic.
 Is there a way to do this w/o calling a second url in my function?

By adding that one variable, you open up the possibility of including  
inline script within /link/to/somewhere that will populate your page  
with the result of the calculation.

script type=text/javascript
$('someDiv').update('result of calculation here');
/script

If you don't want your server script to be bound so much by the page  
layout, you can do the same thing in a onSuccess callback right in the  
form page, just have your server page return a blob of JSON or  
similar, and pick through it for your data. That is slightly less  
brittle, since you keep the updating and the objects you are updating  
within the same page. That would look something like this:

function getAdjForm() {
   var params = Form.serialize($('createAdjForm'));
   new Ajax.Updater(
   adjForm,
   /link/to/somewhere,
   {method:'post',
   parameters: params,
onSuccess: function(transport){
//do something clever here with transport.responseJSON
$('someDiv').update(resultOfCleverness);
}
});
}

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



[Proto-Scripty] Re: Problem with Ajax.Updater...

2009-06-02 Thread partypeopl...@gmail.com

@T.J.
I didn't say it's not valid, but Alex was suggesting to omit the comma
before onComplete, which is not valid.

I tried step #3, but in a very smaller scale and it works. I can't add
all the code needed to replicate, this would take pages!

@Rick
That's what I was trying to say to Alex too ;)

UPDATE: After a lot of trial--error approach, I found out what's
going on:

IE executes the Ajax call, processes the PHP file, but does NOT
display anything on screen!

Nothing echoed, or printed in the PHP file gets displayed on the
div (target='hidden-div), nor the onComplete alert gets displayed on
the screen!

BUT, all MySQL calls are working, I added some code to add and/or
delete some foobar records on my database and they all worked!

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