sephiroth100
IS-IT--Management
Hi,
Sorry if this is quite a basic thing to some of you guys, but I've been searching the web for a couple of days now and I can't find an answer that covers my wants completely.
I am coding a website in c#/.net. I have a couple of functions which need a new window opening: 1) a send to a friend form; 2) a contact us form. I have chosen to open a new window in both cases because the user is positioned on a list item when they click the button.
In order to keep the number of windows to a minimum, they both call the same window name, let's say "popup".
Both the windows are different sizes.
I have constructed an open window function which is called when each link is clicked, shown below:
var nw=window.open(this.href,this.target,'width=680,height=541,resizable=1');nw.focus();nw.resizeTo(670,616);return false;
The second one is the same but with different sizes.
The above code whould open a new window, however if its already open and is the other size window, it should resize. When going from the smaller to larger window it does resize, however the larger window never decreases in size.
The issue is currently being tested in Firefox.
Ideally I would like to take it one step further (like Facebook bookmarking) where a window is opened then dynamically resized (length only) to fit the content.
If I can't achieve this then the first solution to maintain the correct widow size across both forms would be ok.
Thanks in advance.
Sorry if this is quite a basic thing to some of you guys, but I've been searching the web for a couple of days now and I can't find an answer that covers my wants completely.
I am coding a website in c#/.net. I have a couple of functions which need a new window opening: 1) a send to a friend form; 2) a contact us form. I have chosen to open a new window in both cases because the user is positioned on a list item when they click the button.
In order to keep the number of windows to a minimum, they both call the same window name, let's say "popup".
Both the windows are different sizes.
I have constructed an open window function which is called when each link is clicked, shown below:
var nw=window.open(this.href,this.target,'width=680,height=541,resizable=1');nw.focus();nw.resizeTo(670,616);return false;
The second one is the same but with different sizes.
The above code whould open a new window, however if its already open and is the other size window, it should resize. When going from the smaller to larger window it does resize, however the larger window never decreases in size.
The issue is currently being tested in Firefox.
Ideally I would like to take it one step further (like Facebook bookmarking) where a window is opened then dynamically resized (length only) to fit the content.
If I can't achieve this then the first solution to maintain the correct widow size across both forms would be ok.
Thanks in advance.