Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.location, in frames

Status
Not open for further replies.

The

Programmer
Jul 30, 2001
92
CA
Hey,
I have a javascript on a link that uses &quot;document.loaction='<insert page here>' &quot;. My problem is that I want the &quot;target&quot; to be another frame (like when you would do <a href=&quot;blahdlfjl&quot; target=&quot;whatever&quot;>).

here's my basic code:

<head>
<script language=&quot;javascript&quot;>
function Start(page) {
var path='document.location=(path)
}

</script>

and in the body,

<a href=&quot;javascript:function('test1.html')&quot;>text here</a>


can anyone help?
 
i think you have the same problem that I had. try this(from my other msg and improvise)

alright. I found the solution. for those who wonder,here is how to do it:-


in b.html
-------------------------------------
<html>
<head>
</head>
<body>
<form id=&quot;frmParent&quot; name=&quot;frmParent&quot;>
<input id=&quot;txtInput&quot; name=&quot;txtInput&quot; value=&quot;helloooooooooo&quot;>
</input>
</form>
<iframe id=&quot;fr1' name=&quot;fr1&quot; src=&quot;b.html&quot;>
</iframe>
</body>
</html>





in a.html
----------------------
<html>
<head>
</head>
<body>
<script>
alert(window.top.document.forms['frmParent'].txtInput.value);
</script>
</body>
</html>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top