Re: How to enable imagebutton from another frame

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>


.



Relevant Pages

  • draged over reference
    ... using javascript, ... on my web page I have an image where user can drag it over many object like ... how can I get a reference to the object where the image is being draged over ... Prev by Date: ...
    (microsoft.public.scripting.jscript)
  • Re: How to enable imagebutton from another frame
    ... Marius ... And javascript is also case sensitive. ... >> See this link for reference: ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Need to change image of imagebutton in datagrid template column
    ... same thing only with client-side code? ... would reference it in Javascript. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • RE: How can I access an MSTextbox via Javascript?
    ... > I was unable to get this to work with MS Web Textbox only html. ... > words the javascript says the object doesn't exist when I try to reference ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: How can I access an MSTextbox via Javascript?
    ... >> I was unable to get this to work with MS Web Textbox only html. ... >> words the javascript says the object doesn't exist when I try to ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)