jamesw
Member
Registered: 28th Jun 02
Location: Station Town, County Durham
User status: Offline
|
Really cant figure out why this doesnt work. The idea is I have an HTA file, two main spans involved in the issue, one with the ID desc, the other with midhtml.
I then have a vb sub that adds buttons to midhtml, I send parameters to the add button sub such as button name, action, and all that works fine, however what I wanted to do is pass another param that will define a onmouseover event it will set predefined text in the desc span.
E.g. of line to call the button sub is
addbutton "Manage Print Drivers","PRINTDRVS","P","Tooltip to display when hovering over print drivers button"
Here is my addbutton sub
sub addbutton (name,action,kaccesskey,description)
UpdatemidHTML ("<button style=""vertical-align:top"" onMouseOver=""javascript:this.className='button buttonhov';desc.innerHTML=description"" onMouseOut=""javascript:this.className='button'"" onMouseDown=""javascript:this.className='button buttonhov buttondown'"" onclick="""&action&""" accesskey="""&kaccesskey&""" class=""button"">"&name&"</button>")
size = size + 26
end Sub
What tends to happen is nothing is inserted to the desc innerhtml but I cant figure out why, I can do msgbox description and I get the correct description OK, I can also change the code slightly and use a variable that was declared much earlier such as strmachinename e.g. onMouseOver=""javascript:this.className='button buttonhov';desc.innerHTML=strmachinename"" and that also works fine
[Edited on 04-02-2011 by jamesw]
|