Script works for some, for others it doesn't... Please help!

wxdqz

New Member
Hello All,

please help me solve a problem with my script... Some people say it works, while others say it doesn't... I am simply at a loss (admittedly, because I am really new to JavaScript).

Anyway, the script is on a parent page, it resizes it on load, and then opens and also resizes a new window with a calendar when people click on the word "calendar" on that parent page. It works just fine for me and many others as well, but some people tell me that they get Java errors when they click on the word "calendar".

The script goes like this:

--------------------------------------------
<body onLoad="javascript:move_2_200_0();">

<script language="JavaScript">
<!--
function move_2_200_0()
{
self.moveTo(200,0)
self.resizeTo(700,700)
}
function open_new_window(url)
{
new_window = window.open(url, 'Calendar','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,width=250,height=220,left=700,top=1 20')
}
//-->
</script>


<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:open_new_window('ENG/calendar_EN.html');" target="_blank">calendar</a>
--------------------------------------------

What I so far tried to do to find the cause of the error was this:

1) replaced the line 'ENG/calendar_EN.html' with its full http:// path - no effect (works fine for me just as before but not for those who coudn't open that calender earlier either). The page "calendar_EN.html" is indeed in the same directory ("ENG") with its parent page.

2) repalced the "url" in brackets with the full http:// address - stopped working even for me

3) tried to replace single quotes around 'ENG/calendar_EN.html' with &quot - no go either...


Does anyone see a problem in my script? If so, what ist it? Why does it work for some people and doesn't for others??? I would greatly appreciate any help and advice!

Also, and while at it... I somehow sense that the problem is either with the function open_new_window or javascript:open_new_window('xxxxxxx'), or both...

What I basically want to do (and would also very much prefer to do it this way) is this:

I would like to have a simple <a href ........ </a> link to the word "calendar" on the parent page while placing all the self.move and self.resize stuff onto the page called for through this link (i.e., the page containing the calendar), and thus get rid of this (so far half working, half not) open_new_window thing on the parent page.

But then, if I place the self.move and self.resize things on the child page, how do I tell it not to show the toolbar, menubar, directories, etc., etc. from within this page and not from the parent page???

If this is all possible, how do I do it?

Millions of thanks in advance for any help!

Valery
 
Back
Top