Question 11 :
My page looks good on one browser, but not on another?
There are slight differences between browsers, such as Netscape Navigator and Microsoft Internet Explorer, in areas such as page margins. The only real answer is to use standard HTML tags whenever possible, and view your pages in multiple browsers to see how they look.
Question 12 :
How do I make sure my framed documents are displayed inside their frameset?
When the sub-documents of a frameset state are accessed directly, they appear without the context of the surrounding frameset.
A more universal approach is a "restore frames" link:
<A HREF="frameset.html" TARGET="_top"> Restore Frames
Note that in either case, you must have a separate frameset document for every content document. If you link to the default frameset document, then your reader will get the default content document, rather than the content document he/she was trying to access. These frameset documents should be generated automatically, to avoid the tedium and inaccuracy of creating them by hand.
Note that you can work around the problem with bookmarking frameset states by linking to these separate frameset documents using TARGET="_top", rather than linking to the individual content documents.
Question 13 :
How do I update two frames at once?
The HTML-based technique can link to a new frameset document with the TARGET="_top" attribute (replacing the entire frameset). However, there is an alternative if the frames to be updated are part of a nested frameset. In the initial frameset document, use a secondary frameset document to define the nested frameset. For example:
<frameset cols="*,3*"> <frame src="contents.html" name="Contents"> <frame src="frameset2.html" name="Display"> <noframes> <!-- Alternative non-framed version --> </body></noframes> </frameset>
A link can now use the TARGET="Display" attribute to replace simultaneously all the frames defined by the frameset2.html document.
<p><a href="URL1" target="Frame1" onClick="top.Frame2.location='URL2';"></p>Update frames
Question 14 :
Can I have two or more Submit buttons in the same form?
Yes. This is part of HTML 2.0 Forms support (some early browsers did not support it, but browser coverage is now excellent).
The submit buttons must have a NAME attribute. The optional VALUE attribute can be used to specify different text for the different submit buttons.
To determine which submit button was used, you need to use different values for the NAME and/or VALUE attributes. Browsers will send to the server the name=value pair of the submit button that was used. Here is an example:
<input type="submit" name="join" value="I want to join now"> <input type="submit" name="info" value="Please send full details">
Note that if you are using image submit buttons, you need to provide different NAME attributes for them too. Also, browser behavior can be inconsistent when the form is submitted without a submit button (e.g., by hitting ENTER).
If you're unsure what results you're going to get when you submit your form, TipJar has a standard script which you can use. Code this, for example (assuming method "post"):
<form method="post" action="http://www.yoursite.com/cgi-bin/test">
and then go through the motions of submitting your form. The TipJar server decodes the form input, and displays the result to you.
Question 15 :
How do I make a link or form in one frame update another frame?
In the frameset document (the HTML document containing the <frameset> <frame> tags), make sure to name the individual frames using the NAME attribute. The following example creates a top frame named "navigation" and a bottom frame named "content":
<frameset rows="*,3*"> <frame name="navigation" src="navigation.html"> <frame name="content" src="content.html"> <noframes><body> <!-- Alternative non-framed version --> </body></noframes> </frameset>
Then, in the document with the link, use the TARGET attribute to specify which frame should be used to display the link. (The value of the TARGET attribute should match the value of the target frame's NAME attribute.) For example:
<p><a target="content" href=...> </p>
To target a form submission, use the TARGET attribute of the FORM element, like this:
<p><form target="content" action=...> </p>
Normally, the default target frame is the current frame ("_self"). To change the default target for every link/form on the page, use the TARGET attribute of the BASE element, like this: