Does any know how to find the previous element which was clicked?
Thank you so much,
Tharapon
--~--~-~--~~~---~--~~
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
Hi,
What do you mean by previous? Previous in the DOM, previous in
time, ...? The more thorough you are in the info you provide, the
more people will be able to help.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available
On Jul 20, 10:30 am,
Sorry, the last selected element.
I clicked textbox in form and click the link or button, so I want to
know the textbox I've selected.
Thank you,
Tharapon
On Jul 20, 4:39 pm, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
What do you mean by previous? Previous in the DOM, previous in
Morning guys.
Does anyone know a way to check if prototype is loaded or not
I have tried if(Prototype) { ... but just throws an undefined error.
I know i know i should know if it is loaded or not but my servers use
very heavy aggressive caching due to massive user loads and i noticed
in
Sorry my bad was if(window.Prototype) ...
Sorry for silly post !!
Alex
- Original Message -
From: Jeztah webmas...@thecarmarketplace.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, July 20, 2009 11:07 AM
Subject: [Proto-Scripty] Checking
Hi,
I'll be interested to see the answers to this question, I'm sure
there's a better way than the way I've done it previously.
I needed to do something along those lines, keep track of which text
box the user was in before they clicked a button. I ended up keeping
track of the most recent
new Draggable('parentDiv',{ scroll: window });
I am creating a Parent Div and appending a top, body and bottom Div
and adding buttons to a table in the body div.
When I apply the Draggable to the parent Div the draggable features
are bubbling through to the childnodes. Is there a way to stop
Blech, should have used Pastie -- here you go:
http://pastie.org/551911
-- T.J.
On Jul 20, 11:17 am, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
I'll be interested to see the answers to this question, I'm sure
there's a better way than the way I've done it previously.
I needed to do
Some people just create an array at page load and push history to the array
(similar to TJ's explination) ... it seems the cleanest way to do it .. you
could also update a hidden element with the id of the element if you wanted
... using an array allows you to access all hostory on that page
Just an FYI incase anyone wondered
It seems (at least in firefox 3x, IE7+, CHrome, Safari (windows)) that the
browser or prototype itself wont load 2 copies of it
To Test i included prototype.js in the head and included it again in the
body and there was only one output of
T.J. Alex, thanks for your suggestion!
On Jul 20, 5:21 pm, Alex McAuley webmas...@thecarmarketplace.com
wrote:
Some people just create an array at page load and push history to the array
(similar to TJ's explination) ... it seems the cleanest way to do it .. you
could also update a hidden
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
Just an FYI incase anyone wondered
It seems (at least in firefox 3x, IE7+, CHrome, Safari (windows)) that the
browser or prototype itself wont load 2 copies of it
To Test i included prototype.js in the head and included it
Yer i dont load it via src= as it slows the page down dramatically!!!
Contrary to popular belief i have tried and tested external scripts and
external css files and due to browsers paralell downloads with YSlow i can
save around 7 seconds on loading a very heavy page full of
Let's look at the method checkAll in Contact object:
var Contact = {
initialize: function(json,id_contact){
$('check-all').observe('click',this.checkAll.bindAsEventListener(this));
},
checkAll: function(e) {
e.stop();
this.contactChecked = [];
Hi,
When I apply the Draggable to the parent Div the draggable features
are bubbling through to the childnodes. Is there a way to stop this
happening.
It sounds like you want the parent div to be dragged by grabbing a
handle (I'm guessing the top div within it?), rather than anywhere in
the
ok thx, though it was a default behaviour
2009/7/20 T.J. Crowder t...@crowdersoftware.com
Hi,
When I apply the Draggable to the parent Div the draggable features
are bubbling through to the childnodes. Is there a way to stop this
happening.
It sounds like you want the parent div to
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
Yer i dont load it via src= as it slows the page down dramatically!!!
Contrary to popular belief i have tried and tested external scripts and
external css files and due to browsers paralell downloads with YSlow i can
save around 7
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
With a script that gathers everything first, minifies, checks for gzip
handling and outputs the appropriate response! ... same with CSS.
When i started looking into speeding pages up using the google page speed
add on for firefox i had
Hello prototypers,
I'm getting a basic error (in selectors) in *IE8/FF3* and don't think
anyone has reported it yet -- or maybe did, i searched but not
extensively.
The problem is that the Element#selector fails when invoked on an
Element that has a '.' in its id.
I've put a small unit test on
The technique i developed is about 5 times faster than the one in the link
you provided and alot less server load!...
However back in 2006 it was good insight from razaak to achieve it that
way..
Thanks for the info.
Alex
- Original Message -
From: Richard Quadling
2009/7/20 Mona Remlawi mona.reml...@gmail.com:
Hello prototypers,
I'm getting a basic error (in selectors) in *IE8/FF3* and don't think
anyone has reported it yet -- or maybe did, i searched but not
extensively.
The problem is that the Element#selector fails when invoked on an
Element
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
The technique i developed is about 5 times faster than the one in the link
you provided and alot less server load!...
However back in 2006 it was good insight from razaak to achieve it that
way..
Thanks for the info.
Alex
I can share most of it though the minifier i wrote is not available as its
part of a package someone paid me to develop
I can certainly give you the concepts of what needs doing and i am sure you
can work out the code.
I'll make a pastie of everything that should be done and put the link
You've guessed it, it's unfeasible, the amount of effort that takes
makes my head hurt :)
Anyway, i found the little bug in prototype (hooray!).
IE8 and FF3 have their selectors go into 'selectorsAPI' mode, now into
some debugging (version: 1.6.0.3)
2723: this.mode = 'selectorsAPI';
...
2009/7/20 Alex McAuley webmas...@thecarmarketplace.com:
I can share most of it though the minifier i wrote is not available as its
part of a package someone paid me to develop
I can certainly give you the concepts of what needs doing and i am sure you
can work out the code.
I'll make
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, July 20, 2009 4:38 PM
Subject: [Proto-Scripty] Re: Checking if
So I have some kind of Ajax callback to a php, when you click a certain
thing. I don't know how to set the delete php so It will delete the row from
the table. Can somebody share it?
$('clones').observe('click',function(evt){
var elm = evt.element();
if
you want the php code or the code to remove a table row with javascript?
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Monday, July 20, 2009 4:48 PM
Subject: [Proto-Scripty] Delete php
So I have some kind of Ajax callback to a
Make a script called remove_clone.php. Give it the ability to delete a
row from your database if it receives a valid ID as a POST parameter.
Have it return a 200 header if it succeeds, and a 500 if it fails.
For example --- untested:
//include the MyActiveRecord ORM
Seems like something is wrong, maybe it's not sending the id at all, when I
look at it in firebug XHR at the POST remove_clone.php in the post tab I see
clone, shouldn't there be a value to for the id?
--~--~-~--~~~---~--~~
You received this message because you
What is {clone:id} and where did you get it from ?
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Monday, July 20, 2009 7:00 PM
Subject: [Proto-Scripty] Delete php
Seems like something is wrong, maybe it's not sending the id at
It's the new element that gets created:
var clone = new Element('li', {style: 'position: relative'});
clone.id = transport.responseText;
It's ripped of the script, tell me if you need more.
--~--~-~--~~~---~--~~
You received this message because you are
In this line:
var id = elm.id.split('_').last();
the id of the list item containing the remove link must be constructed
like this:
clone_123
where 123 is the numerical ID from the database of the element you
wish to remove.
All of this is predicated on the initial clone process
Sorry i read your script wrong.
- Original Message -
From: Yan Kovyakh
To: prototype-scriptaculous@googlegroups.com
Sent: Monday, July 20, 2009 7:12 PM
Subject: [Proto-Scripty] Delete php
It's the new element that gets created:
var clone = new Element('li',
They actualy have Item_numericalID
Is this the problem?
--~--~-~--~~~---~--~~
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
Dude, firstly please stop topping the message and removing the code and replies
from your replies.
secondly: try the below script and see what gets alerted (it should be your
numeric ID, if not then you have something wrong somewhere
$('clones').observe('click',function(evt){
var elm =
Ya, I'm getting an empty box, so something is wrong.
Dude, firstly please stop topping the message and removing the code and
replies from your replies.
secondly: try the below script and see what gets alerted (it should be
your numeric ID, if not then you have something wrong
Alex McAuley schrieb:
Dude, firstly please stop topping the message and removing the code
and replies from your replies.
secondly: try the below script and see what gets alerted (it should be
your numeric ID, if not then you have something wrong somewhere
Ya, I'm getting an empty box, so something is wrong.
On Jul 20, 10:18 pm, Alex McAuley webmas...@thecarmarketplace.com wrote:
Dude, firstly please stop topping the message and removing the code and
replies from your replies.
secondly: try the below script and see what gets alerted (it
Ya, I'm getting an empty box, so something is wrong.
Dude, firstly please stop topping the message and removing the code and
replies from your replies.
secondly: try the below script and see what gets alerted (it should be
your numeric ID, if not then you have something wrong
I've come across a problem that maybe someone in this group can help.
Context:
--
I'm running a SCORM engine within a portal. The engine is essentially
the ADL sample runtime, which uses prototype to communicate between
the SCORM api wrapper and the server.
I've tested the
Instead of changing the way the core works... and potentially causing
breakage to existing code - perhaps you might try rewriting your selector
statement with escaped periods.
This question caused me to read a bunch regarding valid id's from one html
spec to another, and then double back to css
I feel like i should provide more insight. That was rather vague. An ID
could be labelled a.b:c and referenced in your style sheet as #a.b:c but
as well as being the id of an element, it could mean:
id a, class b, pseudo-selector c.
Best to avoid the confusion and stay away from using . and :
43 matches
Mail list logo