Forms and Frames, help !! - problem putting 2 forms at the same frame (Posted by mbsoares)
HELP !!!!!!!
I'm having a problem that I cant resolve, help me please.
I'm trying to put two diferent forms at the same page, BUT,
it dont work when the page has other frames, strange !!!
-First form: when we select something on the first form it should load
on top of everything (like a target="_parent")
-Second form: this form should open a new window of 400 X 300.
Can somebody tell me how can I do it.
Remember that the page has frames and the two forms are together on the
same frame.
Thank you very much.
Anonymous posted this at 00:46 — 2nd November 1999.
They have: 5,633 posts
Joined: Jan 1970
I am not too sure what you are after. Do you want the users to select an option from the first form? What page do you want to display from the second form? Please explain yourself a little clearer.
----------
[email protected]
http://go.to/hass
mbsoares posted this at 22:02 — 3rd November 1999.
They have: 25 posts
Joined: Sep 1999
Thanks lloydhass
The user can select either from the first or the second form.
The first form is the main one. For exemple, here you choose the differents products from the company.
The second form is about useful informations, for exemple: how to get to the company, contacts, telephones, site map...
It work ok when I put the two forms together without having any frames.
But with frames I cant make it work.
Cause the first form dont load on top of all the other forms.
Thanks again
Anonymous posted this at 03:29 — 4th November 1999.
They have: 5,633 posts
Joined: Jan 1970
Can you post the html here so I can take a look.
mbsoares posted this at 18:52 — 4th November 1999.
They have: 25 posts
Joined: Sep 1999
---Ok, this is how I'm trying to do the code for the page that has the forms:---
<html>
<body>
<form name="menuform">
<select name="info" onChange="loadpage();" size="1">
<option value="">Select Artist For Artwork</option>
<option value="">
_______________________</option>
<option value="">PHOTOGRAPHERS</option>
<option value="1/frame.htm">Dirk Lambrechts</option>
<option value="2/frame.htm">Gilles Marie Zimmermann</option>
<option value="3/frame.htm">Massimo Forcato</option>
<option value="">_______________________</option>
<option value="">MAKE UP</option>
<option value="4/frame.htm">Chrintine Bossard</option>
<option value="5/frame.htm">Marie Laurance Mausset</option>
<option value="index.htm">HOME</option>
</select>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function loadpage(){
var URL = document.menuform.info.options[document.menuform.info.selectedIndex].value;
if (URL == "") URL="home.htm"
parent.parent.location.href = URL;
// End -->
}
</SCRIPT>
</form>
<SCRIPT LANGUAGE="JavaScript">
function load(form) {
if (form.menu.options[form.menu.selectedIndex].value!="")
top.window.location.href = form.menu.options[form.menu.selectedIndex].value
}
function openUseful(url,useful) {
win =
window.open(url,useful,"status=no,toolbar=no,location=no,menu=-no,width=400,height=280");
}
//-->
</script>
<form name="">
<select name="menu" onChange="load(this.form)">
<option>Useful Infomations...</option>
<option value="javascript:openUseful('useful/photo.asp','')">E-mail Eclipse Egancy</option>
<option value="javascript:openUseful('useful/get_there.asp','')">How to get there</option>
<option value="javascript:openUseful('useful/a4.asp','')">How to print A4 format
</option>
<option value="javascript:openUseful('useful/save_photo.asp','')">How to save a picture</option>
</select>
</form>
</body>
</html>
----the frame looks like that, where main.htm is the htm that has the forms. When selecting on the first form it should load on top of all the frames---
<html>
<head>
<title></title>
</head>
<frameset cols="350,350" frameborder="NO" border="0" framespacing="0">
<frame src="photo.htm" name="photo" scrolling="NO" marginwidth="0" marginheight="0" frameborder="NO" noresize>
<frameset rows="350,160" frameborder="NO" border="0" framespacing="0">
<frame src="main.htm" frameborder="NO" noresize scrolling="NO" marginwidth="0" marginheight="0" name="main">
<frameset cols="200,150" frameborder="NO" border="0" framespacing="0" bordercolor="#FFFFFF">
<frame src="arrow.htm" scrolling="NO" frameborder="NO" noresize marginwidth="0" marginheight="0" name="arrow">
<frame src="book.htm" noresize frameborder="NO" marginwidth="0" marginheight="0" name="book">
</frameset>
</frameset>
</frameset>
</html>
I hope its clear now.
thanks
mbsoares posted this at 02:51 — 6th November 1999.
They have: 25 posts
Joined: Sep 1999
lloydhass,
to make it simple, check the site: www.eclipseagency.com/index2.htm
-enter the site
-then choose "dirk lambrechts" where you see "select the artist for artwork"
now you have the same forms, but with frames
-choose "how to get there" where you see "useful Informations"
There is the problem I cant resolve.
Can you check the code and tell me what I'm doing wrong.
Thank you
Anonymous posted this at 17:17 — 6th November 1999.
They have: 5,633 posts
Joined: Jan 1970
This is what you need to do with the second form
function load(form) {
if (form != "") {
win = window.open(form,"useful","status=no,toolbar=no,location=no,menu=no,width=400,height=280");
}
}
<form name="secondForm">
<select name="menu" onChange="javascript:load(this.options[selectedIndex].value)">
<option value="useful/photo.asp">E-mail Eclipse Egancy</option>
</select>
</form>
I'm not sure what you mean by "useful"? Is that just a name or a directory?
----------
[email protected]
http://go.to/hass - http://connect.to/wpd
mbsoares posted this at 00:39 — 7th November 1999.
They have: 25 posts
Joined: Sep 1999
It Works !!)
Thanks lloydhass
Anonymous posted this at 00:07 — 8th November 1999.
They have: 5,633 posts
Joined: Jan 1970
No worries
----------
[email protected]
http://go.to/hass
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.