Framesets & Dynamic Navigation

G

Guest

Hello- I am have a real trying time finding information on this subject. I
would like to create a web page that utilizes framesets (top & bottom) and a
navigation control I created from a datalist that gets data from a sql
datasource (sort of like a tabstrip). I'm getting pretty comforatable on the
asp.net side of things, but I'm lacking in the javascript department. I
understand that I need to add javascript to make the frames work properly.
Can anyone point me in the direction of some sort of sample of this scenario?
Ideally, I'd like it so when a user clicks on a tabstrip item in the top
frame, the bottom frame will change based on a querystring from the top
frame. Thanks!!
 
K

Ken Dopierala Jr.

Hi,

This won't take long. In the click event of your tabstrip item run this
code:

parent.document.getElementById("bottomframename").src = "ThePage.aspx";

This will navigate your bottom frame to whatever page you want it to go to.
Also I use IFrames instead of a FrameSet. Good luck! Ken.
 
G

Guest

Thanks Ken... so how do I get this into the click event? I'm getting the
data from sql with a datareader and binding it to a datalist. How/where do I
set the click event? Do I do this in my aspx page or the codebehind? Also,
why do you use IFrames instead? I do appreciate you taking the time to help
me!
Pete
 
K

Ken Dopierala Jr.

Hi Pete,

You can use this code:

btnTabButton.Attributes.Add("onclick",
"parent.document.getElementById(""bottomframename"").src =
""ThePage.aspx"";")

Good luck! Ken.
 
G

Guest

Thanks Ken! I got it... here's what I did...
After binding the datalist to the datareader, I then looped through the
datalist control and added the line of code you showed me. Thanks for
pointing me in the right direction!
Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top