Re: How to enable imagebutton from another frame
- From: "Rod" <camino.april@xxxxxxxxxx>
- Date: Thu, 4 Aug 2005 08:38:41 +0200
Thanks.
Using "....disabled" all it's all right.
A question: what is the difference using "...document.getelementbyid('...')
or ...document.all('..) ?
"Marius Tennes Krogh" <makro@xxxxxxxxx> ha scritto nel messaggio
news:OqHr7gGmFHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
> "Rod" <camino.april@xxxxxxxxxx> wrote in message
> news:uG7OXfCmFHA.3300@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi!
>> I have 2 frames called "Left" and "Main".
>> In the "main" I have this imagebutton (the enabled property is set to
>> "False"):
>>
>> <form id="Form1" method="post" runat="server">
>> <asp:imagebutton id="ImgBtProdotti" runat="server"
>> imageurl="/image.jpg"></asp:imagebutton>
>> </form>
>>
>> In the frame "Left" I have a butto and on the "click" event I want to
>> "enable" the "ImgBtProdotti".
>> I wrote :
>>
>> s = "<script language='javascript'>" & vbCrLf & "<!--" & vbCrLf &
>> "window.parent.frames['Main'].document.all('ImgBtProdotti').enabled =
>> True;"
>> & vbCrLf & "//-->" & vbCrLf & "</script>"
>> Response.Write(s)
>>
>> But It doesn't work. The error is : True is not defined.
>>
>>
>>
>> Could anyone help me ?
>>
>>
>>
>
> I think HTML elements have a "disabled" property and not a "enabled"
> property. And javascript is also case sensitive. So try to write this
> instead:
> window.parent.frames['Main'].document.all('ImgBtProdotti').disabled =
> false
>
> See this link for reference:
> http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/disabled_2.asp
>
> And you should use "document.getElementById(.....)" instead of
> "document.all(....)"
>
> Marius
>
.
- Follow-Ups:
- Re: How to enable imagebutton from another frame
- From: Marius Tennes Krogh
- Re: How to enable imagebutton from another frame
- References:
- How to enable imagebutton from another frame
- From: Rod
- Re: How to enable imagebutton from another frame
- From: Marius Tennes Krogh
- How to enable imagebutton from another frame
- Prev by Date: ASP.net Debugger and Persistent Connections
- Next by Date: Datagrid with scrollbars in firefox
- Previous by thread: Re: How to enable imagebutton from another frame
- Next by thread: Re: How to enable imagebutton from another frame
- Index(es):
Relevant Pages
|