and to note

"I had already nivestigated the various ways of using callbacks, but
it
seemed that the callback was instantiated before the content was
actually traversible"

is absolutely and positively not the case if coded properly....



On Nov 11, 10:02 pm, GT <geoffrey.tran...@gmail.com> wrote:
> Hey there Michel,
>
> I had already nivestigated the various ways of using callbacks, but it
> seemed that the callback was instantiated before the content was
> actually traversible.
>
> The solution was actually on StackOverflow... 
> athttp://stackoverflow.com/questions/133310/how-can-i-get-jquery-to-per...
>
> It was obvious the moment I got it through my thick skull that what I
> wanted to do was 'AJAX without the A'. From there everything fell into
> place - su much so that it only took me 10 minutes to get th solution
> implemented.
>
> Cheers
>
> GT
>
> On Nov 6, 6:15 pm, Michel Belleville <michel.bellevi...@gmail.com>
> wrote:
>
> > This might help 
> > :http://docs.jquery.com/Tutorials:Getting_Started_with_jQueryhttp://do...
>
> > Michel Belleville
>
> > 2009/11/6 GT <geoffrey.tran...@gmail.com>
>
> > > Hi y'all.
>
> > > I have a page that once given an input, goes and loads five DIVs with
> > > content; four of the divs are not visible (they are made visible by a
> > > click on a tab interface).
>
> > > What I had tried to do was as folows (given that the code has either
> > > been passed as a POST (the 'asxcode='' gets filled in by <?php echo
> > > $_POST['ASXCode'] ?> ) OR has been entered in the input box #getCode
> > > and the Submit button #hitThat clicked...)
>
> > > What I really wanted was for the call to doTheFirst() to populate
> > > #summDiv, and THEN to go and doTheRest; that is, I wanted #summDiv's
> > > content to be completely loaded and fopr the page to be 'navigable'...
> > > and for the rest of the divs to load 'in the background' as it were.
>
> > > What I find is that quite often the other divs are loading and are
> > > finished WELL brfore #summDiv is populated (that is, before the call
> > > to StockFullSum.php has fully returned its response).
>
> > > Can anybody offer any guidance on this? I attach the javascript (of
> > > course, jquery.js is called before this javascript script is included)
>
> > > Cheers,
>
> > > GT
>
> > > here's the script.....
>
> > > <script  type="text/javascript">
> > > $(document).ready(function() {
> > > $("ul.tabs").tabs("div.panes > div");
> > > var asxcode= '';
> > > if(asxcode!=='')
> > > {
> > > dotheFirst(asxcode);
> > > }
>
> > > });
> > > $("#hitThat").click(function() {
> > >       var thisCode=$("#getCode").val();
> > >       dotheFirst(thisCode);
> > > });
>
> > > function dotheFirst(z) {
> > >      $("#summDiv").html('<center><img style="margin-top:70px;"
> > > src="http://localhost/WIP/loading.gif"; /></center>');
> > >      $("#summDiv").load("http://www.marketmentat.com/includes/
> > > StockFullSum.php<http://www.marketmentat.com/includes/%0AStockFullSum.php>",
> > > {ASXCode:z});
> > >      doTheRest(z);
> > > }
>
> > > function doTheRest(t){
> > >       $("#fundDiv").load("http://www.marketmentat.com/includes/
> > > StockFundSum.php<http://www.marketmentat.com/includes/%0AStockFundSum.php>",
> > > {ASXCode:t});
> > >       $("#techDiv").load("http://www.marketmentat.com/includes/
> > > StockTechSum.php<http://www.marketmentat.com/includes/%0AStockTechSum.php>",
> > > {ASXCode:t});
> > >       $("#sensDiv").load("http://www.marketmentat.com/includes/
> > > StockSensSum.php<http://www.marketmentat.com/includes/%0AStockSensSum.php>",
> > > {ASXCode:t});
> > >       $("#optDiv").load("http://www.marketmentat.com/includes/
> > > StockOptSum.php 
> > > <http://www.marketmentat.com/includes/%0AStockOptSum.php>",
> > > {ASXCode:t});
> > >       $("#newsDiv").load("http://www.marketmentat.com/includes/
> > > StockNewsSum.php<http://www.marketmentat.com/includes/%0AStockNewsSum.php>",
> > > {ASXCode:t});
> > > }
>
> > > </script>

Reply via email to