Ask a Question related to Macromedia Dreamweaver, Design and Development.
-
mdream webforumsuser@macromedia.com #1
Open Browser On Click HELP!
Okay...I found a similar thread, but my situation is a little bit different... here goes.
Goal: To have several linked pages open in the same new browser window with a set size and no attributes other than the menu title. I want all my pages to open up in the same browser window that opens after the visitor enters the site with no attributes other than the menu. I also want the visitor to be able to navigate back and forth thru the various sections of the site.
Problem: Right now, from the index.html page, there is a link to enter the site. From there the first linked html page opens in the new browser window that I set up. Everthing works great for the first section (a total of 8 linked pages). Then when I go to the next link in the nav section, those pages open up in another browser window with scroll bars even when I set the action the same way as in the previous section. Does this make sense? Can anyone tell me what I am doing wrong? I am really going nuts over this. Thanks!
mdream webforumsuser@macromedia.com Guest
-
shockwave browser publish waiting for click?
:confused; After I publish my Shockwave3D .dcr file, it seems to take forever to activate it. You can look at the output file here: <a... -
Clear shared object on [X] click of browser .
How to click shared object in flex 1.5 when user clicks browser's button. Thanks in Advance! VINAY:Q -
How to get a OPEN/SAVE dialog option window when open Excel from IE browser.
I use the following to open Excel from IE browser, but I don't get a OPEN/SAVE dialog option window. Instead, the Excel opened in the browser... -
Server control button click: open pop up browser window
Checkout ... ShowModalDialog in the javascript reference. It works quite will if you want to use client side javascript. "Alvin Bruney"... -
on click of a link button should first save the data and then open a new browser
Hi, A page consists of a link button. Clicking this link button should first save data in the database. If the data is saved correctly then it... -
Alan Ames #2
Re: Open Browser On Click HELP!
you will need to give url's to pages.
the solution is in the code.
an exact place a link that works the way you want is-
an exact place a link that doesn't work the way you want it.
also- many people here don't like their browser window resized- so put a
note in the message with the urls- so people don't click without knowing
it's there.
--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer
Alan Ames Guest
-
Flashjunky webforumsuser@macromedia.com #3
Re:Open Browser On Click HELP!
post the URL so I can look at the code, or post the code... :)
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #4
Re:Open Browser On Click HELP!
Since the site isn't live yet, I can't post the url but what part of the code should I post?
mdream webforumsuser@macromedia.com Guest
-
Alan Ames #5
Re: Open Browser On Click HELP!
the source code for the link that Does work.
the source code for the link that Doesn't work.
--> Since the site isn't live yet, I can't post the url but what part of the code
> should I post?
>
>
>
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer
Alan Ames Guest
-
mdream webforumsuser@macromedia.com #6
Re: Open Browser On Click HELP!
Alan,
Here is the source code for index.html (the one that is working) and web1.html (the one that is not working). I hope it is clear on what I am trying to do. Think of it as a slide show presentation, where you are at index.html, you click to enter the site and then all the pages that you view from there on open in one separate browser window aside from the index.html page. Does this make sense?
<td><a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('enter','','images/home_images/enter-over.gif',1)"><img src="images/home_images/enter.gif" width="404" height="78" name="enter" border="0" onMouseDown="MM_openBrWindow('html/print1.html','','menubar=yes,width=744,height=407' )"></a></td>
This is the code from the first page of the next section that doesn't work. I'm just trying to get the pages to all open in the same browser window after you initially enter the site.
<td width="150" valign="top" height="62"><a href="print1.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('print','','../images/nav_images/print-over.gif',1)"><img src="../images/nav_images/print.gif" width="149" height="62" name="print" border="0"></a></td>
<td valign="top" colspan="2"><img src="../images/nav_images/web-over.gif" width="112" height="62" name="web" border="0" onMouseDown="MM_openBrWindow('web1.html','','menub ar=yes,width=744,height=407')"></td>
<td width="316" valign="top"><a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('identity','','../images/nav_images/identity-over.gif',1)"><img src="../images/nav_images/identity.gif" width="316" height="62" name="identity" border="0"></a></td>
<td valign="top" colspan="2" bgcolor="C7B98A"><a href="javascript:;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','../images/nav_images/contact-over.gif',1)"><img src="../images/nav_images/contact.gif" width="183" height="62" name="contact" border="0"></a></td>
mdream webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #7
Re: Open Browser On Click HELP!
the middle parameter the you've missed (URL, WINNAME, PARAMETERS)...
If you want the windows to open in the same window the winname parameter must be the same!
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #8
Re: Open Browser On Click HELP!
You currently have
onMouseDown="MM_openBrWindow('web1.html','','menub ar=yes,width=744,height=407')"
You should use
onMouseDown="MM_openBrWindow('web1.html','myPopUp' ,'menubar=yes,width=744,height=407')"
if you want the new content to open in the same window
so for web2.html just use
onMouseDown="MM_openBrWindow('web2.html','myPopUp' ,'menubar=yes,width=744,height=407')"
I should mention that window names ARE case sensitive
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #9
Re: Open Browser On Click HELP!
I will try this and Thank You So Much!!! : ) I will repost with the outcome.
mdream webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #10
Re: Open Browser On Click HELP!
Ok! The pages are mow opening in the same window YEAH! But when I view in Netscape 4.7 they look great.
When I view in IE5 there is white space around the image in the window as if it's not filling the entire space, along with some pixel leaks in other areas of the page.
Any ideas on how to correct this? I am confused as to why this is happening.
I am concerned because I think for the most part people are still using NS 4.7 and above and IE 5 and above.
mdream webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #11
Re: Open Browser On Click HELP!
Have you tried setting the margin parameters in the body tag?
<body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>
Worth a try...
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #12
Re: Open Browser On Click HELP!
I have tried setting the margins in the body tag all to zero and it's still not working...I'm ready to go insane over this. It seems like such an easy and obvious fix.
Any other ideas? Thanks!
mdream webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #13
Re: Open Browser On Click HELP!
Dunno... too hot to think properly...
Can you post a link so I can see it and trace the fault?
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #14
Re: Open Browser On Click HELP!
Sure... give me a minute and "I'll post the code since the site isn't live yet...
mdream webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #15
Re: Open Browser On Click HELP!
Here it is...just a thought...Could it be the fact that I haven't specified the table height in the body tag
as I did in the open browser window, or does that matter?
<html>
<head>
<title>MP Graphics, Inc.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return
x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0"
onLoad="MM_preloadImages('../images/nav_images/web-over.gif','../images/nav_images/identity-over.gif','../images/nav_images/contact-over.gif')">
<table width="760" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td colspan="6" height="31" bgcolor="#000000"><img
src="../images/shared_images/spacer.gif" width="760" height="31"
name="spacer1"></td>
</tr>
<tr>
<td colspan="6" height="23" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="760" height="23"
name="spacer2"></td>
</tr>
<tr>
<td valign="top" height="161" colspan="2"><img
src="../images/shared_images/logo.gif" width="248" height="161"
name="mplogo"></td>
<td valign="top" colspan="3" rowspan="3" bgcolor="C7B98A"><img
src="../images/print_images/print1.jpg" width="488" height="283"
name="geoprint"></td>
<td width="24" rowspan="3" valign="top" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="23" height="283"
name="spacer5"></td>
</tr>
<tr>
<td valign="top" height="101" colspan="2"><img
src="../images/print_images/geo_text.gif" width="248" height="101"
name="geotext"></td>
</tr>
<tr>
<td valign="top" height="21" colspan="2" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="123" height="20"
name="spacer3"><img src="../images/shared_images/previous.gif"
width="50" height="20" name="previous"><img
src="../images/shared_images/mouse.gif" width="25" height="20"
name="mouse"><a href="print2.html"><img
src="../images/shared_images/next-over.gif" width="50" height="20"
name="next" border="0"></a></td>
</tr>
<tr>
<td valign="top" height="24" colspan="6" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="760" height="23"
name="spacer4"></td>
</tr>
<tr>
<td height="62" valign="top" width="149"><img
src="../images/nav_images/print-over.gif" width="149" height="62"
name="print" border="0"></td>
<td valign="top" colspan="2"><a href="web1.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('web','','../images/nav_images/web-over.gif',1)"
onClick="MM_openBrWindow('web1.html','myPopUp','me nubar=yes,width=760,height=420')"><img
src="../images/nav_images/web.gif" width="112" height="62" name="web"
border="0"></a></td>
<td valign="top" width="316"><a href="identity1.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('identity','','../images/nav_images/identity-over.gif',1)"
onClick="MM_openBrWindow('identity1.html','myPopUp ','menubar=yes,width=760,height=420')"><img
src="../images/nav_images/identity.gif" width="316" height="62"
name="identity" border="0"></a></td>
<td valign="top" colspan="2" bgcolor="C7B98A"><a href="contact.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('contact','','../images/nav_images/contact-over.gif',1)"><img
src="../images/nav_images/contact.gif" width="183" height="62"
name="contact" border="0"
onMouseDown="MM_openBrWindow('contact.html','myPop Up','menubar=yes,width=760,height=420')"></a></td>
</tr>
<tr>
<td height="0"></td>
<td width="99"></td>
<td width="13"></td>
<td></td>
<td width="159"></td>
<td></td>
</tr>
</table>
</body>
</html>
mdream webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #16
Re: Open Browser On Click HELP!
Doyou mean the code from index.html that leads to the first pop-up? All of the pages from then on open in a fixed size browser pop-up.
The code I sent you does include the behaviors for the pop-up. Le me know and I'll send whatever is necessary. Thanks!
mdream webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #17
Re: Open Browser On Click HELP!
I'm after the code for the problem popup.. what actually appears with the space around it..
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #18
Re: Open Browser On Click HELP!
I thought that's what I sent...if you scroll down you will see the open browser behavior that calls for a pop-up 760px x 420, etc.
Let me know if I have just lost it all together... OR NOT ; )
mdream webforumsuser@macromedia.com Guest
-
Flashjunky webforumsuser@macromedia.com #19
Re: Open Browser On Click HELP!
I need to code for the pop-up, not the pop-up caller...
MX is like a box of chocolates - Someone's usually eaten the good bits already!
Flashjunky webforumsuser@macromedia.com Guest
-
mdream webforumsuser@macromedia.com #20
Re: Open Browser On Click HELP!
Here is the index.html code. When you click "enter site" the popup window appears with the first page in it.
I have also included web1.html which is another page in the section of the site that also opens in the same
popup window. Since all of theses pages are linked together, they all open up in the same browser window
with the unwanted white border around them. Hope this helps.
index.html
<html>
<head>
<title>MP Graphics, Inc.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return
x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#C7B98A" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('images/home_images/enter-over.gif')">
<br>
<table width="600" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td colspan="2"><img src="images/home_images/bar1.gif" width="605"
height="52" name="bar1"></td>
</tr>
<tr>
<td rowspan="2"><img src="images/home_images/logo.gif" width="201"
height="291" name="logo"></td>
<td><img src="images/home_images/welcome.gif" width="404"
height="213" name="welcome"></td>
</tr>
<tr>
<td><a href="javascript:;" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('enter','','images/home_images/enter-over.gif',1)"
onClick="MM_openBrWindow('html/print1.html','myPopUp','menubar=yes,width=760,heig ht=420')"><img
src="images/home_images/enter.gif" width="404" height="78" name="enter"
border="0"></a></td>
</tr>
<tr>
<td colspan="2"><img src="images/home_images/bar2.gif" width="605"
height="62" name="bar2"></td>
</tr>
</table>
<br>
</body>
</html>
web1.html
<html>
<head>
<title>MP Graphics, Inc.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return
x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('../images/nav_images/identity-over.gif','../images/nav_images/contact-over.gif','../images/nav_images/print-over.gif')">
<table width="760" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td colspan="6" height="31" bgcolor="#000000"><img
src="../images/shared_images/spacer.gif" width="760" height="31"
name="spacer1"></td>
<td width="1"></td>
</tr>
<tr>
<td colspan="6" height="23" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="760" height="23"
name="spacer2"></td>
<td></td>
</tr>
<tr>
<td valign="top" height="161" colspan="2"><img
src="../images/shared_images/logo.gif" width="248" height="161"
name="mplogo"></td>
<td valign="top" colspan="3" rowspan="2" bgcolor="C7B98A"><img
src="../images/web_images/ct_web.jpg" width="488" height="242"
name="ctweb"></td>
<td width="24" rowspan="4" valign="top" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="23" height="283"
name="spacer5"></td>
<td></td>
</tr>
<tr>
<td valign="top" colspan="2" rowspan="2"><img
src="../images/web_images/ct_text.gif" width="248" height="101"
name="cttext"></td>
<td height="81"></td>
</tr>
<tr>
<td valign="top" bgcolor="C7B98A" colspan="3" rowspan="2"><a
href="http://www.charlestonterrace.com" target="_blank"><img
src="../images/web_images/ct_url.gif" width="488" height="41"
name="cturl" border="0"></a></td>
<td height="20"></td>
</tr>
<tr>
<td valign="top" bgcolor="C7B98A" colspan="2" height="22"><img
src="../images/shared_images/spacer.gif" width="123" height="20"
name="spacer3"><img src="../images/shared_images/previous.gif"
width="50" height="20" name="previuos"><img
src="../images/shared_images/mouse.gif" width="25" height="20"
name="mouse"><a href="web2.html"><img
src="../images/shared_images/next-over.gif" width="50" height="20"
name="next" border="0"></a></td>
<td></td>
</tr>
<tr>
<td valign="top" height="23" colspan="6" bgcolor="C7B98A"><img
src="../images/shared_images/spacer.gif" width="760" height="23"
name="spacer4"></td>
<td></td>
</tr>
<tr>
<td width="150" valign="top" height="62"><a href="print1.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('print','','../images/nav_images/print-over.gif',1)"><img
src="../images/nav_images/print.gif" width="149"
height="62" name="print" border="0"></a></td>
<td valign="top" colspan="2"><a href="javascript:;"
onClick="MM_openBrWindow('web1.html','myPopUp','me nubar=yes,scrollbars=no,width=760,height=420')"><i mg
src="../images/nav_images/web-over.gif" width="112" height="62"
name="web" border="0"></a></td>
<td width="316" valign="top"><a href="identity1.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('identity','','../images/nav_images/identity-over.gif',1)"><img
src="../images/nav_images/identity.gif"
width="316" height="62" name="identity" border="0"></a></td>
<td valign="top" colspan="2" bgcolor="C7B98A"><a href="contact.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('contact','','../images/nav_images/contact-over.gif',1)"><img
src="../images/nav_images/contact.gif"
width="183" height="62" name="contact" border="0"></a></td>
<td></td>
</tr>
<tr>
<td height="1"></td>
<td width="99"></td>
<td width="13"></td>
<td></td>
<td width="159"></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
mdream webforumsuser@macromedia.com Guest



Reply With Quote

