Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts

    JS Function - Passing in a Page Title

    Hey Guys,

    I've got the following JS function:

    Code:
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    }
    //-->
    </script>
    It's being used, as shown below, to throw a pop-up and open a PDF:

    Code:
    <a href="javascript:;" onClick="MM_openBrWindow('http://www.test.com/pdf_01.pdf','','scrollbars=yes,width=768,height=500,resizable=yes')" title="">PDF Name</a>
    It's done this way to hide the name of the PDF, however when the PDF opens, it still shows the name of the PDF in the title bar of the new window. Is there a way I can pass in another var that will replace the title of the new window that is opened?

    Any suggestions would be appreciated. Thanks.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Nope.

    All modern browsers will also show the path to the document for security reasons. If you do not want the user to be able to locate it, you might have to resort to snail mail.

    If you use proper serverside authentication to be able to download documents, than there would be no issue since only people that are allow to access the file can.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • Users who have thanked A1ien51 for this post:

    kraftomatic (01-26-2009)

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    601
    Thanks
    17
    Thanked 0 Times in 0 Posts
    That's what I had figured .. just wanted to double check .. thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •