
 |
 |
WebGroove is no longer supported. These docs are reference only. |
|

|

Init Tag
This tag is most useful in macros, replaced text or inserted files where you have some code that must be used once to initialize but is not required elsewhere in the same output file.
 The rollover macro in our library makes good use of this tag to write out some JavaScript function definition code necessary for the rollovers to work. This "init" code is automagically handled the first time you use the rollover macro in a given output file; you don't have to call a special initialization routine. This action is loosely similar to an automatic object constructor.
 Example
<macro nifty_java>
<script language=JavaScript>
<!--
<init name=nifty_java_code>
 |
function setDefault(objSrc, objDest)
{
 |
// only need to define this once per output file
objDest.value = objSrc.value;
objDest.focus();
|
}
|
</init>
// when you use this macro more than once, this is
// the only section built into the current output file.
setDefault({src}, {dest});
// ->
</script>
</macro>
 Syntax
Tag pair only. The only attribute is the name of the block.
 Notes
You can leave the name off and the Compiler will use a generic system name for you. You should name blocks to improve reusability of your macro libraries. This tag is not necessary for good macro coding, but can be very handy in writing more optimized code.
 More
 Instant Image Rollover Macro
 See Also
 Macro Tag
 Up To
 Compiler Tags
 Complete Tag Reference
 WebGroove® is a registered trademark of Creativision Publishing Corporation
|
 |
 |
 |
|

|