[Proto-Scripty] text from php flashes by!?

2009-07-11 Thread geoffcox
Hello, Can anyone see why unless I have alert(press OK); or some other alert message, when flaglast is true, the text coming from the php script only stays on the screen for a split second! Thanks Geoff if (flag10 == true) { new Ajax.Updater( 'updateDiv',

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread Alex McAuley
Can you explain it a bit better as i cant understand what you are asking ! Alex - Original Message - From: geoffcox g...@freeuk.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Saturday, July 11, 2009 9:53 AM Subject: [Proto-Scripty] text from php

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
Alex, It's just that wheb flaglast is true the code new Ajax.Updater( 'updateDiv', 'fv-c1-arrays4-mysql-minus-wm.php', { asynchronous:true, method:'post', parameters: params } ); works fine and updates the mysql

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread Alex McAuley
Its doing the second ajax updater (the one with the alert in it) regardless of the flag. It is showing the text up because you are in effect putting a break point in it with the alert(); I would look at where the flaglast variable is set and make sure it is false in the first instance. You

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
On Jul 11, 10:46 am, Alex McAuley webmas...@thecarmarketplace.com wrote: Its doing the second ajax updater (the one with the alert in it) regardless of the flag. It is showing the text up because you are in effect putting a break point in it with the alert(); I would look at where the

[Proto-Scripty] Re: Is Form.Element.EventObserver deprecated ?

2009-07-11 Thread T.J. Crowder
Hi, Prototype does have something called Form.Element.EventObserver, but it appears to have no documentation whatsoever, even in the current 1.6.1 source code (documentation is being migrated to being inline with the source code and then generated as part of the build process). Looking at the

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread T.J. Crowder
Hi Geoff, My guess is that it's caused by something outside of the code you've quoted. For instance, what's _calling_ that code? Given where the alert is (and as Alex pointed out, an alert is basically a breakpoint -- all JavaScript execution on the page is completely suspended while the alert

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
On Jul 11, 12:36 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi Geoff, My guess is that it's caused by something outside of the code you've quoted.  For instance, what's _calling_ that code?  Given where the alert is (and as Alex pointed out, an alert is basically a breakpoint -- all

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
On Jul 11, 12:47 pm, geoffcox75 g...@freeuk.com wrote: On Jul 11, 12:36 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi Geoff, My guess is that it's caused by something outside of the code you've quoted.  For instance, what's _calling_ that code?  Given where the I have found the

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
Hello, the second div keeps the php message on the screen but I now get an error message re prototype 1.6.0.3, in Firefox it is this.url.match is not a function in Chrome an object has no method match both refer to line 1332 in the prototype js file. Any idea how to solve this one? Cheers

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
sorry the error messages have gone - must have been a typo. Geoff On Jul 11, 1:34 pm, geoffcox75 g...@freeuk.com wrote: Hello, the second div keeps the php message on the screen but I now get an error message re prototype 1.6.0.3, in Firefox it is this.url.match is not a function in

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread T.J. Crowder
Is it possible to remove the 'updateDiv', line and then only one div would be needed? There is no need for a returned message after the email has been sent, only after the data has gone to mysql. In that case, change it to an Ajax.Request rather than an Ajax.Updater. -- T.J. On Jul 11, 1:14 

[Proto-Scripty] Re: differences between mootools 'each' and Prototype 'Enumerable.each'

2009-07-11 Thread ronman
It works! Thank you muchly. Valuable for learning, too. Now the code executes far enough to uncover another similar problem which I think will go to my basic understanding of Javascript. I'm expecting it to act like PHP but I keep getting functions where I expect values: given: attr: {

[Proto-Scripty] Re: differences between mootools 'each' and Prototype 'Enumerable.each'

2009-07-11 Thread Rick Waldron
attr.edges is an array... keep it simple :) http://jsbin.com/unohi I just added to the last example, so view the source Rick On Sat, Jul 11, 2009 at 10:54 AM, ronman ron.new...@gmail.com wrote: It works! Thank you muchly. Valuable for learning, too. Now the code executes far enough

[Proto-Scripty] Re: text from php flashes by!?

2009-07-11 Thread geoffcox75
On Jul 11, 3:01 pm, T.J. Crowder t...@crowdersoftware.com wrote: Is it possible to remove the 'updateDiv', line and then only one div would be needed? There is no need for a returned message after the email has been sent, only after the data has gone to mysql. In that case, change it to

[Proto-Scripty] Re: differences between mootools 'each' and Prototype 'Enumerable.each'

2009-07-11 Thread ronman
Using an array works when it's empty, but unfortunately normally attr.edges is filled with rather complex objects. (I wanted to print one of the objects out for you but can't get Object.inspect(attr.edges) to show anything but [object Object] . Seems like javascript never wants to do what I

[Proto-Scripty] Re: differences between mootools 'each' and Prototype 'Enumerable.each'

2009-07-11 Thread ronman
Actually, more to the point, what I tried to do originally was detect an empty Hash and not go through each() at all in that case. But attr.edges.size() comes back as 32, not zero. alert(attr.edges.size) shows the source for the iterating function, as I said before, so apparently size() gives