You know, after checking access logs on the server-side, I've noticed
intermittently -NO- POST requests are being made to the server. It's almost
as if the JavaScript never gets called. I slide a hidden div into view, and
make an XHR call to draw my HTML. I'd say 7 out of 10 times, it will draw
the rest of the div. At least 3 times no POST request is made. Really
disappointing. :-(

The code is very simple:

function populate_edit_form(patient_id) {

    /* ajax call to server, we need to populate the
       edit patient form with values received from the db */

        new Ajax('ajax/draw_edit_patient_form', {
              data: { 'patient_id': encodeURIComponent(patient_id) },
            method: 'post',
            update: 'edit_patient_form_container'
        }).request();

        slidePanel('patient_list_view', 'edit_patient_view', 'up');

}

- sf

On 12/28/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
>
> Yes, the rest of the HTML is being echoed back from the server in an XHR
> object. I did setup an onFailure callback with alerts, and it triggered at
> odd intervals.  Certainly not consistently otherwise I'd say something is
> blatantly wrong with my code. Why it fails would be really key to figuring
> out the issue here.
>
> On 12/28/07, ∞ | millenomi <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > On Dec 27, 8:24 pm, "Steve Finkelstein" <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > I'm experiencing intermittent oddities with my JS on an application
> > I'm
> > > currently working on. Essentially, I have a hidden div that gets put
> > into
> > > the viewport based on a click action.  It looks a little something
> > like
> > > this:
> > >
> > > <!-- START EDIT_PATIENT_VIEW -->
> > > <div class="edit_patient_view" id="edit_patient_view"
> > style="display:none;">
> > >     <h1 id="pageTitle">Edit Patient</h1>
> > >     <a id="homeButton" class="button" href="javascript:void();"
> > > style="display: inline;margin:0;"
> > >
> > onmousedown="slidePanel('edit_patient_view','patient_list_view','right')"><
> > img
> > > src="<?= base_url() ?>media/img/homeicon.png" alt="Home"></a>
> > >     <div class="panel" id="edit_patient_form_container">
> > >
> > >     </div>
> > > </div>
> > > <!-- END EDIT_PATIENT_VIEW -->
> > >
> > > Once that comes into play, I make an ajax call to the server, which
> > > populates a form into that view. It's basically a PHP variable that I
> > > populate with HTML and then echo back into the viewport.  80% of the
> > time it
> > > works fine. Another 20% just the hidden div comes in without any of
> > the
> > > content from the server.
> >
> > Is the content being served from the server? Is XHR reporting an
> > error? (You can use a few well-placed alerts(), if nothing else, to
> > check that out.)
> >
> > - ∞
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to iphonewebdev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to