index.thtml
<?php echo $ajax->link('Click', '/sparks/update', array('update' =>
array('first', 'second'))); ?>
<div id="first">div first</div>
<div id="second">div second</div>
update.thtml
<?php echo $ajax->div('first'); ?>
<?php include "./contents1.php";?>
<?php echo $ajax->divEnd('first'); ?>
<?php echo $ajax->div('second'); ?>
<?php include "./contents2.php";?>
<?php echo $ajax->divEnd('second'); ?>
Hello! The preceding snippet is an example of multi <div> update, and
works greatly, but in a way somewhat different from what I expected.
What I expected was that "div first" or "div second" is firstly
updated (displayed on the screen), and then the other is updated. For
example, "div first" is replaced with contents1.php, and next "div
second" is replaced with contents2.php. I mean they are updated in
sequence. But actually they are updated not IN SEQUENCE, but
SIMULTANEOUSLY. What should I do to get them displayed on the screen
in sequence? Let's consider that both contents1.php and contents2.php
need several seconds to be loaded! Users don't like waiting longer
time on front of the computer screen, and would rather prefer seeing
them displayed in sequence than simultaneously.
Another question! I know the following code also displays
contents1.php and contents2.php simultaneously. But can I make them to
be displayed in sequence? This is simpler than the preceding one which
uses $ajax->div and $ajax->divEnd, and more preferred. Anyway what is
important is not to make users to wait for long time to see all. I
want contents1.php is firstly loaded to the screen, and next
contents2.php is loaded.
index.thtml
<?php echo $ajax->link('검색', '/sparks/update', array('update' =>
'first')); ?>
<div id="first">div first</div>
update.thtml
<div><?php include "./contents1.php";?></div>
<div><?php include "./contents2.php";?></div>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---