I was having trouble with using Ajax.Updater with evalScripts=true and
a javascript block with document.write in it.

What I am trying to do is, run some JS, and display the result of that
JS inline. However, it seems to only display the results of the
document.write, and none of the other content.


Right now, I call a function that spits out a JS block that does its
computation and writes to the page using document.write.  This
function is called as many times as is necessary with different
parameters and the results are put into the HTML.

I'm trying to think of a way around the document.write problem.

One way I can think of is something like this.

The function can output:
<span id='mailto_#'></span>
<script type='text/javascript'>
//... computations here
$('mailto_1').innerHTML=computationsResult;
</script>

(where # is a counter)

However I don't want to create a lot of spans with ids if I don't have
to. Does that make sense? Is there a better way to do this?

Thanks,
-d

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to