Link to home
Start Free TrialLog in
Avatar of nau2nd
nau2nd

asked on

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

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>
Avatar of sigmacon
sigmacon

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>
I should have explained: The last parameter needs quotes around it - its a STRING of a list of settings.
ASKER CERTIFIED SOLUTION
Avatar of Tacobell777
Tacobell777

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nau2nd

ASKER

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..........
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.