Advertisement

10.23.2003 at 12:06AM PDT, ID: 20775478
[x]
Attachment Details

opening a new window in javascript

Asked by m_caust in JavaScript

Tags: javascript, new, window, open

Hi,

I am having a problem with some javascript i am using inside html (code below).  I am trying to open a new window when a link is clicked that contains a picture (pic.jpg).  This works fine although when i click the link my original page gets replaced by a page that contains [object] as a line of text.  How can i keep my originl window unchanged in the background while the new window opens? also i wish for my new window to fit the size of the picture it contains.  At the moment as you can see from my code the window is being opened to the maximum height and width of the window, i was wondering if there was something similar to make the height and width of the window to the maximum height and width of the picture instead.

<a href="javascript:window.open('pic.jpg', null, 'top='+0+', left='+0+', height='+window.screen.availHeight+',width='+window.screen.availWidth)">View Picture</a>

Thanks in advance, m_caustStart Free Trial
 
Loading Advertisement...
 
[+][-]10.23.2003 at 12:31AM PDT, ID: 9604900

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 04:32AM PDT, ID: 9605740

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 06:42AM PDT, ID: 9606584

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 07:13AM PDT, ID: 9606873

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 09:30PM PDT, ID: 9612083

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 10:09PM PDT, ID: 9612195

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 10:32PM PDT, ID: 9612242

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: javascript, new, window, open
Sign Up Now!
Solution Provided By: hart
Participating Experts: 4
Solution Grade: A
 
 
[+][-]10.23.2003 at 10:34PM PDT, ID: 9612247

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2003 at 11:15PM PDT, ID: 9612327

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.24.2003 at 08:08AM PDT, ID: 9614707

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.27.2003 at 07:22PM PST, ID: 9631286

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.27.2003 at 08:15PM PST, ID: 9631465

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32