Form to open page2 at ANAME un IFRAME

wxdqz

New Member
Hi,

I'm trying to get this script to work on a small page I'm playing about with, and I can't for the life of me get the result to appear in the IFRAME on the page. It always opens in as if the target were _top.

The idea of the script is to open the errormsg2 page at a specific ANAME point inside the IFRAME on this page. I've got it to open the scpecific point, but not to open it in the frame. I've tried assigning a target to the form itsenf, but the same result. I imagine that it has to be assigned in the functio. Can anyone help out, please? Thank you.

-Kassidy

BTW: My appologies for my lack of Javascript knowledge in advance, as really I don't go far beyond HTML, really.

--- In HEAD ---

<SCRIPT language="JavaScript">
function sendThrough() {
var xForm = document.forms['check']
location = 'errormsg2.htm#' + xForm.errnum.value
target = errordisp
}
</SCRIPT>

--- IFRAME in BODY ---

<iframe src=http://www.webdeveloper.com/forum/archive/index.php/"errormsg2.htm" style="width:500px; height:250px; overflow-y: none; overflow-x: none; border-style: none;" id="errordisp" name="errordisp" scrolling=no></iframe>

--- FORM in BODY ---

<FORM name="check">
Error Number: <INPUT name="errnum" type="text"><BR>
<INPUT type="button" value="Submit" onclick="sendThrough()">
</FORM>

--- ---
 
Back
Top