Solved

Frame target from a Form Input tag?

Posted on 1997-12-18
4
307 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:sjp060497
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
rets earned 100 total points
ID: 1842314
Change _top to _self or main.  _top is the special target that goes to the 'top' and takes the whole browser back.  main is the name of the frame (per frame.html)

-K
0
 

Author Comment

by:sjp060497
ID: 1842315
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
0
 
LVL 1

Expert Comment

by:rets
ID: 1842316
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">
0
 

Author Comment

by:sjp060497
ID: 1842317
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
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now