[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


window attributes...how they work (or don't work!)

Posted on 2004-10-29
Medium Priority
Last Modified: 2013-12-24
I want this link to open a new window with specified dimensions and attributes.  It won't work for some reason.

<a href="Home.cfm" target="_blank" onClick="window.open("Home.cfm", "HR - Training Database WEbsite", toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=648,height=800)">Training Website Home Page</a>
Question by:nau2nd
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Expert Comment

ID: 12449097

<a href="Home.cfm" target="_blank" onClick="window.open("Home.cfm", "HR - Training Database WEbsite", 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=648,height=800')">Training Website Home Page</a>

Expert Comment

ID: 12449104
I should have explained: The last parameter needs quotes around it - its a STRING of a list of settings.
LVL 17

Accepted Solution

Tacobell777 earned 160 total points
ID: 12469653
1. use single quotes
2. create  a handle to the new window so you can close it

<a href="Home.cfm"
   onClick="newWin = window.open('Home.cfm', 'HR - Training Database WEbsite', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=648,height=800')">Training Website Home Page</a>

newWin is the handle, and you can close it like so

Author Comment

ID: 12473441
I continually get error message saying that the parameters are not legitimate with certain browsers.  Also, it plainly doesn't work.  I tried adjusting the width to see a change, but it doesn't matter what i have in it, the window stays the same .

Any other suggestions..........

Expert Comment

ID: 12476778
try the following

<a href="home.cfm" target="_blank" onClick="window.open('Home.cfm', 'HR - Training Database WEbsite', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=648,height=800'); return false;">Training Website Home Page</a>

You WILL have to change your double quotes to single quotes, as Tacobell777 pointed out, or use &quot; instead. Also add a return false; to the end of the onClick call.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question