Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Re: .submit(....) problem Date: Sat, 1 Jun 2013 09:07:17 -0600 Lines: 51 Message-ID: References: <10nfa5ogfbi9n$.1bfhtk130g1fr.dlg@40tude.net> X-Trace: individual.net 3B+lpybc9dHageTrwRsG9QS3TQoKp4Z+ptPUb3r985OZ0zvH6f Cancel-Lock: sha1:2MpSaLsbZCWI60s5a2bmzlPuRCM= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:20106 JJ said: > What was suggested is to use IFRAME as the container for both the form, > and > the result. So there need to be at least 3 different pages: > > 1. The main page that host the IFRAME. > 2. The form page which is served in that IFRAME. > 3. The result page after the form is submitted - still in the IFRAME. > > If you don't want to use IFRAME, then you'll have to make the server > return > only the form result instead of the whole page. > > Once that's done, use AJAX to submit the form. You can find an example at > the bottom of this page (warning: long URL): > > https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/Sending_forms_through_JavaScript > > In that sendData function, instead of showing a message alert, put the > received data into a DIV's innerHTML property, or use the form's DIV > container Hi JJ: I read over your post again, and printed the 14-page link, and will study it carefully. I have already used the AJAX procedures (lightly) two years ago, but will shortly have need for them again -- so thanks again for the link. My original problem (very probably phrased crappily) was to leave the client's page 'frozen' at the point-in-time of submission of
info until the reception of the *new* page. This new page can take from < one second to sometimes up to ten seconds for my server app to do all the work of building the response page, and sending it. (the page can sometimes be up to 382K in size). So, while this work is being carried out, I wish the client's view of the original page be 'frozen' at what my JS code left it at just prior to the .submit sequence. Now, serendipitously, by using gzip (i.e., mod_deflate) in my Apache Server, this *does now* happen. So, my problem is (I guess) solved -- but I don't understand why . Re: your suggestion of AJAX --- I will be using it for the next stage to update info in the page.. Thank you. -Mel