The JSON returned is ok - this was the first thng i checked
Here is the returned JSON..
{Error:No,ErrorMessage:None,Refresh:1}
As you can see from that and the code i pastebinned there is no trailing
comma anywhere.. and it -was- working perfectly fine then just stopped !!
This is really
I've been a long time user of prototype and feel very comfortable in
most areas but this keeps coming up and I find it very annoying.
I have a hash that, as the code executes is filled with numeric ID's
as hash variable names. I basically need it to end up sort of like
this:
{
Tears of joy!!!
Thank you for this. I have been changing a ton of code thinking the
problem was in prototype and it was simply that I was using IDs just
like you. I added a simple freaking character to the IDs and presto!
I had already filed a ticket for this here:
Hi there
I suspect that prototype 1.6.03 causes ie7 to hang occasionally after
loading page. Is it plausible?
I understood from previous posts that the issue has been solved.
(http://groups.google.com/group/prototype-scriptaculous/browse_thread/
use prototype-1.6.0.3
code
var array = [];
console.log('length: ' + array.length);
for(var i in array) {
console.log('key: ' + i);
console.log('val: ' + array[i]);
}
/ code
result
length: 0
key: each
val: function (iterator, context) { ... }
key: eachSlice
val:
Hi,
if use prototype.js, can't use for..in for Array object ?
Correct, and even if not using Prototype, you shouldn't use for..in
for that. That's not what it's for. More here:
http://proto-scripty.wikidot.com/prototype:tip-looping-through-arrays
HTH,
--
T.J. Crowder
tj / crowder software /
2009/6/10 Alex McAuley webmas...@thecarmarketplace.com:
The JSON returned is ok - this was the first thng i checked
Here is the returned JSON..
{Error:No,ErrorMessage:None,Refresh:1}
As you can see from that and the code i pastebinned there is no trailing
comma anywhere.. and it
As i said it was working and nothing changed except one line an -
if($('overlay')) {...}
whihc i have now removed .. its very weird, i will strip it down to bear
minimum and build it up agian
I really hate debugging Internet explorer as using debug bar - the line
numbers and
Well someone may be interested to know i found the problem!!...
var dims=document.body.getDimensions(); // wrong
var dims=$(document.body).getDimensions(); // correct !!!
what i cant understand is how it was once working and then stopped for no
reason !!
Thanks for help
ALex
-
2009/6/10 Alex McAuley webmas...@thecarmarketplace.com:
As i said it was working and nothing changed except one line an -
if($('overlay')) {...}
whihc i have now removed .. its very weird, i will strip it down to bear
minimum and build it up agian
I really hate debugging
yes i have debugbar reporting everything, its very weird as i use similar
code to that line on another page and debugbar reports it as invalid
object
Just not on this page ...
It could be my other page is development and i dont minify or concat any
JS/CSS together but on this page
2009/6/10 Richard Quadling rquadl...@googlemail.com:
2009/6/10 Alex McAuley webmas...@thecarmarketplace.com:
As i said it was working and nothing changed except one line an -
if($('overlay')) {...}
whihc i have now removed .. its very weird, i will strip it down to bear
minimum and
Thank you for help.
I understood this.
Thanks again!
On Jun 10, 5:42 pm, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
if use prototype.js, can't use for..in for Array object ?
Correct, and even if not using Prototype, you shouldn't use for..in
for that. That's not what it's for.
Richard.
On a slight side note is it possible to evaluate the response from the
request to see if it is Json or HTML ...
In the backend i can output whatever header i like and i would like to on
the request evaluate if it is JSON (and if so do something) or if its
text/html/javascript do
2009/6/10 Alex McAuley webmas...@thecarmarketplace.com:
Richard.
On a slight side note is it possible to evaluate the response from the
request to see if it is Json or HTML ...
In the backend i can output whatever header i like and i would like to on
the request evaluate if it is JSON
So'k i sorted it .
On the PHP end i do this ...
header('Content-Type: application/json');// text/html
and on
the onSuccess i do this ...
onSuccess : function(d) {
var header=d.getHeader('Content-Type')
if(header=='application/json') {
var
2009/6/10 Alex McAuley webmas...@thecarmarketplace.com:
So'k i sorted it .
On the PHP end i do this ...
header('Content-Type: application/json');// text/html
and on
the onSuccess i do this ...
onSuccess : function(d) {
var header=d.getHeader('Content-Type')
Hi Luisgo,
I does the following test:
var test=$H({'1234':{},'12345':{}});
alert(test.inspect());
var myVar='123';
alert('string:'+Object.isString(myVar)+' / number:'+Object.isNumber
(myVar));
test.set(myVar,{});
alert(test.inspect());
myVar=1230;
alert('string:'+Object.isString(myVar)+' /
2009/6/8 Luisgo lgo...@gmail.com:
I've been a long time user of prototype and feel very comfortable in
most areas but this keeps coming up and I find it very annoying.
I have a hash that, as the code executes is filled with numeric ID's
as hash variable names. I basically need it to end up
2009/6/10 david david.brill...@gmail.com:
Hi Luisgo,
I does the following test:
var test=$H({'1234':{},'12345':{}});
alert(test.inspect());
var myVar='123';
alert('string:'+Object.isString(myVar)+' / number:'+Object.isNumber
(myVar));
test.set(myVar,{});
alert(test.inspect());
I don't have much experience with this so I am having difficulty
figuring out how to set this up as per your first suggestion:
To update the z-index after a change in the sortable, just use
prototype DOM function like Element.firstDescendant() [1] and
Element.next() [2] to update the DOM.
Ignore me I was having a brain lapse... fire bug lead me astray not
showing me the updated attributes when .disable() was applied . a
quick test pointed me in the right direction.
var ck = elm.getAttribute('disabled'); is true/false/null depending
on browser when set by .disable() which is
IE8 Developer Tools work great for finding these problems.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to
23 matches
Mail list logo