opening windows within frames

liunx

Guest
i am not too good with frames so i wanted to know how to go from a main page to a page with three frames after clicking a button. the main page is a login page and the code below is in a function if the user clicks ok. so when the user clicks ok, the two windows mentioned below pop up in two frames side by side so that files can be dragged and dropped from one to the other. is this possible? because currently it just opens two windows but i want them in frames as part of the main page. any help appreciated..thanks!<br />
<br />
if (username && password && server && local) {<br />
window.open(local, '_blank', <br />
'toolbar=yes,location=yes,status=yes,' + <br />
'scrollbars=auto,copyhistory=no,menubar=no,width=' <br />
+ ((screen.AvailWidth/2)-12) + ',height=' + <br />
(screen.AvailHeight-44-screen.AvailHeight/2) +',left=0,top=0,resizable=yes');<br />
window.open("ftp://" + username + ":" + <br />
password + "@" + server, '_blank', <br />
'toolbar=yes,location=yes,status=yes,' + <br />
'scrollbars=auto,copyhistory=no,menubar=no,width=' <br />
+ ((screen.AvailWidth/2)-12) + ',height=' <br />
+ (screen.AvailHeight-44-screen.AvailHeight/2) +',left=' + <br />
<br />
((screen.AvailWidth/2)) <br />
+ '),top=0,resizable=yes');<br />
}<br />
else {<br />
alert("Please select a file path, and enter username, password, and server <br />
<br />
name");<br />
}<br />
}<!--content-->Basics, open frames in same window:<br />
skypennie.htm<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<html lang="en"><br />
<head><br />
<title>skypennie</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<script type="text/javascript"><br />
//<![CDATA[<br />
<!--<br />
if(!location.search) {<br />
var myfile=prompt("File name");<br />
var framed=''+<br />
'<frameset rows="20%,80%">'+<br />
' <frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"skypennie.htm?file='+myfile+'">'+<br />
' <frameset cols="50%,50%">'+<br />
' <frame name="left" src=http://www.webdeveloper.com/forum/archive/index.php/"'+myfile+'.htm">'+<br />
' <frame name="right" src=http://www.webdeveloper.com/forum/archive/index.php/"right.htm">'+<br />
' </frameset>'+<br />
'</frameset>';<br />
document.write(framed);<br />
}<br />
//--><br />
//]]><br />
</script><br />
</head><br />
<body><br />
<h1>skypennie framed</h1><br />
</body><br />
</html><br />
<br />
Change the row and column sizes to suit.<br />
src values are the files (strings) to be loaded.<br />
The if statement suppresses the reloading of the frameset.<!--content-->how can i make it so that it goes from clicking a submit button in that top frame...which opens the bottom two frames with a windows.open command. because i don't want to open html files in the bottom two frames..i want to open a window such as a windows explorer to navigate through directories on the local hard drive. is that possible?<!--content-->Not with html/javascript; opening Explorer can only be done with ActiveX or SSL, it is a security issue.<br />
You appear to be attempting to transfer files. Use a FTP program.<!--content-->Fang- so how would i do this with activeX or ssl? i don't know too much about these. i am trying to transfer files but not wanting to use an ftp program...is there a way to do this?<!--content-->Using PHP is probably the best way to go, but to create a ftp program requires learning PHP.<br />
Ask in the PHP forum. Maybe someone there can help.<!--content-->
 
Back
Top