Passing values between frames

Montie

Newcomer
Joined
Feb 16, 2004
Messages
15
Hello!

I'm trying to make an usual "contents" frame page, with banner page in the top part, navigation menu on the left and contents on the right (main) part. I'm generation menu from the database (I'm using treeview web control) and links with it that point to the pages being viewed in the main frame.

I would like to let the user login in the "banner" top frame and then generate the menu in the "left" frame. How do I do that?

In more details, when the user types in his username and password and then clicks on "log in" button, I would like to generate the menu (I have a function for it), or it's hole page, in the "left"-menu frame. So, my menu page (which is in the left frame) needs to react to the event in the upper frame. In order to generate the appropriate menu for the user, I have to know his username in the "left", menu frame, so I also need to have information passed.

Can anyone help me with a tip or solution?


I'm kinda new to asp .net, so that's why I'm wondering about with it. I tried with Transfer method, but it reads my menu page in the same frame as the banner frame (and I want it it the left frame).
 
You can use an <object tag> in the head of the frameset to share data amonst all frames, or append the username to a querstring to the navigation page.
 
I guess that passing (accessing) values is not actually a problem, using session variables. My main trouble is how to raise event or call a function from one frame to another! With clicking on submit button in one frame, how do I call a procedure in another?
 
kahlua001 said:
You can use an <object tag> in the head of the frameset to share data amonst all frames, or append the username to a querstring to the navigation page.
We posted almost in the same moment. Sharing data between frames (and pages) wont be the problem, but calling a function from one frame to another is... as I wrote in my last post.
 
I dont know of a way to do this. So the best way is to push the data to a frame, either querystrings or post a form to it. either do the authentication in the login page on a postback or submit it to the navigation.
 
I would be even satisfied with a chance to reload the menu page in the left frame on a click button event in the upper banner frame... The treeview control I'm using in the menu page has a "target" property, so I just point it to the contents page. It would be nice if I could do something simiral in the banner page.

I could use a basic login page and then move on to the main page with frames and I will do that if nothing else works, but I would like for users to access some menus just by accessing the page and let them login in and reload the menu (either by calling a function, or reloading the whole page, it doesn't matter) and add additional ones according to their user rights.
 
Ok then after you login, display javascript at the bottom of your login page that refreshes any other frame, ie

top.frames[0].location.reload(true);

you can access the dom of a frame by using the index in which it is loaded or frame name.
 
Back
Top