Framesets & Dynamic Navigation

  • Thread starter Thread starter Guest
  • Start date Start date
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!!
 
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.
 
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
 
Hi Pete,

You can use this code:

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

Good luck! Ken.
 
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
 
Back
Top