On 7 Jan 2004 06:22:45 -0800, Adam <sh********@yahoo.com> wrote:
Maybe this is a simple question, but what Arguments can be used with
the familiar MM_swapImage?
I can get it to work no problem, in this way:
MM_swapImage('THE NAME OF OLD IMAGE TAG','','MOUSEOVER IMAGE')
But what can the blank middle argument do? Have I also seen number
arguments at the end of the function as well?
I guess what I am looking for is a good specification of this function
I have seen in many places. But also, since I have seen this in many
places... is this someones or some companys code that people are
stealing? I hope not.
I'll answer the last question first: the MM_swapImage function - and the
associated MM_findObj, MM_swapImgRestore, and MM_preloadImages functions -
are generated by Macromedia's Dreamweaver program. I doubt they
copyrighted the functions, but you never know...
The arguments passed to the MM_swapImage function are triplet sequences.
The first is the NAME or ID of an IMG element, form control, or layer that
will have it's image replaced. You can also reference these objects even
if they exist in another frame by placing a question mark (?) in the name.
For example:
"myMainFrame?myImage"
The second does nothing (in v3.0 of the function) - there is no reason
what-so-ever for it to be there. You could pass anything to it (null,
rather than '', is probably the most efficient). The purpose might change
in the future.
The third is a URI (absolute or relative) that points to the new image to
be displayed.
This then repeats: the fourth is the NAME or ID of an IMG element, the
fifth means nothing, and the sixth is a URL, etc.
This is from what I understand of the function just by looking at it. I
haven't seen an actual reference (I don't use Dreamweaver or the above
functions). In other words - take the above with a pinch of salt; I could
be wrong.
Mike
--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)