Need some help with some JavaScript

Subject: Need some help with some JavaScript
From: Chuck Martin <cm -at- writeforyou -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Fri, 10 Dec 2004 11:00:12 -0800


Posting here (a community where I've been a long member) first before going to a JS-specific community (where I've not been before).


I'm trying to figure out why this code works fine in Firefox (1.0) but
causes an error in Internet Explorer (6.0).

This is inside the HEAD tags:

<script language="JavaScript">
function helpwin(URL, name) {
var upperLeft = (screen.availWidth / 2);
var winHeight = (screen.availHeight / 2);
var w = (screen.availWidth / 2);
var win = window.open(URL, name,
'toolbar=no,status=no,menubar=no,width=' + w + ',height=' + winHeight
+ ',left=' + upperLeft + ',top=0');
}

</script>

And this is in the BODY tags:

<p>Click <a href=""
onclick="helpwin('GoalView%20Help/WebHelp/GoalView_Help.htm',
'GoalView Help');">Help</a> to view the help. </p>

I get an "Invalid Argument" error, and when I try to debug it, I can
get no additional information. (When I click Help on the error message
box, I get another error mesage saying that the help can't be
displayed while Internet Explorer is being debugged.) If I say No to
debugging, I get an Explorer-like file list in the browser. the error
seems to be in the window.open line.

Just to make sure, I type javascript: in the Firefox address bar, but
the JavaScript console shows mo errors.

I had someone elsewhere where I asked question if it was the space in the filename, but I dont' think so; it's properly URL encoded.

--
--
Chuck Martin
User Assistance & Experience Engineer
twriter "at" sonic "dot" net www.writeforyou.com

"I see in your eyes the same fear that would take the heart of me.
The day may come when the courage of Men fail, when we forsake our
friends and break all bonds of fellowship. But it is not this day!
This day, we fight!"
- Aragorn

"All you have to decide is what to do with the time that is given you."
- Gandalf

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ROBOHELP X5 - SEE THE ALL NEW ROBOHELP X5 IN ACTION!

RoboHelp X5 is a giant leap forward in Help authoring technology, featuring all new Word 2003 support, Content Management, Multi-Author support, PDF and XML support and much more! View an online demo: http://www.macromedia.com/go/techwrldemo

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- techwr-l -dot- com
Send administrative questions to lisa -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.



Previous by Author: Re: DFD BFD
Next by Author: Re: Need some help with some JavaScript
Previous by Thread: RE: SnagIt vs GrabIt
Next by Thread: Re: Need some help with some JavaScript


What this post helpful? Share it with friends and colleagues:


Sponsored Ads