Connecting Tech Pros Worldwide Forums | Help | Site Map

hiding URL in popup window title and status bars

Jon
Guest
 
Posts: n/a
#1: Aug 20 '06
Hi,

I am calling the function showpopupWindow(item) to open and write a
popup window. When testing in IE6 locally the popup window displays my
text in both the title and status bars but when viewed online from my
website the titlebar text is preceded by the full URL and a - ( eg
http://www.........co.uk - text I want to display) and the status bar
appears to only display Downloading picture
http://www..........co.uk/..../..../image.jpg... which only changes to
my text after hovering over 'Buy this item' or 'Contact Us' which
contain onmouseover and onmouseout code.
Although it reduces the amount of text I can display, I can live with
the titlebar if necessary but particularly want to display much more
useful information in the status bar.

Thanks

function showpopupWindow (item) {
var TitleStatus = 'text I want to display'

htmlTxt = '<html><head><title>' + TitleStatus + '</title></head>';
htmlTxt += '<BODY onload="window.titlebar=\'' + TitleStatus + '\';
return true, window.status=\'' + TitleStatus + '\'; return true"
leftmargin="5" topmargin="5" scroll="auto">';
htmlTxt += '<div align="center">';
.....................
.....................
htmlTxt += '<td width=20%><a href="order_form.htm"
onmouseover="window.status=\'click to buy this item\'; return true",
onmouseout="window.status=\'' + TitleStatus + '\'; return true">Buy this
item</a></td><td
width=20%><a href="mailto:admin@mysite.co.uk?subject=Mysite Sales - ' +
menuStr + ' - Item ' + item + '&nbsp;' + cat[item][3] + '&nbsp;' +
cat[item][4] + '" onmouseover="window.status=\'click to email us\';
return true", onmouseout="window.status=\'' + TitleStatus + '\'; return
true">Contact Us</a></td><td><p align="left"><a
href="javascript:window.close();">Close window</a></td></table></td>';
htmlTxt += '</tr><tr><td>&nbsp;</td></tr></table></div></body></html>;

newWindow =
window.open('','NewWin','width=925,height=600,menu bar=no,statusbar=yes,ti
tlebar=yes,toolbar=no,location=no');
newWindow.document.write(htmlTxt);
}

--
Jon
Randy Webb
Guest
 
Posts: n/a
#2: Aug 20 '06

re: hiding URL in popup window title and status bars


Jon said the following on 8/20/2006 3:56 PM:
Quote:
Hi,
>
I am calling the function showpopupWindow(item) to open and write a
popup window.
Uh oh.
Quote:
When testing in IE6 locally the popup window displays my
text in both the title and status bars but when viewed online from my
website the titlebar text is preceded by the full URL and a - ( eg
http://www.........co.uk - text I want to display) and the status bar
appears to only display Downloading picture
Yes, that's the way it works.
Quote:
http://www..........co.uk/..../..../image.jpg... which only changes to
my text after hovering over 'Buy this item' or 'Contact Us' which
contain onmouseover and onmouseout code.
Although it reduces the amount of text I can display, I can live with
the titlebar if necessary but particularly want to display much more
useful information in the status bar.
The status bar is already used for "useful information", you aren't
trying to improve it, you are attempting to cripple it.
Quote:
onmouseout="window.status=\'' + TitleStatus + '\'; return true">Buy this
You sure that works? Hint: It doesn't.
Quote:
newWindow =
window.open('','NewWin','width=925,height=600,menu bar=no,statusbar=yes,ti
tlebar=yes,toolbar=no,location=no');
IE7 defaults to displaying the location bar in a popup no matter what
you define it as in the window.open call.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
ulrich.kautz@googlemail.com
Guest
 
Posts: n/a
#3: Aug 20 '06

re: hiding URL in popup window title and status bars


Randy Webb wrote:
<snip>
Quote:
>
The status bar is already used for "useful information", you aren't
trying to improve it, you are attempting to cripple it.
>
Quote:
onmouseout="window.status=\'' + TitleStatus + '\'; return true">Buy this
>
You sure that works? Hint: It doesn't.
Oh, it does - depends on your IE 6 patch-status. It was Security-Update
no Q832894 which fixed this issue:
http://support.microsoft.com/kb/833786/EN-US/

Anyway, on my IE it does work fine - but i have to admit, its quite old
(Win(e)98).. Thus, on a "normal" IE out there, it won't work at all..
Probably Jon uses some older Version, like mine, thats what confused
him.


Ulrich Kautz

Randy Webb
Guest
 
Posts: n/a
#4: Aug 20 '06

re: hiding URL in popup window title and status bars


ulrich.kautz@googlemail.com said the following on 8/20/2006 6:52 PM:
Quote:
Randy Webb wrote:
<snip>
Quote:
>The status bar is already used for "useful information", you aren't
>trying to improve it, you are attempting to cripple it.
>>
Quote:
>>onmouseout="window.status=\'' + TitleStatus + '\'; return true">Buy this
>You sure that works? Hint: It doesn't.
>
Oh, it does - depends on your IE 6 patch-status.
Or whether you are using IE 6. I don't, it is IE 7.

As for it working for me, not in Firefox, not even close.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
ulrich.kautz@googlemail.com
Guest
 
Posts: n/a
#5: Aug 21 '06

re: hiding URL in popup window title and status bars


<snip>
Quote:
Quote:
Quote:
>onmouseout="window.status=\'' + TitleStatus + '\'; return true">Buy this
You sure that works? Hint: It doesn't.
Oh, it does - depends on your IE 6 patch-status.
>
Or whether you are using IE 6. I don't, it is IE 7.
OK, I thought you were challenging that it does (or rather did) work in
IE 6.. Never mind.
Quote:
>
As for it working for me, not in Firefox, not even close.
Fully agreed.


Ulrich Kautz

Closed Thread