PDA

View Full Version : Get a <div> without naming it


Evlich
01-24-2003, 03:55 AM
Ok, here is what I have, I have a set of 3 divs for a module that i want to be able to include in my website a lot. But i dont want to bother with naming and making sure that the names are different. I want to call a function called addScroller() with the parameters, teh first div, the second div, the third div. How can I do this?
This is what I have:

<div style="height: 200px; width: 100px;" onload="_ss=this;"></div>
<div style="position: absolute; top: 0px; width: 0px; height: 0px; width: 0px;" onload="_sc=this;">
<div style="position: absolute; top: 0px; width: 0px; height: 0px; width: 0px;" onload="_st=this;"></div>
</div>
<script type="text/javascript">
addScroller(_ss, _sc, _st, 30, "Welcome to this page!", "This is a test of the emergency broadcast system!");
</script>

Do you have any idea how to do this? If you don't understand what I am trying to do, tell me, and i will try to clarify.
~evlich