> Here is the page being called . . . 
> <script  type="text/javascript">
> sayHi = function(){
> alert ('Hi');
> };
> </script>
> <input type="button" value="Click Me" onclick="sayHi()"/>
> My problem is that if I replace *alert* with *document.write* then the 
> page gets replaced with a new page.  I thought the idea behind AJAX.Updater 
> was to replace the DIV with new data, or in this case the result of the 
> function. *So in my newbie logic the DIV should get replaced with the 
> text generated by document.write.? *

You cannot use document.write() after your initial page is finished loading 
(in other words you cannot use document.write in fragments requested via 
AJAX). You should use DOM manipulation methods like Element#insert() or 

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to