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 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
>
> Geoff
>
> 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
> > > 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 is showing), my guess is that this code is getting called
> > > twice -- first when flag10 is true, then again afterwards when flag10
>
> > OK - thanks for that thought - will check further.
>
> > Cheers
>
> > Geoff
>
> > > is false and flaglast is true.  The alert holds back the second
> > > update, and so you see the result of the first one.  Something along
> > > those lines.
>
> > > FWIW,
> > > --
> > > T.J. Crowder
> > > tj / crowder software / com
> > > Independent Software Engineer, consulting services available
>
> > > On Jul 11, 12:12 pm, geoffcox75 <g...@freeuk.com> wrote:
>
> > > > 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 "flaglast" variable is set and make sure it 
> > > > > is
> > > > > false in the  first instance. You might also want to typecast it to 
> > > > > make
>
> > > > Alex,
>
> > > > I have tried various options but the returned text still flashes by!
>
> > > > I have checked that at the start of the function with the code I have
> > > > shonw in it, flag10 is false and flaglast is true and indeed the right
> > > > code is used as the right values get into mysql (i.e. those using the
> > > > second set of Ajax code).
>
> > > > So I still don't see why the text from the php flashes before my eyes!
>
> > > > I must be still missing some thing!
>
> > > > Cheers
>
> > > > Geoff
>
> > > > > sure its boolean:
> > > > > var flaglast=false;
>
> > > > > Ajax code {.............}
> > > > > // Notice the 3 equals)
> > > > > if(flaglast===true) {
> > > > > do something
>
> > > > > }
>
> > > > > or you could remove the else if and use a switch or just "ifs"
>
> > > > > if(flag10===true) {
> > > > > .. do stuff}
>
> > > > > if(flaglast===true) {
> > > > > do some other stuff....
>
> > > > > } else {
>
> > > > > alert("Oops something went wrong");
>
> > > > > }
>
> > > > > HTH
>
> > > > > Alex
>
> > > > > ----- Original Message -----
> > > > > From: "geoffcox75" <g...@freeuk.com>
> > > > > To: "Prototype & script.aculo.us" 
> > > > > <prototype-scriptaculous@googlegroups.com>
> > > > > Sent: Saturday, July 11, 2009 10:15 AM
> > > > > Subject: [Proto-Scripty] Re: text from php flashes by!?
>
> > > > > 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 database using the php file but the
> > > > > text message coming back from the php file into the updateDiv <div>
> > > > > only stays on the screen for a split second unless I add the alert! Of
> > > > > course I do not want the alert but by chance I found that having the
> > > > > alert for some reason causes the message to stay on the screen ...
>
> > > > > Cheers
>
> > > > > Geoff
>
> > > > > On Jul 11, 9:57 am, "Alex McAuley" <webmas...@thecarmarketplace.com>
> > > > > wrote:
> > > > > > 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 flashes by!?
>
> > > > > > > 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',
> > > > > > > 'fv-c1-arrays4-mysql-minus-wm.php',
> > > > > > > {
> > > > > > > asynchronous:true,
> > > > > > > method:'post',
> > > > > > > parameters: params
> > > > > > > }
> > > > > > > );
> > > > > > > resultsSaved = true;
> > > > > > > flag10 = false;
>
> > > > > > > } else if (flaglast == true) {
> > > > > > > alert("press OK");
> > > > > > > new Ajax.Updater(
> > > > > > > 'updateDiv',
> > > > > > > 'fv-c1-arrays4-mysql-minus-wm.php',
> > > > > > > {
> > > > > > > asynchronous:true,
> > > > > > > method:'post',
> > > > > > > parameters: params
> > > > > > > }
> > > > > > > );
> > > > > > > resultsSaved = true;
> > > > > > > flaglast = false;
> > > > > > > } else {
> > > > > > > alert("oops");
> > > > > > > }
--~--~---------~--~----~------------~-------~--~----~
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.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to