hi there,
im a complete newbie to javascript so apologies is this is a relatively simple thing but i am currently developing a sort of ‘browser-in-browser’ type thing using a text input form and JS, heres the code:
[CODE]<html>
<head>
<meta name=”GENERATOR” content=”Microsoft FrontPage 5.0″>
<meta name=”ProgId” content=”FrontPage.Editor.Document”>
<meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
<title>Divisions: Product Design</title>
<SCRIPT>
function gotoURL(){
var newURL = document.GotoForm.theURL.value
document.location.href=newURL
}
</SCRIPT>
</head>
<body bgcolor=”000000″ text=”FFFFFF”>
<center>
<br>
<iframe src=”http://www.myspace.com/” name=”browser” width=”95%” height=”80%” frameborder=1>
if you cant see this you suck ;-)</iframe>
<br><br>
<FORM ACTION=”JavaScript:gotoURL()” METHOD=”GET” NAME=”GotoForm”>
URL:
<INPUT TYPE=”text” NAME=”theURL” value=”http://” REQUIRED SIZE=”50″ MAXLENGTH=”100″>
<INPUT TYPE=”submit” VALUE=”GO”>
<br><br>
teachers pwned by -snap-
</center>
</body>
</html>
it currently works fine for opening the page at the top of the current one but i would like the pages to load in the iframe every time the form is submitted…
thanks in advance
adam