Sure, that's what Javascript is made for.

<script type="text/javascript">
window.onload = function(){
      document.getElementById('test').innerHTML = "First";
      document.getElementById('test').innerHTML = "First";
      document.getElementById('test').innerHTML = "First";
}
</script>

Of course, you will have to add in your own time functions.  Beware
that on some browsers, innerHTML does not work.

Here is a very good article on doing this with the DOM.  Read it:
http://slayeroffice.com/articles/innerHTML_alternatives/

As I said before, beware of innerHTML, it is not standard.  Read the
article and try to use the DOM.  Use innerHTML if you want to do quick
tests but, don't forget to change it when it goes into production.

On Feb 11, 3:56 am, "skyblueink" <[EMAIL PROTECTED]> wrote:
> //index.thtml
> <?php
> $text='first';
> CODE1
> ?>
>
> <?php
> $text='second';
> CODE2
> ?>
>
> <?php
> $text='third';
> CODE3
> ?>
>
> <div id='test'></div>
>
> Hi, the preceding example shows index.thtml, and I want javascript
> update the div (id=test) three times on the client side without using
> any view files such as 'url' => '/demo/test' so that the div is
> updated to show the $test strings, i.e. "first", "second", and "third'
> in sequence. I guess the javascript  code CODE1 = CODE2 = CODE3, and
> don't want any link buttons, just want get it work by loading
> index.thtml. can anyone help me?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to