![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
window.open target does not work for certain URL's
Issue:- The following URL "http://news.bbc.co.uk/" does not allow other URL's
to open in it's window using the code below. Every other URL I've used works fine. What could be the problem? Code: function globalNewsWindow(cUrl) { var globalNews; globalNews=window.open(cUrl,'worldNews','height=30 0, width=1000, resizable=yes, scrollbars=yes, left=150, top=430'); globalNews.focus(); } The following URL's work fine:- http://www.voanews.com/ http://allafrica.com/ They all use javascript:globalNewsWindow(\"http://news.bbc.co.uk/\") to call the function. -- Thanks |
|
|||
|
Re: window.open target does not work for certain URL's
Hi Kaka,
It could be that they are testing the referrer on the server or they are using active server pages that are expecting parameters to open the page. if(location.search.substring(1)=="focuswin"){ window.focus(); } the above snippet suggests that they are expecting parameters, but also testing the referrer or the parent properties would be a way of stopping sites hosting their content. To test if they are testing the parent property remove the named window from your window.open script and use the target of '_blank' instead, but it could be that they are testing for a specifically named window. Regards. "KakaKola" <KakaKola@discussions.microsoft.com> wrote in message news:E5EAD756-83BD-4A97-8D23-2242B6577156@microsoft.com... > Issue:- The following URL "http://news.bbc.co.uk/" does not allow other > URL's > to open in it's window using the code below. Every other URL I've used > works > fine. > > What could be the problem? > > Code: > function globalNewsWindow(cUrl) > { var globalNews; > globalNews=window.open(cUrl,'worldNews','height=30 0, width=1000, > resizable=yes, scrollbars=yes, left=150, top=430'); > globalNews.focus(); > } > > The following URL's work fine:- > http://www.voanews.com/ > http://allafrica.com/ > > They all use javascript:globalNewsWindow(\"http://news.bbc.co.uk/\") to > call > the function. > -- > Thanks |
|
|||
|
Re: window.open target does not work for certain URL's
Thanks Rob. You are absolutely correct. I removed the named window from my
window.open script and used the target of '_blank' instead. -- Thanks "Rob ^_^" wrote: > Hi Kaka, > > It could be that they are testing the referrer on the server or they are > using active server pages that are expecting parameters to open the page. > > if(location.search.substring(1)=="focuswin"){ > > window.focus(); > > } > > the above snippet suggests that they are expecting parameters, but also > testing the referrer or the parent properties would be a way of stopping > sites hosting their content. > > > > To test if they are testing the parent property remove the named window from > your window.open script and use the target of '_blank' instead, but it could > be that they are testing for a specifically named window. > > > > Regards. > > "KakaKola" <KakaKola@discussions.microsoft.com> wrote in message > news:E5EAD756-83BD-4A97-8D23-2242B6577156@microsoft.com... > > Issue:- The following URL "http://news.bbc.co.uk/" does not allow other > > URL's > > to open in it's window using the code below. Every other URL I've used > > works > > fine. > > > > What could be the problem? > > > > Code: > > function globalNewsWindow(cUrl) > > { var globalNews; > > globalNews=window.open(cUrl,'worldNews','height=30 0, width=1000, > > resizable=yes, scrollbars=yes, left=150, top=430'); > > globalNews.focus(); > > } > > > > The following URL's work fine:- > > http://www.voanews.com/ > > http://allafrica.com/ > > > > They all use javascript:globalNewsWindow(\"http://news.bbc.co.uk/\") to > > call > > the function. > > -- > > Thanks > > > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|