the point is, sometimes i receive a json object like
var json = {
element: ['1','2','3']
}
and sometimes element has just one element so it is presented as
a String not an Array:
var json = {
element: '1'
}
And i want to iterate over
Hello all -
I'm using scriptaculous' Effect.blindup and blinddown effect to create
a tree menu. It's basicalled nested divs with indentation.
When the page loads, I want the tree to be completely collapsed. I
tried setting the inline style for each div to visibility: hidden,
but then
Hello
I need to serialize an object to JSON, but the following code returns:
Stack overflow at line: 547
var windowHandle = ;
function openWindow2(URL) {
windowHandle = window.open(URL,'capswin','toolbar=no,resizable=1')
var windowStr = Object.toJSON(windowHandle);
Hey, I'm new to Javascript but not to programming. I decided to use
prototype because of the helpful functions it appeared to offer.
Here is what I have in a nutshell:
SCRIPT type=text/javascript src=javascriptPrototype.js /
SCRIPT type=text/javascript
function editInfo()
{
At 22:10 -0700 28/5/09, Alex wrote:
SCRIPT type=text/javascript src=javascriptPrototype.js /
...
The Prototype functions are in javascriptPrototype.js. I am trying to
remove (or delete the contents of if someone has a better idea) the
div element with id=box. I get an error everytime in IE 7.
Hi Miquel,
You have a couple of choices: Function#bind[1] (you could use
Function#curry if you didn't need context, but I see you do) or
Function#bindAsEventListener[2]. They basically come to the same
thing, it's just a matter of whether your function receives the event
parameter as the first
Hi,
Is there are workaround to get this working in IE 8?
Not a workaround, a fix: Don't put false in quotes (in your
asynchronous option); it's a flag, not a string. (I'm surprised the
results vary, truth be told.)
[OT: Do you really, really need the call to be synchronous? You
can't
@Miguel:
...because parameter position
need be string
No, it doesn't. When you use that style of insert, you're handing it
an object (in this case, via an object literal) where the name(s) of
the property on the object dictate where the content is put. bottom
is a property name, which you
2009/5/29 dgalvez danielgalvezvalenzu...@gmail.com:
the point is, sometimes i receive a json object like
var json = {
element: ['1','2','3']
}
and sometimes element has just one element so it is presented as
a String not an Array:
var json = {
Hi,
A brief OT before the actual question, you can make your each call
more efficient. Instead of:
objectToArray(json.element).each(function(ele){ ... }.bind
(this));
use each's second param, 'context':
objectToArray(json.element).each(function(ele){ ... }, this);
Enumerable#each
Hi,
Sorry, completely messed up my comments at the end there. Let's try
that again:
div id='foo' style=display: noneBlah blah blah/div
// Make 'foo' appear
new Effect.BlindDown('foo');
// Make 'foo' disappear (later)
new Effect.BlindUp('foo');
-- T.J.
On May 29, 11:23 am, T.J. Crowder
Hi sshah,
I've never done that, but isn't there a way to save the window name
instead and close a windows depending on it's name after??
That could do something like that:
var windowHandle = ;
var windowList={};
var windowNumber=1;
function openWindow2(URL) {
var
What I can't understand Walter is why have we written 27 messages
about anything which is not related to the question. And have spend on
that nearly a month not getting even closer to the answer. See
misunderstanding lead us to write answers that we don't need.
But what I think now is: if we
Hi David
Thanks for the reply. You are right that we can save the window variable
in an array and that works just fine. However, the problem is
maintaining this information across requests.
ie. I can open the window on 1 page and click on the close window link
a few requests later.
Is there
you dont need a grid... you can the id is that of the ones above plus 1 ...
This will not work properly due to ID's conflicting
Each time an element is dropped you will need to re-assign id's to each
element.. something like this ...
div id=container-1 !-- Droppable --
liItem/li
I came across this quirk in PHP as well. IMHO, it is much better to
fix the code on the server side than it would be to mess with
(correctly functioning) code on the client. -Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
2009/5/29 disccomp discc...@gmail.com:
I came across this quirk in PHP as well. IMHO, it is much better to
fix the code on the server side than it would be to mess with
(correctly functioning) code on the client. -Mark
Quirk? I don't think this is a quirk.
At what stage should a string
To be honest i dont understand what Walter is trying to say...
for example drag an unlimited number of
copies from the first list into the second list, and have the
dropped
elements keep their place in the second list while the first list
remains exactly the same... means the same to me
Yes, but also both of the sortables lists are driven by MySQL
database, by different tables. Basically the question is how can it
know between which items the item is dropped. And when it's done that
it must copy an item (MySQL row) from one MySQL table to another, and
also change it's ID's to
Of course then it must update and rebuild the list using the order
defined by the item ID.
Yes, but also both of the sortables lists are driven by MySQL
database, by different tables. Basically the question is how can it
know between which items the item is dropped. And when it's done that
Well thats the easy part believe it or not
the container should have the table name in the id or classname somewhere
then that can be pushed to the request.. (problem one taken care
of)!!
Problem 2 - copying rows
I would arrange my database something like this.
id |
Chris,
What I downloaded from Prototype was titled: prototype-1.6.0.3.js.
I renamed that file to javascriptPrototype.js so that I could use
it. I uploaded it into my directory. And from there I got to the
question I had above.
Does that clear anything up or help at all? Is there anything
It would be very best of you if you just maid an example. 'Couse it's
kind of confusing ))
Thanks, Yan
Well thats the easy part believe it or not
the container should have the table name in the id or classname somewhere
then that can be pushed to the request.. (problem one taken
At 06:07 -0700 29/5/09, Alex wrote:
What I downloaded from Prototype was titled: prototype-1.6.0.3.js.
I renamed that file to javascriptPrototype.js so that I could use
it. I uploaded it into my directory. And from there I got to the
question I had above.
Does that clear anything up or help at
It appears the script tag must have a closing tag /script.
So this SCRIPT type=text/javascript src=javascriptPrototype.js /
Should be this SCRIPT type=text/javascript
src=javascriptPrototype.js/script
Russell
-Original Message-
From: prototype-scriptaculous@googlegroups.com
Ah! I didn't look too closely at that I guess, whoops. Indeed that should
solve the problem for Chris.
-Original Message-
From: prototype-scriptaculous@googlegroups.com
[mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of Russell Keith
Sent: May 29, 2009 9:41 AM
To:
At 10:01 -0400 29/5/09, Mitchell McCulloch wrote:
Ah! I didn't look too closely at that I guess, whoops. Indeed that should
solve the problem for Chris.
No problem for me - at least, not /that/ problem. :-) I was the one
who suggested he had the filename wrong when he didn't.
The original
Thank you everyone.
The problem was the absense of the /script.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to
2009/5/29 T.J. Crowder t...@crowdersoftware.com
@Miguel:
...because parameter position
need be string
No, it doesn't. When you use that style of insert, you're handing it
an object (in this case, via an object literal) where the name(s) of
the property on the object dictate where the
(And again, if you didn't need context, you could use Function#curry
[3] and the event would be the last parameter.)
Thanks T.J., with curry has enough
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype
30 matches
Mail list logo