If you are reading this tip, then you should know that for the action hotspots (with @formula) Domino generates the _doClick(v, o, t) function. If you look in to the source code of your page then for the action hotspot you will see something like
onClick="return _doClick('e662ee54e6165298852569d7004f3d44/$Body/0.3B2E', this, null)"
So, if we could get the first parameter, then we could reuse it by writing our own _doClick function in the onClick event of our rollover buttons (with the same second and third parameters of course). In other words, on our form we will have the action hotspots that we will hide on web page and use only to retrieve the Domino generated _doClick's first parameter for our own _doClick.
Lets consider an example.
2. Open the properties for the hotspot and click on the last tab (HTML)
3. In the 'Id' field put some id (for example - ahId01)
4. Using passthru html surround your action hotspot with division tags. Don?t forget to hide it with the style="display:none" as we do not need it to appear on our web page example:
<DIV style="display:none"> .. your action hotspot(s) ... </DIV> 5. Put the following code in to the onLoad event of your form mystr = new String
mytmp = new String(mystr.slice(editstr.indexOf("'")+1))
mystr = mytmp.slice(0, mytmp.indexOf("'")) ...the purpose of this code is to retrieve the first parameter of the _doClick() function that we will use in our own _doClick for the rollover buttons later on. 6. Now create your rollover buttons. Your code will probably look similar to the following:
<A href="#" onMouseOver="..your onmouseover function.."
onMouseOut="..your onmouseout function.."
onClick="return _doClick(mystr, this, null)"><IMG
Note the first parameter for the _doClick function. As you already guessed, by the time your page is loaded 'mystr' will hold the same value as it was generated by Domino for the action hotspot.
Another advantage of this approach is that later when you need to change your @formula you don't need to worry about anything. Whatever Domino will generate it will always be put in to our "mystr" parameter.
The code works on both IE and Netscape browsers. The only exception for Netscape is that it has to be version 6 (as the earlier versions do not support DOM methods used in this code).