user control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • barry

    user control

    I have a <asp:panel defined on a asp.net 1.1 version.

    I have some javascript that is executed on an action in the panel. This
    works fine.

    but

    When I put the panel to an ascx file and then try to access the panel in the
    same javascript it does not recognized the panel.

    Protected WithEvents Panel4 As System.Web.UI.W ebControls.Pane l - has been
    defined in the ascx.vb file



    thanks





  • barry

    #2
    Re: user control

    This is the correct syntax in javascript to access the panel(in this case
    to make it hidden) from the user control page

    document.forms[0]('Panel4').styl e.visibility = "hidden";

    "barry" <flagisup@ix.ne tcom.com> wrote in message
    news:OMYxKArxFH A.2656@TK2MSFTN GP10.phx.gbl...[color=blue]
    > I have a <asp:panel defined on a asp.net 1.1 version.
    >
    > I have some javascript that is executed on an action in the panel. This
    > works fine.
    >
    > but
    >
    > When I put the panel to an ascx file and then try to access the panel in[/color]
    the[color=blue]
    > same javascript it does not recognized the panel.
    >
    > Protected WithEvents Panel4 As System.Web.UI.W ebControls.Pane l - has been
    > defined in the ascx.vb file
    >
    >
    >
    > thanks
    >
    >
    >
    >
    >[/color]


    Comment

    • barry

      #3
      Re: user control

      Never mind - this hides the whole page
      "barry" <flagisup@ix.ne tcom.com> wrote in message
      news:OOp5K%23rx FHA.3236@TK2MSF TNGP14.phx.gbl. ..[color=blue]
      > This is the correct syntax in javascript to access the panel(in this case
      > to make it hidden) from the user control page
      >
      > document.forms[0]('Panel4').styl e.visibility = "hidden";
      >
      > "barry" <flagisup@ix.ne tcom.com> wrote in message
      > news:OMYxKArxFH A.2656@TK2MSFTN GP10.phx.gbl...[color=green]
      > > I have a <asp:panel defined on a asp.net 1.1 version.
      > >
      > > I have some javascript that is executed on an action in the panel. This
      > > works fine.
      > >
      > > but
      > >
      > > When I put the panel to an ascx file and then try to access the panel in[/color]
      > the[color=green]
      > > same javascript it does not recognized the panel.
      > >
      > > Protected WithEvents Panel4 As System.Web.UI.W ebControls.Pane l - has[/color][/color]
      been[color=blue][color=green]
      > > defined in the ascx.vb file
      > >
      > >
      > >
      > > thanks
      > >
      > >
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • barry

        #4
        Re: user control

        Use the Flow Layout Panel in the html toolbox. This will allow you to make
        the panel hidden in javascript on a user control
        "barry" <flagisup@ix.ne tcom.com> wrote in message
        news:O78UkPsxFH A.1032@TK2MSFTN GP12.phx.gbl...[color=blue]
        > Never mind - this hides the whole page
        > "barry" <flagisup@ix.ne tcom.com> wrote in message
        > news:OOp5K%23rx FHA.3236@TK2MSF TNGP14.phx.gbl. ..[color=green]
        > > This is the correct syntax in javascript to access the panel(in this[/color][/color]
        case[color=blue][color=green]
        > > to make it hidden) from the user control page
        > >
        > > document.forms[0]('Panel4').styl e.visibility = "hidden";
        > >
        > > "barry" <flagisup@ix.ne tcom.com> wrote in message
        > > news:OMYxKArxFH A.2656@TK2MSFTN GP10.phx.gbl...[color=darkred]
        > > > I have a <asp:panel defined on a asp.net 1.1 version.
        > > >
        > > > I have some javascript that is executed on an action in the panel.[/color][/color][/color]
        This[color=blue][color=green][color=darkred]
        > > > works fine.
        > > >
        > > > but
        > > >
        > > > When I put the panel to an ascx file and then try to access the panel[/color][/color][/color]
        in[color=blue][color=green]
        > > the[color=darkred]
        > > > same javascript it does not recognized the panel.
        > > >
        > > > Protected WithEvents Panel4 As System.Web.UI.W ebControls.Pane l - has[/color][/color]
        > been[color=green][color=darkred]
        > > > defined in the ascx.vb file
        > > >
        > > >
        > > >
        > > > thanks
        > > >
        > > >
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Kevin Spencer

          #5
          Re: user control

          I'm confused. Which one of you (barry) is asking the questions, and which
          one of you (barry) is answering?

          Are you, by chance, schizophrenic? Possessed?

          :-P,

          Kevin Spencer
          Microsoft MVP
          ..Net Developer
          Big things are made up of
          lots of little things.

          "barry" <flagisup@ix.ne tcom.com> wrote in message
          news:e044rUsxFH A.3892@TK2MSFTN GP12.phx.gbl...[color=blue]
          > Use the Flow Layout Panel in the html toolbox. This will allow you to make
          > the panel hidden in javascript on a user control
          > "barry" <flagisup@ix.ne tcom.com> wrote in message
          > news:O78UkPsxFH A.1032@TK2MSFTN GP12.phx.gbl...[color=green]
          >> Never mind - this hides the whole page
          >> "barry" <flagisup@ix.ne tcom.com> wrote in message
          >> news:OOp5K%23rx FHA.3236@TK2MSF TNGP14.phx.gbl. ..[color=darkred]
          >> > This is the correct syntax in javascript to access the panel(in this[/color][/color]
          > case[color=green][color=darkred]
          >> > to make it hidden) from the user control page
          >> >
          >> > document.forms[0]('Panel4').styl e.visibility = "hidden";
          >> >
          >> > "barry" <flagisup@ix.ne tcom.com> wrote in message
          >> > news:OMYxKArxFH A.2656@TK2MSFTN GP10.phx.gbl...
          >> > > I have a <asp:panel defined on a asp.net 1.1 version.
          >> > >
          >> > > I have some javascript that is executed on an action in the panel.[/color][/color]
          > This[color=green][color=darkred]
          >> > > works fine.
          >> > >
          >> > > but
          >> > >
          >> > > When I put the panel to an ascx file and then try to access the panel[/color][/color]
          > in[color=green][color=darkred]
          >> > the
          >> > > same javascript it does not recognized the panel.
          >> > >
          >> > > Protected WithEvents Panel4 As System.Web.UI.W ebControls.Pane l - has[/color]
          >> been[color=darkred]
          >> > > defined in the ascx.vb file
          >> > >
          >> > >
          >> > >
          >> > > thanks
          >> > >
          >> > >
          >> > >
          >> > >
          >> > >
          >> >
          >> >[/color]
          >>
          >>[/color]
          >
          >[/color]


          Comment

          Working...