473,395 Members | 2,689 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,395 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 1437
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.