|
-
May 14th, 2003, 03:54 PM
#1
Thread Starter
Fanatic Member
javascript
Here is a script that I am using:
function ShowHelp(PageName)
{
var HelpWindow;
HelpWindow = window.open(pagename,"help","left=600,height=300,width=200");
HelpWindow.focus;
}
And this is the link that I am usiing to use the function;
<div align="right"><a href="#" onclick="ShowHelp('ctcHelp.htm')">Help</a></div>
But there is an error, and it is:
pagename is not defined.
Does this mean that I have to declare pagename somewhere as the parameter of ShowHelp?
Thanks
-
May 14th, 2003, 04:22 PM
#2
PowerPoster
Your passing in PageName, but you are trying to use pagename. Note the case. JavaScript is case sensitive, therefore, myvariable and Myvariable are two different variables.
Try this:
function ShowHelp(pagename)
{
var HelpWindow;
HelpWindow = window.open(pagename,"help","left=600,height=300,width=200");
HelpWindow.focus;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|