DreamWeaver help

liunx

Guest
I want to make a site that when you enter a pop up window appears and tells you to select one of three different sites, one of them being my own. I got the pop up thing working and I'm using dreamweaver's jump menu to give you the options. the proble is that I want the page to appear on the original window. Any suggestions are welcome<br />
Thanks<br />
<br />
here is the pop up html script<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<html><br />
<head><br />
<title>Title</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<script language="JavaScript" type="text/JavaScript"><br />
<!--<br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0<br />
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");<br />
if (restore) selObj.selectedIndex=0;<br />
}<br />
//--><br />
</script><br />
</head><br />
<br />
<body><br />
<p><img src=http://www.htmlforums.com/archive/index.php/"images/LOGO1.gif"></p><br />
<form name="form1"><br />
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)"><br />
<option value="Ecuador/index.htm" selected>Ecuador</option><br />
<option value="colombia.htm">Colombia</option><br />
<option>USA</option><br />
</select><br />
</form><br />
<br />
</body><br />
</html><!--content-->The only way I can think of doing this is by using JavaScript in your main page to create a popup onLoad (note: this mustn't be a popup window that LOADS a .html file, it must create the popup window on the fly.) When you select a site, it will load in the main page.<br />
<br />
E.g. this is the code to create a popup window on the fly... <br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>JavaScript Popup Window</TITLE><br />
<SCRIPT LANGUAGE="JAVASCRIPT"><br />
<!-- hide JavaScript code from browsers that are not JavaScript enabled<br />
<br />
function popupwin() {<br />
<br />
winpopup = window.open('','popup','height=500,width=400,menubar=no,scrollbars=no,status=no,toolbar=no,screenX=1 00,screenY=0,left=100,top=0');<br />
winpopup.document.write('<HTML>\n<HEAD>\n');<br />
winpopup.document.write('<TITLE>This is a popup</TITLE>\n');<br />
winpopup.document.write('</HEAD>\n');<br />
winpopup.document.write('<BODY>\n');<br />
winpopup.document.bgColor = "#0000FF"; //set the documents background color RRGGBB<br />
winpopup.document.fgColor = "#FFC814"; //set the documents text color RRGGBB<br />
<br />
winpopup.document.write('<FORM NAME="FORM1">\n');<br />
winpopup.document.write('<INPUT TYPE="BUTTON" VALUE="Close Window" ONCLICK="window.close();">\n');<br />
winpopup.document.write('</FORM>\n');<br />
winpopup.document.write('</BODY>\n</HTML>\n');<br />
<br />
winpopup.document.close(); //Close the Window to additional writes<br />
<br />
} //end function popupwin()<br />
<br />
//end hiding of JavaScript code --><br />
</SCRIPT><br />
</HEAD><br />
<BODY onLoad="popupwin();"><br />
<br />
</BODY><br />
</HTML><!--content-->I tried what you suggested but IE gives me an error on line 21, it is when I use javascript inside the popup wndow<br />
here is the code<br />
<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>Welcome to Multisof</TITLE><br />
<SCRIPT LANGUAGE="JAVASCRIPT"><br />
<!-- hide JavaScript code from browsers that are not JavaScript enabled <br />
<br />
function popupwin() {<br />
<br />
winpopup = window.open('','popup','height=150,width=300,menubar=no,scrollbars=no,status=no,toolbar=no,screenX=1 00,screenY=0,left=100,top=0'); <br />
winpopup.document.write('<HTML>\n<HEAD>\n');<br />
winpopup.document.write('<TITLE> Title </TITLE>\n');<br />
winpopup.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n');<br />
winpopup.document.write('<SCRIPT LANGUAGE=javascript src=http://www.htmlforums.com/archive/index.php/pop.js></SCRIPT>\n');<br />
winpopup.document.write('</HEAD>\n');<br />
winpopup.document.write('<BODY>\n');<br />
winpopup.document.bgColor = "#0000FF"; //set the documents background color RRGGBB<br />
winpopup.document.fgColor = "#FFC814"; //set the documents text color RRGGBB<br />
<br />
winpopup.document.write('<img src=http://www.htmlforums.com/archive/index.php/"images/LOGO1.gif">\n');<br />
winpopup.document.write('<form name="form1">\n');<br />
winpopup.document.write('<select name=menu1 onChange="MM_jumpMenu('parent',this,0)">\n');<br />
winpopup.document.write('<option value="Ecuador/index.htm" selected> Ecuador </option>\n');<br />
winpopup.document.write('<option value="colombia.htm">Colombia</option>\n');<br />
winpopup.document.write('<option>USA</option>\n')<br />
winpopup.document.write('</select>\n');<br />
winpopup.document.write('</form>\n');<br />
winpopup.document.write('</BODY>\n</HTML>\n');<br />
<br />
winpopup.document.close(); //Close the Window to additional writes<br />
<br />
} //end function popupwin()<br />
<br />
//end hiding of JavaScript code --><br />
</SCRIPT><br />
</HEAD><br />
<BODY onLoad="popupwin();"><br />
<br />
</BODY><br />
</HTML><!--content-->I'm sorry, I forgot to point out :D that all quotes between the () in a document.write must be escaped, i.e. use<br />
<br />
document.write("<font color=\"red\"></font>");<br />
<br />
instead of<br />
<br />
document.write("<font color="red"></font>");<br />
<br />
Do that and it should work!<!--content-->
 
Back
Top