Pop Up Window With Hidden Url Address
I am having some difficulties when trying to hide the URL address for pop up window in javascript. Here is my html:
Solution 1:
To achieve Chrome popups without frames, try the code here (you may need to hardcode content from html pages or integrate with iFrames - let me know if you need help doing that portion): http://www.sitepoint.com/forums/showthread.php?1175628-Remove-browser-box-border-from-pop-up-window
Here is the example from the resource above [it works great in my Chrome browser with frameless/borderless/address free popup]:
<!DOCTYPE htmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8" /><!-- only for this testpage! --><metaname="robots"content="noindex, nofollow" /><!-- http://www.sitepoint.com/forums/showthread.php?1175628-Remove-browser-box-border-from-pop-up-window --><metaname="Description"content="Choose an Asheville painting company dedicated to providing the highest quality work while getting the job completed on budget and on time. SCI Painting in Burnsville near Asheville NC." /><metaname="Keywords"content="painting company,exterior paint company,interior paint company" /><metaname="author"content="SCI Painting" /><metaname="copyright"content="2013 SCI Painting" /><linkhref="http://scipainting.com/images/favicon.ico" /><linkhref="http://scipainting.com/css/style.css"type="text/css" /><!-- http://www.sitepoint.com/forums/showthread.php?1175628-Remove-browser-box-border-from-pop-up-window Thread: Remove browser box/border from pop up window Oct 31, 2013, 11:11 Sculley Code by Francky --><title>test :: Choose a Quality Asheville Painting Company</title><styletype="text/css">html { height:100%; overflow-y:scroll; } #grayOverlay { position:fixed; left:0; top:0; width:100%; height:100%; background-color:#000; opacity:.7; z-index:1; display:none; } #center { position:relative; } #popupBox { top:25px; left:25px; right:25px; bottom:0; overflow:auto; background:#f5f5eb; border:1px solid #e0e2cc; padding:10px; text-shadow:1px1px white; z-index:1; } h2 { font-size:1.1em; font-weight:normal; } #closePopupBox1, #closePopupBox2 { position:absolute; right:0; display:none; } #closePopupBox1a, #closePopupBox2a { margin:15px; padding:04px; border:1px solid #c0c0c0; border-radius:6px; background:red; color:white; font-size:.8em; font-weight:bold; } </style></head><body><divid="grayOverlay"></div><divid="main"><divid="top"><divid="header"><divclass="header"><br /> MARC JACKSON<br /><ahref="mailto:mjackson@scipainting.com">mjackson@scipainting.com</a><br /> phone 828.442-4107<br /> fax 828.645.6284<br /> 65 Monticello Rd./<br /> Weaverville NC 28787 </div><!--end div .header --></div><!--end div #header --></div><!--end div #top --><divid="top-navi"></div><!--end div #top-navi --><divid="mid"><divid="left-side"><ahref="#popupBox"onclick="openPop();return false"><imgwidth="125"height="60"alt="What others say"src="http://scipainting.com/images/quote-web.jpg" /></a><imgsrc="http://scipainting.com/images/image1-shadow.png"width="148"height="158"class="first"alt="Image 1" /><imgsrc="http://scipainting.com/images/image2-shadow.png"width="138"height="141"alt="Image2" /><imgsrc="http://scipainting.com/images/image3-shadow.png"width="138"height="141"alt="Image 3" /></div><!--end div left-side --><divid="center"><divalign="center"><imgsrc="http://scipainting.com/images/image-main.jpg"width="634"height="292"alt="SCI Painting in Burnsville NC near Asheville, NC" /></div><divclass="txtbox"><p>Residential and Commercial <br /> projects</p><p>Interior and exterior paint <br /> and stain services</p><p>Roof and floor coatings</p><p>Deck maintenance and cleaning</p><p>Pressure washing</p><p>Log home protection</p><p>Faux finishes</p></div><!--end div .txtbox --><p>SCI Painting was founded to meet the demand for high quality painting and excellent customer service. The joining of two family businesses, Sineath Construction’s paint division and C. Manning Paint Service, provides all of western North Carolina with unmatched services, excellence and value important to families today. These two companies together bring over 40 years of experience, quality work, reliable service and a long list of satisfied customers to SCI Painting. We are fully licensed and insured and look forward to being your choice in paint companies.</p><p>Marc Jackson, manager, is focused on keeping pace with the growing needs of clients in western North Carolina and the challenges that our harsh climate can create. He, along with our experienced employees, understands the details of all jobs, residential and commercial. Marc is dedicated to providing the highest quality work while getting the job completed on budget and on time. Marc is not satisfied until the customer is satisfied. This is all possible because of clear communication that is maintained with the client before, during, and after the project.</p><divid="popupBox"><h2id="popHeader">People say...</h2><divid="closePopupBox1"><ahref="#"onclick="closePop();return false">X</a></div><p>Meredith Ledford</p><p>August 21, 2013</p><p>Marc Jackson<br /> SCI Painting<br /> 65 Monticello Rd.<br /> Weaverville, NC 28787</p><p>Dear Mr. Jackson,</p><p>I am writing to you to reiterate my deepest gratitude for the exceptional work SCI Painting<br /> completed in our new home.</p><p>My husband and I were especially impressed given the large scope of the job and the limited amount of time afforded to you for completion.</p><p>Your team of professional painters arrived on the first day eager to begin and they remained productive and enthusiastic until the job was completed. Because my husband was out of town, I interacted with your crew the majority of the time. They were always very friendly and accommodating.<br /> I was especially touched when they presented with great pride to me the freshly painted nursery – it was beautiful! I also appreciated their patience as I decided which color to paint the trim. I struggled with the decision, but I never felt rushed.</p><p>Because of SCI Painting’s excellent service, my husband and I were able to complete our move into our new home before our son was born. Now we admire your handiwork every day in our new home and marvel at the how efficiently your crew completed the work. SCI Painting is a first rate business that strikes the rare balance of value and professionalism. We are so grateful that we were referred to you for the huge job our home presented and would enthusiastically recommend your services to anyone.</p><p>Thanks again and we hope to see you at "The Rock" this fall for some ASU football. Go APPS!</p><p>Sincerely,</p><divid="closePopupBox2"><ahref="#"onclick="closePop();return false">X</a></div><p>Meredith & Dwayne Ledford</p></div><!-- end div #popupBox --></div><!--end div #center --></div><!--end div #mid --></div><!--end div main --><divid="footer"><divclass="copyright"><p>© Copyright 2013 scipainting.com | All Rights Reserved <br /> SCI Painting is a partnership with <ahref="http://www.sineathconstruction.com/">Sineath Construction in Weaverville, NC near Asheville, NC</a></p></div><!--end div .copyright --><divclass="copyright"><p>phone 828.645.6284 | fax 828.682.0676 | 65 Monticello Rd. | P.O. Box 1603 | Weaverville NC 28787</p></div><!--end div .copyright --></div><!--end div footer --><scripttype="text/javascript">//<![CDATA[document.getElementById('popupBox').style.position="absolute"; document.getElementById('popupBox').style.display="none"; document.getElementById('popHeader').style.display="none"; document.getElementById('closePopupBox1').style.display="block"; document.getElementById('closePopupBox2').style.display="block"; functionopenPop(){ document.getElementById('popupBox').style.display="block"; document.getElementById('grayOverlay').style.display="block"; } functionclosePop(){ document.getElementById('popupBox').style.display="none"; document.getElementById('grayOverlay').style.display="none"; } //]]></script></body></html>
Solution 2:
It looks like you can find your answer here for no menu bars: Opening javascript popup window without address bar and title with height and width set in percentage according to screen resolution
Try this code for no frames:
<scriptlanguage="Javascript"> <!-- varWidth=200// window widthvarHeight=200// window heightvarLeft = (screen.width/2)-(Width/2) // centervarTop = (screen.height/2)-(Height/2) // centervarAutoclose = truefunctionopenFrameless(url){ FrameLess = window.open(url,"noframewin","fullscreen") FrameLess.document.body.style.overflow="auto"// auto scrollbarsFrameLess.resizeTo(Width,Height) // resizeFrameLess.moveTo(Left,Top) // positionFrameLess.focus() if (Autoclose){ window.onunload = function(){ FrameLess.close() } } } // --></script><ahref="#null"onclick="openFrameless('YOURPAGE.htm')">Open Frameless</a>
Post a Comment for "Pop Up Window With Hidden Url Address"