|
Q1055 How can I place the link text on a link in a form field in another frame?
irt.org | Knowledge Base | JavaScript | Frame | Q1055 [ previous next ]
Q1055 How can I place the link text on a link in a form field in another frame?
Try something like:
<FRAMESET ROWS="50%,*">
<FRAME SRC="page1.htm" NAME="otherFrameName">
<FRAME SRC="page2.htm">
</FRAMESET>
|
And then in page1.htm:
<FORM NAME="formName">
<INPUT TYPE="TEXT" NAME="fieldName">
</FORM>
|
And then in page2.htm:
<SCRIPT LANGUAGE="JavaScript"><!--
function functionName(text) {
parent.otherFrameName.formName.fieldName.value = text;
}
//--></SCRIPT>
<A HREF="javascript:functionName(this.text)">link text</A>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.