Javascript syntax for opening a new window based on image rotator selection

I use links like this to open enlarged images in a new window, it works very well:

<A HREF="javascript:openWin('_enlarge.asp?file=ph_ex3_console','800','600')">

The 800 and 600 let me specify the size of the window. However, I need to call this same function from a Javascript which lets the user rotate through images in a slideshow, and click the one they are on to enlarge. Here is what it looks like:

openWin('_enlarge.asp?file=' + document['currentimg'].src);

It basically works, except I cannot find the correct syntax to insert the 800 and 600. I tried this but it does not work:

openWin('_enlarge.asp?file=' + document['currentimg'].src + '800,600');

I guess its just a syntax problem, I don't know how to specify those parameters with the single quotes.

Thank you.
Brad BansnerWeb DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ashish PatelCommented:
use like this and check.
<A HREF="'_enlarge.asp?file=ph_ex3_console', 'winname', 'width=800, height=600');">
try removing any and all white spaces in the call such as
openWin('_enlarge.asp?file=' + document['currentimg'].src + '800,600');


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brad BansnerWeb DeveloperAuthor Commented:
Thank you, I got it to work now.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.