PDA

View Full Version : trouble calling this java script...



xmattx
May 26th, 2003, 09:14 AM
im using this script....



<script language="JavaScript">
function HOS(url, scrollo) {
var Wt = screen.availWidth - 10;
var Ht = screen.availHeight - 30;
window.open(url, "HOSPITAL", "width=" + Wt + ",height=" + Ht + ",top=0,left=0,scrollbars=" + scrollo);
}
</script>


and calling it like this:

JavaScript:HOS("website.htm","no")

doesnt seem to be working... wtf!

any help?

chris9902
May 26th, 2003, 10:52 AM
post the code inside PHP tags or we can't see it

use [PHP*] [/PHP*]

but take the *'s away (i just put them the so it shows up)=)

xmattx
May 26th, 2003, 11:18 AM
changed...

chris9902
May 26th, 2003, 03:32 PM
what is the script ment to do

xmattx
May 26th, 2003, 03:42 PM
the script works fine, it opens a window at the size of the screen the user is viewing at, minus 10percent on all sides, hence a "full screen" window but not borderless or "unexitable" the script works fine when i use an onload command with it.. but when i try and call it with a hypertext link it doesnt work.

lostinbeta
May 26th, 2003, 04:20 PM
Well I didn't test it, but try changing the double quotes to single quotes, sometimes that is the problem.

xmattx
May 26th, 2003, 07:44 PM
that ficed it lost. thanks a bunch, i feel stupid. haha

lostinbeta
May 26th, 2003, 07:59 PM
Many a time the same thing happened to me.