Connecting Tech Pros Worldwide Forums | Help | Site Map

Make panels visible and invisible.

Miguel Dias Moura
Guest
 
Posts: n/a
#1: Nov 18 '05
Hello,

i have 5 panels in an ASP.net / VB page.
The panel 1 is visible the other 4 are NOT visible.

I also have 5 images: image 1, image 2, ..., image5.

When i click one of the images, image N, the panel N becomes visible and
all the other invisible.

Can you tell me how shoudl the script be and how should be the image code
be?

Thank You,
Miguel



John Saunders
Guest
 
Posts: n/a
#2: Nov 18 '05

re: Make panels visible and invisible.


"Miguel Dias Moura" <web001@27NOSPAMlamps.com> wrote in message
news:uGhvv0HVEHA.3336@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hello,
>
> i have 5 panels in an ASP.net / VB page.
> The panel 1 is visible the other 4 are NOT visible.
>
> I also have 5 images: image 1, image 2, ..., image5.
>
> When i click one of the images, image N, the panel N becomes visible and
> all the other invisible.
>
> Can you tell me how shoudl the script be and how should be the image code
> be?[/color]

Miguel,

This is pretty basic JavaScript. You should probably pick up a beginners
book on JavaScript.

Otherwise, if you're having a particular problem with this, please let us
know.
--
John Saunders
johnwsaundersiii at hotmail


John Saunders
Guest
 
Posts: n/a
#3: Nov 18 '05

re: Make panels visible and invisible.


"Miguel Dias Moura" <web001@27NOSPAMlamps.com> wrote in message
news:uGhvv0HVEHA.3336@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hello,
>
> i have 5 panels in an ASP.net / VB page.
> The panel 1 is visible the other 4 are NOT visible.
>
> I also have 5 images: image 1, image 2, ..., image5.
>
> When i click one of the images, image N, the panel N becomes visible and
> all the other invisible.
>
> Can you tell me how shoudl the script be and how should be the image code
> be?[/color]

Miguel,

This is pretty basic JavaScript. You should probably pick up a beginners
book on JavaScript.

Otherwise, if you're having a particular problem with this, please let us
know.
--
John Saunders
johnwsaundersiii at hotmail


Henrik de Jong
Guest
 
Posts: n/a
#4: Nov 18 '05

re: Make panels visible and invisible.


Dear Miguel,

Play something with the style.display property with javascript... Are the
panels div's? When so, try with javascript the following:

divid.style.display = "none"; // sets an element at invisible, it will not
rendered by the engine.
divid.style.display = "block"; // or display="inline", do some experience
with it --> this makes the element visible, so the engine renders it.

take care that you set the display-property of all other panel on the
opposed value of the panel wich have to be made visible. implement this code
from the OnClick-event...

I hope that this helps you in the right direction.

kind regards,
Henrik


"Miguel Dias Moura" <web001@27NOSPAMlamps.com> schreef in bericht
news:uGhvv0HVEHA.3336@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hello,
>
> i have 5 panels in an ASP.net / VB page.
> The panel 1 is visible the other 4 are NOT visible.
>
> I also have 5 images: image 1, image 2, ..., image5.
>
> When i click one of the images, image N, the panel N becomes visible and
> all the other invisible.
>
> Can you tell me how shoudl the script be and how should be the image code
> be?
>
> Thank You,
> Miguel
>
>[/color]


Ireney Berezniak
Guest
 
Posts: n/a
#5: Nov 18 '05

re: Make panels visible and invisible.


Or, you can accomplish this on the server-side, if you would prefer not
to write a client script.

Convert the images to asp:imagebutton, bind a Click event to those
buttons, and in each method that is bound to the click even set the
visible property of the panels:

For example

Image button 1 click:

Panel1.Visible = true;
Panel2.Visible = false;
Panel3.Visible = false;

Image button 2 click:

Panel1.Visible = false;
Panel2.Visible = true;
Panel3.Visible = false;

etc. etc.

ib.


Henrik de Jong wrote:[color=blue]
> Dear Miguel,
>
> Play something with the style.display property with javascript... Are the
> panels div's? When so, try with javascript the following:
>
> divid.style.display = "none"; // sets an element at invisible, it will not
> rendered by the engine.
> divid.style.display = "block"; // or display="inline", do some experience
> with it --> this makes the element visible, so the engine renders it.
>
> take care that you set the display-property of all other panel on the
> opposed value of the panel wich have to be made visible. implement this code
> from the OnClick-event...
>
> I hope that this helps you in the right direction.
>
> kind regards,
> Henrik
>
>
> "Miguel Dias Moura" <web001@27NOSPAMlamps.com> schreef in bericht
> news:uGhvv0HVEHA.3336@TK2MSFTNGP11.phx.gbl...
>[color=green]
>>Hello,
>>
>>i have 5 panels in an ASP.net / VB page.
>>The panel 1 is visible the other 4 are NOT visible.
>>
>>I also have 5 images: image 1, image 2, ..., image5.
>>
>>When i click one of the images, image N, the panel N becomes visible and
>>all the other invisible.
>>
>>Can you tell me how shoudl the script be and how should be the image code
>>be?
>>
>>Thank You,
>>Miguel
>>
>>[/color]
>
>
>[/color]
Closed Thread


Similar ASP.NET bytes