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
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 is that
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
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
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
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 mona.reml...@gmail.com
To: prototype-scriptaculous@googlegroups.com
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
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:
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 / crowder
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 t...@crowdersoftware.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent:
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
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
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_1234';
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_1234';
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
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-Scripty]
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-Scripty]
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
-
I'm getting true in a test but NULL as an post ID. Every element has an Id:
li id=Item_55span class=remove(x)/span/li
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
2009/7/21 Mona Remlawi mona.reml...@gmail.com:
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
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
No problems at all. i just dont want to upset the client who paid for
the development of it.
- Original Message -
From: Richard Quadling rquadl...@googlemail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Monday,
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?php //
On Jul 21, 10:42 am, Alex McAuley webmas...@thecarmarketplace.com
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
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 if you
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
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.
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.
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) {
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
RESPONSE
RHEAD
REQUESTNUMBER38/REQUESTNUMBER
/RHEAD
RBODY
ACTION
CREATELAYER
NAMEDESKTOP/NAME
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
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 wa...@wdstudio.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 4:14 PM
Subject: [Proto-Scripty] Re: Delete php
Try this:
$('clones').observe('click',function(evt){
var elm =
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 wa...@wdstudio.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 4:14
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 ul list with ID of clones so you will
never get an element id that is not clones because it is listening on
the
ul
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 maybe...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 5:04 PM
Subject:
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 maybe...@gmail.com
To: prototype-scriptaculous@googlegroups.com
Sent:
$$('#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
@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 suggest
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();
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();
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, Yan
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 wa...@wdstudio.com
To: prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009
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 Davis
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, or do
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 changed
Performantly isn't a word.
On Jul 21, 10:31 am, Chris c...@clicksports.de 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
Good thing he said performant then init !! :P
Alex Mcauley
http://www.thevacancymarket.com
- Original Message -
From: Diodeus diod...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Tuesday, July 21, 2009 10:00 PM
Subject: [Proto-Scripty] Re:
2009/7/21 Alex McAuley webmas...@thecarmarketplace.com:
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 :
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
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
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
- Original
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
57 matches
Mail list logo