Look like it can't find the element or the id of the element, because all
that gets send is "clone" and nothing more.
> either its not getting the element or var id=...split(). is resetiing
> something...
>
> Try
>
> var theid = elm.id.split('_').last();parameters :{clone:id}...Or
you may be able to get the clicked element with "this"
Example.
$('clones').observe('click',function(evt){
var elm = this;
.. var e=this.id;
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009
Hi all,
one of our clients has a very javascript heavy application for local
intranets. On many pages of this application, there are tooltips that
get loaded (usually up to 60 or 70), which make the application behave
very slowly at some time or another (at least in good ole IE6, which
we need to
The whole element is not working if you place var elm = this;
$('clones').observe('click',function(evt){
var elm = this;
if (elm.hasClassName('remove')){
evt.stop();
> you may be able to get the clicked element with "this"
>
> Example.
>
> $('clones').observe('
The whole element is not working if you place var elm = this;
$('clones').observe('click',function(evt){
var elm = this;
if (elm.hasClassName('remove')){
evt.stop();
> you may be able to get the clicked element with "this"
>
> Example.
>
> $('clones').observe('
Sorry if I dont understand it right, but you have an id of
"Item_SOMENUMBER" as id and just want the SOMENUMBER as post id,
right? I have something similiar in one of my applications, the
following is tested and works (at least if your prefix does not
change):
function getId(realId, prefix) { ret
Ah, forgot:
Call it in your function with the_id_i_want_to_use = getId(elm.id,
'Item_');
Greetings from Germany,
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to
Hello Everybody,
i got a problem with the parsing of an XML Response.
I know i have to handle IE and FF differently
So my AjaxResponse delivers Something like
38
DESKTOP
Desktop anzeigen
-1
He has trouble getting the element in the first place Getting the split
of it is not the problem
Alex
http://www.thevacancymarket.com
- Original Message -
From: "Chris"
To: "Prototype & script.aculo.us"
Sent: Tuesday, July 21, 2009 3:50 PM
Subject: [Proto-Scripty] Re: Delete php
try the follwing then.
$('clones').observe('click',function(evt,element){
var elm = element;
if (elm.hasClassName('remove')){
evt.stop();
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 3:
Try this:
$('clones').observe('click',function(evt){
var elm = evt.element();
if(elm.id){
//your code goes here
}
});
Walter
On Jul 21, 2009, at 11:10 AM, Alex McAuley wrote:
> try the follwing then.
>
> $('clones').observe('click',function(evt,element){
Already been tried !!!
- Original Message -
From: "Walter Lee Davis"
To:
Sent: Tuesday, July 21, 2009 4:14 PM
Subject: [Proto-Scripty] Re: Delete php
>
> Try this:
>
> $('clones').observe('click',function(evt){
> var elm = evt.element();
> if(elm.id){
> //your code goes here
> }
> }
Maybe there's something completely other that causes this problem, if
someone look at it http://pastie.org/553229
> Already been tried !!!
>
> - Original Message -
> From: "Walter Lee Davis"
> To:
> Sent: Tuesday, July 21, 2009 4:14 PM
> Subject: [Proto-Scripty] Re: Delete php
>
> >
Okay.
Your script is listening to the list with ID of "clones" so you will
never get an element id that is not "clones" because it is listening on the
event.element() should track it but its not working...
solution 1. use this insetad
$('clones').observe('click',function(event){
var elm=Eve
Both of the solutions causes script not to work at all, just to make sure
I'm connecting all right.
http://jsbin.com/igixe/edit
> Okay.
>
> Your script is listening to the list with ID of "clones" so you will
> never get an element id that is not "clones" because it is listening on
the
>
>
>
and firebug says ?
you have an undefined error in there for a start with evt.stop();
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: "Yan Kovyakh"
To:
Sent: Tuesday, July 21, 2009 5:04 PM
Subject: [Proto-Scripty] Delete php
>
> Both of the solutions causes
Says nothing, it's unclick-able now.
>
>
>and firebug says ?
>
>you have an undefined error in there for a start with evt.stop();
>
>
>
>Alex Mcauley
>http://www.thevacancymarket.com
>- Original Message -
>From: "Yan Kovyakh"
>To:
>Sent: Tuesday, July 21, 2009 5:04 PM
>Subject: [Proto-
$$('#clones li').invoke('observe','click',function(event) {
var elm=this;
if (elm.hasClassName('remove')){ // this was unclosed
Event.stop(event);
} // now closed properly
var the_id = elm.id.split('_').last();
alert(the_id); // remove this to make it work
This is a really interesting thread...
I don't want to retract my statement, but I dont entirely agree with what i
wrote previously (it's all part of learning right ?).
I've discussed this with a respected colleague, and we both agree that just
because a spec "says so" doesn't make it right or "b
@Alex:
> try changing "date" to "d" or something in "var date=.." incase FF on MAC
> might reserve the word or mistake the case of it for "Date" and
> re-variablise the class
That would be a truly massive bug in FF, I doubt it would get out of
beta.
@Atanu:
Firebug[1] works on the Mac, I'd sug
Great, now it finds the correct ID, and sends a post of "clone ID" but the
rest of the code seems not working:
new Ajax.Request('remove_clone.php',{
parameters:{clone:the_id},
onSuccess:function(transport){
elm.up('li').remove();
pollSortable.defe
Great, now it finds the correct ID, and sends a post of "clone ID" but the
rest of the code seems not working:
new Ajax.Request('remove_clone.php',{
parameters:{clone:the_id},
onSuccess:function(transport){
elm.up('li').remove();
pollSortable.defe
Put an alert in there, or a console.log, and see if your Ajax.Request
is even returning success. If it doesn't, you will never see anything
happen to that list item.
Walter
On Jul 21, 2009, at 1:47 PM, Yan Kovyakh wrote:
> Great, now it finds the correct ID, and sends a post of “clone ID”
Alert works up to the last 2 lines, up to the elm.up('li').remove();
> Put an alert in there, or a console.log, and see if your Ajax.Request
> is even returning success. If it doesn't, you will never see anything
> happen to that list item.
>
> Walter
>
> On Jul 21, 2009, at 1:47 PM
What does Firebug say your return from Ajax.Request looks like? You
should be able to see it in the Console tab, you'll see a POST and
then the response from that.
Walter
On Jul 21, 2009, at 2:31 PM, Yan Kovyakh wrote:
> Alert works up to the last 2 lines, up to the elm.up('li').remove();
change
elm.up('li').remove();
to
$(this).remove();
and it will remove the element that was clicked
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: "Walter Lee Davis"
To:
Sent: Tuesday, July 21, 2009 7:53 PM
Subject: [Proto-Scripty] Re: Delete php
>
> What d
In the post of remove_clone.php I see "clone theIDnumber" in response tab
see nothing...
>change
>elm.up('li').remove();
>to
>$(this).remove();
>and it will remove the element that was clicked
>Alex Mcauley
>http://www.thevacancymarket.com
>- Original Message -
>From: "Walter Lee Dav
Do you actually see the real ID number, or do you see 'theIDnumber'?
Can you turn on error reporting in your remove_clone.php?
ini_set('display_errors',1);
error_reporting(E_ALL);
As close to the top of the PHP script as you can get it.
Walter
On Jul 21, 2009, at 2:58 PM, Yan Kovyakh wrote:
I do see the real ID of an item, no errors, nothing changed since adding the
code you've gave. And again in the firebug XHR tab for the POST
remove_clone.php in the tab Post I see "clone theRealID" without "" of
course. Nothing in HTML or Response tabs.
>Do you actually see the real ID number, o
Can you make a regular POST to the delete script (using a test form)
and see if it responds in any way? I remain convinced that your
problem is in that script, nowhere else.
Walter
On Jul 21, 2009, at 4:01 PM, Yan Kovyakh wrote:
>
> I do see the real ID of an item, no errors, nothing change
"Performantly" isn't a word.
On Jul 21, 10:31 am, Chris wrote:
> Hi all,
>
> one of our clients has a very javascript heavy application for local
> intranets. On many pages of this application, there are tooltips that
> get loaded (usually up to 60 or 70), which make the application behave
> ver
Good thing he said "performant" then init !! :P
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: "Diodeus"
To: "Prototype & script.aculo.us"
Sent: Tuesday, July 21, 2009 10:00 PM
Subject: [Proto-Scripty] Re: Need help for performantly creating tooltips
"Perfo
2009/7/21 Alex McAuley :
>
> Good thing he said "performant" then init !! :P
>
>
And even then it is a neologism and proscribed [1].
[1] http://en.wiktionary.org/wiki/performant
--
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on th
I don't know whether I'll be able to find a problem as I'm not that good in
Javascript, but just to be on the safe side.
Here's again the script: http://pastie.org/554101
And the remove_clone: http://pastie.org/554099
Thanks,
> Can you make a regular POST to the delete script (using a test
its $_POST['clone']
not $_POST['the_id']
thats why !!
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 10:22 PM
Subject: [Proto-Scripty] Delete php
I don't know wh
I love semantical arguments !!
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: "Richard Quadling"
To:
Sent: Tuesday, July 21, 2009 10:20 PM
Subject: [Proto-Scripty] Re: Need help for performantly creating tooltips
>
> 2009/7/21 Alex McAuley :
>>
>> Good thin
Well, at all I thought I would get some help and not taunts for my
english (I am not a native speaker, but I think it should be clear
what I mean).
Greetings from Germany,
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
WOW Great! Though it's still aren't removing the link dynamically:
elm.up('li').remove(); neither by: $(this).remove();
Thanks for the amazing support so far!
> its $_POST['clone']
>
> not $_POST['the_id']
>
> thats why !!
> Alex Mcauleyhttp://www.thevacancymarket.com
>
> - Ori
WOW Great! Though it's still aren't removing the link dynamically:
elm.up('li').remove(); neither by: $(this).remove();
Thanks for the amazing support so far!
> its $_POST['clone']
>
> not $_POST['the_id']
>
> thats why !!
> Alex Mcauleyhttp://www.thevacancymarket.com
>
> - Ori
Ah, now I understand your problem with this word. When I wrote this I
didnt know that this isnt even a "real" world for native english
speakers. In Germany it is just one of those "it-words" that people
are using all the time. I just translated this word, assuming that my
english version of it wou
In your layout, you are not using the A tag, but rather the LI tag to
carry the ID. Since that's the case (which is why you are using
"this", I think) maybe the thing to do is to change
elm.up('li').remove(); to elm.remove() and see if that does the trick
for you.
Walter
On Jul 21, 2009
Olla,
is there nobody out there who is able to help me out?
If i'm posting in the wrong forum or if my question is stupid like
shooting in your own foot, please tell this to me.
I'm realy clueless.
Ferion
--~--~-~--~~~---~--~~
You received this message because yo
I don't really want to change the whole script, and the problem is that I
can't get the ID out, not the script.
Is there any way to extract an ID instead of doing:
var id = elm.id.split('_').last();
Because everything up to that point is working, I'm confused.
> Ya, I'm getting an empty b
"
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
underscores ("_"), colons (":"), and periods (".").
...
" [1]
So if HTML permits a '.' in the ID value of elements, so should prototype core.
Another point i
Hi eveyone,
I'm using .addClassName and .setStyle to change body background. But
my code doesn't work very well right now so I need to swich just
to .setStyle . My question is: will .setStyle overwrite my existing
style?
Example:
Button 1 uses:
$$('body')[0].setStyle({background: 'url(someimag
I have a script which executes periodically after each 10 seconds. You
can see that there is an ajax call which actually updates database for
me and return 1 or 0 depending of the script execution.
The problem is, it is working cool in windows platform with firefox
3.0.11. But not working with th
Not sure if this is related (haven't worked on MAC OS), but I would
double check the use of '../' for relative uri.
Different operating systems might interpret this differently.
You might wanna consider absolute uri's instead : /appcontext/index.php
cheers
--
mona
On Tue, Jul 21, 2009 at 9:13 A
Here is one way to do it (though probably not the best) - but it works
var e='blah_1234';
var i=e.split('_');
var l=i.length-1;
var id=(l>=1) ? i[l] : 'NULL' ;
var test=(id.length>=1) ? true : false ;
alert(test); // true means its set and has a string length greater than 1,
false means there
Hi Mona,
I agree, dots and colons are valid in HTML, and so should work with
the selector engine.
I took a quick look at Lighthouse[1], and it looks like there may be a
ticket[2] or two[3] there that is relevant, although #559 is marked as
fixed in 1.6.1 and you say what you're seeing is still a
Why would you want to use "." in an id In most web programming a "." or
a "::" means its a node or part of a class or something.
This makes no sense to me why anyone would want to confuse js libraries and
possible server side backends.
- Original Message -
From: "Mona Remlawi"
What does firebug say ?
- Original Message -
From: "Mona Remlawi"
To:
Sent: Tuesday, July 21, 2009 10:37 AM
Subject: [Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)
Not sure if this is related (haven't worked on MAC OS), but I would
double check the use of '../' for r
Hi,
> I'm using .addClassName and .setStyle to change body background. But
> my code doesn't work very well right now so I need to swich just
> to .setStyle . My question is: will .setStyle overwrite my existing
> style?
There's nothing like trying it to find out.
> Button 1 uses:
> $$('body')
Hi,
"Not working" in what way? Does it...
...do nothing?
...raise an error?
...stop all scripts on the page?
...turn the entire page mauve?
...depress the economies of the western democracies?
You get the idea, there are dozens of things "not working" could
mean. ;-)
--
T.J. Crowder
tj / crowd
LOL @ western democracies !
Wish my scripts could do that
;)
Alex Mcauley
Developer
The Vacancy Market LTD
http://www.thevacancymarket.com
- Original Message -
From: "T.J. Crowder"
To: "Prototype & script.aculo.us"
Sent: Tuesday, July 21, 2009 10:51 AM
Subject: [Proto-Scripty] Re
Thanks a lot for your replies. I was not on my machine so got late to
reply here
You can see that there is a commented code:
//console.log('setOnlineStatus.php?sid='+date.getTime());
I cannot see that log and also there is no ajax call taking place.
there is no javascript error found in the
Hi T.J.,
ticket#559 is very relevant indeed, and the final patch contained
" ... id = id.replace(/[\.:]/g, "\\$1"); ... " [1]
does solve the issue with dots and colons in IDs.
However, looks like this patch didn't make it to the 'bleeding-edge
version'. [3]
Instead, there is the old (still buggy
try changing "date" to "d" or something in "var date=.." incase FF on MAC
might reserve the word or mistake the case of it for "Date" and
re-variablise the class
Alex Mcauley
Developer
The Vacancy Market LTD
http://www.thevacancymarket.com
- Original Message -
From: "Atanu Dey"
To:
Well yes, this does gives me a true, and in post of the remove_clone.php I
see "clone 1234". But that's because you specified
var e='blah_1234';
But how am I going to connect my clone:id parameter?
> Here is one way to do it (though probably not the best) - but it works
> var e='blah_123
Well yes, this does gives me a true, and in post of the remove_clone.php I
see "clone 1234". But that's because you specified
var e='blah_1234';
But how am I going to connect my clone:id parameter?
> Here is one way to do it (though probably not the best) - but it works
> var e='blah_123
Well yes, this does gives me a true, and in post of the remove_clone.php I
see "clone 1234". But that's because you specified
var e='blah_1234';
But how am I going to connect my clone:id parameter?
> Here is one way to do it (though probably not the best) - but it works
> var e='blah_123
var elm=evt.element().id; //is the id of the element no ?
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 11:27 AM
Subject: [Proto-Scripty] Delete php
Well yes, this does gives me a true, and in post of the
Don't really understand what should I do with that line?
> var elm=evt.element().id; //is the id of the element no ?
>
> - Original Message -
> From: Yan Kovyakh
> To: prototype-scriptaculous@googlegroups.com
> Sent: Tuesday, July 21, 2009 11:27 AM
> Subject: [Proto-Scr
Don't really understand what should I do with that line?
> var elm=evt.element().id; //is the id of the element no ?
>
> - Original Message -
> From: Yan Kovyakh
> To: prototype-scriptaculous@googlegroups.com
> Sent: Tuesday, July 21, 2009 11:27 AM
> Subject: [Proto-Scr
I suggest you give up lol because it really doesnt get any simpler than what i
offered.
If however you do not wish to give up i will give you the answer.
var e=evt.element().id;
Then use the script given to you by me to get the actual ID from "e"
- Ori
I'm getting true in a test but NULL as an post ID. Every element has an Id:
5(x)
I'm getting frustrated as much as you do Alex, the last pledge for help
would be to send in the whole script.
http://pastie.org/553229
> I suggest you give up lol because it really doesnt get any simpler tha
2009/7/21 Mona Remlawi :
>
> Hi T.J.,
>
> ticket#559 is very relevant indeed, and the final patch contained
> " ... id = id.replace(/[\.:]/g, "\\$1"); ... " [1]
> does solve the issue with dots and colons in IDs.
>
> However, looks like this patch didn't make it to the 'bleeding-edge
> version'. [
2009/7/20 Alex McAuley :
>
> No problems at all. i just dont want to upset the client who paid for
> the development of it.
> - Original Message -
> From: "Richard Quadling"
> To:
> Sent: Monday, July 20, 2009 4:38 PM
> Subject: [Proto-Scripty] Re: Checking if prototype is loaded
>
>
either its not getting the element or var id=...split(). is resetiing
something...
Try
var theid = elm.id.split('_').last();parameters :{clone:id}...Or if you cant
do it in javascript send the whole id of the element and split it in
php
- Original Message -
From: "Yan Kovyakh"
T
On Jul 21, 10:42 am, "Alex McAuley"
wrote:
> Why would you want to use "." in an id In most web programming a "." or
> a "::" means its a node or part of a class or something.
>
> This makes no sense to me why anyone would want to confuse js libraries and
> possible server side backends.
>
Each to their own, everyone has their own coding practices and concepts.
In PHP and Perl you -could- call "." a heirachial operator as it joins 2
nodes (strings for example) together - thus jumping from one to the next or
making the bridge (to assimilate them) - which is what it does in Javascr
Look like it can't find the element or the id of the element, because all
that gets send is "clone" and nothing more.
> either its not getting the element or var id=...split(). is resetiing
> something...
>
> Try
>
> var theid = elm.id.split('_').last();parameters :{clone:id}...Or
71 matches
Mail list logo