habib
09-20-2002, 05:11 PM
Hi,
I am stumped with this problem I'm having. I am trying to open a new window and load a htm page in the window based on the result of a cookie. If the cookie value is SA, then I want to open sahome.htm in a new window for the user. When I preview the page I dont get any errors but when I click on 'Click here' a new window loads but sahome or ukhome dont load up.
Help!
function select_country () {
if (getCookie('home_location') == 'SA' ) {
window.open('sahome.htm') }
else {
if (getCookie('home_location') == 'UK' ) {
window.open('ukhome.htm') }
}
}
<a href = onClick="select_country();">Click here!</a>
Thanks in advance for your help
HR
I am stumped with this problem I'm having. I am trying to open a new window and load a htm page in the window based on the result of a cookie. If the cookie value is SA, then I want to open sahome.htm in a new window for the user. When I preview the page I dont get any errors but when I click on 'Click here' a new window loads but sahome or ukhome dont load up.
Help!
function select_country () {
if (getCookie('home_location') == 'SA' ) {
window.open('sahome.htm') }
else {
if (getCookie('home_location') == 'UK' ) {
window.open('ukhome.htm') }
}
}
<a href = onClick="select_country();">Click here!</a>
Thanks in advance for your help
HR