Link to home
Start Free TrialLog in
Avatar of sjp060497
sjp060497

asked on

Frame target from a Form Input tag?

Hi,
I am setting up some web pages that will include a navigation bar in a frame at the bottom of the page.  My ultimate goal is to have a different navigation bar, depending on where the user originally came from, even though most of the web pages in the upper main frame would be the same, regardless.  This is an educational site, where for example, students from a particular class would be presented with a different navigation bar at the bottom, than students in a different class.  Most of the pages they access in the upper frame would be the same, but some would be particular to that class.

I have no problem getting most of this to work.  But, I am having a problem with one of the pages that would be accessed from the navigation bar.  It is a "chat" program, that requires the user to login with a username and password.  The login page loads fine, with the navigation frame remaining at the bottom of the screen.  However, when the user "submits" his/her username and password to enter the chat room, a completely new window loads, without frames.  The "Enter Chat Room" submit button is an input form tag.  I know I can target a link from an "anchor" tag, but is it possible to target and input form tag?  Or, is there any other way to get the chat program to load without losing the navigation frame?

I have a test of this setup at http://nutrition.uvm.edu/weightloss/frame.html
You can see that the frames load nicely.  If you try entering the username TEST and the password 123, then press the "enter" button, the new page loads without the bottom navigation frame.

Any ideas?

Thanks in advance,
Stephen Pintauro
ASKER CERTIFIED SOLUTION
Avatar of rets
rets

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sjp060497
sjp060497

ASKER

Hello rets,
Thank you for your response.  However, I am still a bit confused.  Where, exactly would I add the "_self" target or the "main" target.  I tried adding the <base target="main"> or <base target="_self"> tags after the head tag in both the login html page, and the chat room html page.  Neither worked.  In all cases, when you enter the chat room, the browser window loses the navigation frame at the bottom.  Can a target be added within the <input> tag?

Thanks,
Stephen Pintauro
Replace this line in your HTML (/login/index.html):

<FORM Method="POST" ACTION="/eshare/server?action=61" TARGET="_top">

with:

<FORM Method="POST" ACTION="/eshare/server?action=61" TARGET="main">
Hello again, rets,
Thanks for your additional comments.  It now works great!.....kinda :)
I can now go to the chat room page with the navigation bar remaining in the bottom frame.  The problem now is that when I press the "exit" button for the Java chat client, the page returns to the login page without the lower navigation bar frame.  This seems to me to be a trickier problem, since I do not have access to the Java code that controls the exit button on the Java chat client.  The chat software "administration" controls allow me to specify an exit URL.  So, I could specify any page, even the frame.html page, but that would then apply to everyone who presses the exit button, even those who I do not intend to have return to the frame.html page.  The other "administrative" option I have with the Java client is to specify any "header" or "footer" html on the chat page.  That is how I added the Department of Nutrition and Food Sciences title to the top of the chat page, and the email contact at the bottom of the chat page.  

Can you think of any way that I could make use of these administrative options to get the chat program to return to the frames page when someone exits the chat client?

Thanks again,
Stephen Pintauro