Results 1 to 2 of 2

Thread: javascript

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    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

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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
  •  



Click Here to Expand Forum to Full Width