aktivere script i en anden frame
Her er mit framesetstrOut = "<html><head><title></title></head>"
strOut = strOut & "<!-- frames -->"
strOut = strOut & "<frameset rows=""32,*"" frameborder=""no"" framespacing=""no"" border=0>"
strOut = strOut & "<frame name=nav_comp src=""nav_comp.asp?"" scrolling=no marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "<frameset cols=""0,*,0"" frameborder=""no"" framespacing=""no"" border=0>"
strOut = strOut & "<frame name=leftborder_grey src=""border_grey.asp"" scrolling=no bgcolor=#dddddd marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "<frameset rows=""1,*,0"" frameborder=""no"" framespacing=""no"" border=0>"
strOut = strOut & "<frame name=topborder_grey src=""border_grey.asp"" scrolling=no bgcolor=#dddddd marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "<frame name=gccomp src=""redirect.asp?" & strQuery & """ scrolling=auto marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "<frame name=bottomborder_grey src=""border_grey.asp"" scrolling=no bgcolor=#dddddd marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "</frameset>"
strOut = strOut & "<frame name=rightborder_grey src=""border_grey.asp"" scrolling=no bgcolor=#dddddd marginheight=0 marginwidth=0 noresize>"
strOut = strOut & "</frameset>"
strOut = strOut & "</frameset>"
strOut = strOut & "</html>"
Jeg skal fra framen gccomp aktivere et script i framen nav_comp, jeg havde håbet at kunne gøre det med onclick="parent.nav_comp.SetMenuColor1(2);" og på den måde aktivere scriptet som ses herunder:
strOut=strOut & vbCrLf & "<script>"
strOut=strOut & vbCrLf & "function SetMenuColor1(num)"
strOut=strOut & vbCrLf & "{"
strOut=strOut & vbCrLf & "var i; for (i=1;7>i;i++)"
strOut=strOut & vbCrLf & "{"
strOut=strOut & vbCrLf & "document.all('menu' + i).className='" & strNormalClass & "';"
strOut=strOut & vbCrLf & "document.getElementById('arrow' + i).style.visibility = ""hidden"";"
strOut=strOut & vbCrLf & "document.all('menu' + num).className='" & strActiveClass & "';"
strOut=strOut & vbCrLf & "document.getElementById('arrow' + num).style.visibility = ""visible"";"
strOut=strOut & vbCrLf & "}"
strOut=strOut & vbCrLf & "}"
strOut=strOut & vbCrLf & "</script>"
Men det virker ikke, er der nogen der har en idé til hvad jeg gør galt?