[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread Mona Remlawi
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

[Proto-Scripty] Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Atanu Dey
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

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Mona Remlawi
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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread T.J. Crowder
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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Re: .setStyle - overwrites existing style?

2009-07-21 Thread T.J. Crowder
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:

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread T.J. Crowder
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

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Alex McAuley
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:

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Atanu Dey
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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread 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'. [3] Instead, there is the old (still buggy)

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Delete PHP

2009-07-21 Thread Yan Kovyakh
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';

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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';

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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]

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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]

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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 -

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread Richard Quadling
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

[Proto-Scripty] Re: Checking if prototype is loaded

2009-07-21 Thread Richard Quadling
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,

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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 //

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread ColinFine
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Need help for performantly creating tooltips

2009-07-21 Thread Chris
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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.

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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.

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Chris
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) {

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Chris
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

[Proto-Scripty] Parsing XML

2009-07-21 Thread ferion
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Walter Lee Davis
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){

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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 =

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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:

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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:

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
$$('#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

[Proto-Scripty] Re: selectors failing in IE8FF3

2009-07-21 Thread Rick Waldron
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

[Proto-Scripty] Re: Ajax call is not working in MAC(Firefox)

2009-07-21 Thread T.J. Crowder
@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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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();

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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();

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Walter Lee Davis
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”

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread 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:

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Walter Lee Davis
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

[Proto-Scripty] Re: Need help for performantly creating tooltips

2009-07-21 Thread Diodeus
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

[Proto-Scripty] Re: Need help for performantly creating tooltips

2009-07-21 Thread Alex McAuley
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:

[Proto-Scripty] Re: Need help for performantly creating tooltips

2009-07-21 Thread Richard Quadling
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 :

[Proto-Scripty] Re: Delete php

2009-07-21 Thread Alex McAuley
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

[Proto-Scripty] Re: Need help for performantly creating tooltips

2009-07-21 Thread Chris
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

[Proto-Scripty] Delete php

2009-07-21 Thread Yan Kovyakh
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

[Proto-Scripty] Re: Parsing XML

2009-07-21 Thread ferion
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