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 t
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" wrote:
> Hi,
>
> What do you mean by previous? Previous in the DOM, previous in
> time, ...? The more t
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"
To: "Prototype & script.aculo.us"
Sent: Monday, July 20, 2009 11:07 AM
Subject: [Proto-Scripty] Checking if prototype is loaded
>
> Morning guys.
>
> Does anyone know a
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 text
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 t
Blech, should have used Pastie -- here you go:
http://pastie.org/551911
-- T.J.
On Jul 20, 11:17 am, "T.J. Crowder" 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 something along t
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 of
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 and included it again in the
body and there was only one output of javascript!..
T.J. & Alex, thanks for your suggestion!
On Jul 20, 5:21 pm, "Alex McAuley"
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 element with the id of the
2009/7/20 Alex McAuley :
>
> 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 and included it again in the
> body and there
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 prototype,jQ
> 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
t
ok thx, though it was a default behaviour
2009/7/20 T.J. Crowder
>
> 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 g
2009/7/20 Alex McAuley :
>
> 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 ve
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 7 red x's now i have 100% green ticks! which
is tha
2009/7/20 Alex McAuley :
>
> 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 7 red x's now i ha
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 pa
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"
To:
Sent:
2009/7/20 Mona Remlawi :
>
> 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
2009/7/20 Alex McAuley :
>
> 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 --
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 u
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';
...
2
2009/7/20 Alex McAuley :
>
> 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 t
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
>
> 2009/7/20 Alex McAuley :
>>
>> I can
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 (elm.hasClassName('remov
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 ph
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 http://github.com/walterd
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 al
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 s
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 w
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', {style:
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 prototype-scriptaculous@googlegroups.
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 = e
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 somew
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
>
>
> $('clones').observe(
Ya, I'm getting an empty box, so something is wrong.
On Jul 20, 10:18 pm, "Alex McAuley" 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 should be
your numeric ID, i
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 some
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 applicatio
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 se
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 . a
44 matches
Mail list logo