?
Solved

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

Posted on 2004-10-29
6
Medium Priority
?
134 Views
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>
0
Comment
Question by:nau2nd
  • 3
5 Comments
 
LVL 8

Expert Comment

by:sigmacon
ID: 12449097
Try

<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>
0
 
LVL 8

Expert Comment

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

Accepted Solution

by:
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"
   target="_blank"
   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
newWin.close()
0
 

Author Comment

by:nau2nd
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..........
0
 
LVL 8

Expert Comment

by:sigmacon
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.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

579 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