473,324 Members | 2,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Javascript help

I don't write much javascript so I was hoping to get some direction here on
how best to approach a problem.

I want to do a tab folder approach where maybe I have some image buttons
that look like folder tabs at the top that are client side buttons. For
each button I have a panel with different server side controls on it. When
a button is hit I want to make the appropriate panel visible and the rest of
the panels invisible (or maybe I just have to change the Z value?)

I suppose I should use html panels (<div>) instead of web control panels?

Any help would be much appreciated.

Thanks,
T
Jan 23 '06 #1
3 1433
Tina,
You really don't need to worry about javascript to do this. In ASP.NET 1.1,
there is the Microsoft IE WebControls suite which provides a TabStrip and
MultiView set of controls that work together to do this.
In ASP.NET 2.0, there are built - in controls for this.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tina" wrote:
I don't write much javascript so I was hoping to get some direction here on
how best to approach a problem.

I want to do a tab folder approach where maybe I have some image buttons
that look like folder tabs at the top that are client side buttons. For
each button I have a panel with different server side controls on it. When
a button is hit I want to make the appropriate panel visible and the rest of
the panels invisible (or maybe I just have to change the Z value?)

I suppose I should use html panels (<div>) instead of web control panels?

Any help would be much appreciated.

Thanks,
T

Jan 23 '06 #2
Hi,

Tina wrote:
I don't write much javascript so I was hoping to get some direction here on
how best to approach a problem.

I want to do a tab folder approach where maybe I have some image buttons
that look like folder tabs at the top that are client side buttons. For
each button I have a panel with different server side controls on it. When
a button is hit I want to make the appropriate panel visible and the rest of
the panels invisible (or maybe I just have to change the Z value?)

I suppose I should use html panels (<div>) instead of web control panels?

Any help would be much appreciated.

Thanks,
T


There are different approaches to this problem. First you must decide if
the "tab switch" happens on the server (i.e. if a roundtrip will be
made) or on the client (pure javascript switch).

If you decide yourself for the first one, you must render one "tab" only
on the server. When the "tab button" is clicked, it must submit the form
to the server, where you can decode the action and render the
appropriate tab.

If you want to do everything on the client, then it's a bit more
complicated. You must render all the tabs on the server first, and then
find a way to "hide" the ones you don't want to display. This can be
done either by setting the Z-index, but I wouldn't do this. The Z-index
can only be used if the DIV are absolutely positioned, and absolute
positioning should be used with care, especially if your HTML pages may
run in different browsers.

I would rather use the "display" CSS attribute, setting it to "block" or
"none" using JavaScript. Another way is to use DOM Level 2 to get the
corresponding node, and to "remove" it from the DOM tree, saving it
temporarily in the browser's memory. This is tricky, but I already did
that and it works well.

Note that the "Panel" web control does nothing more than render a DIV
HTML tag, so it doesn't make much of a difference if you use one or the
other.

My recommendation is: First decide if you want a server-side tab
switching or a client-side one. Then only you decide what strategy you
want to follow.

Ask again if something is not clear.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 23 '06 #3
Those controls are no longer available for download as per Microsoft.

(See Peter Huang's [msft] reply to DeanBlakely on the webControls forum.)

T

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:A6**********************************@microsof t.com...
Tina,
You really don't need to worry about javascript to do this. In ASP.NET
1.1,
there is the Microsoft IE WebControls suite which provides a TabStrip and
MultiView set of controls that work together to do this.
In ASP.NET 2.0, there are built - in controls for this.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tina" wrote:
I don't write much javascript so I was hoping to get some direction here
on
how best to approach a problem.

I want to do a tab folder approach where maybe I have some image buttons
that look like folder tabs at the top that are client side buttons. For
each button I have a panel with different server side controls on it.
When
a button is hit I want to make the appropriate panel visible and the rest
of
the panels invisible (or maybe I just have to change the Z value?)

I suppose I should use html panels (<div>) instead of web control panels?

Any help would be much appreciated.

Thanks,
T

Jan 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.