Results 1 to 8 of 8

Thread: FireFox open batch file.

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    4

    FireFox open batch file.

    Hi guys:
    This is my first thread here.
    I wrote this script
    Code:
    <script type="text/javascript">
    function PROCTest() 
    {
     document.location.href = "/Start.bat"
    }
    </script>
    and then from button I wrote
    Code:
    <input type=button onclick="PROCTest();">
    But the problem that FireFox show the content of the batch file "Start.bat".
    Can I make it execute it? -IE does that-

    Regards

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: FireFox open batch file.

    This is a security vulnerability. You will find that if the page is not served from the local computer, the link will not work at all. Imagine a page that fired off exectables on the client machine when it was viewed.

    A web browser is not the right tool for this task.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    4

    Re: FireFox open batch file.

    Quote Originally Posted by penagate
    A web browser is not the right tool for this task.
    What can I do in this case?
    Any suggestions to run batch file ..............

    Regards

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: FireFox open batch file.

    The command line.


    Explain a little more of your circumstances if you could. Perhaps we can help you to find a better solution.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    4

    Re: FireFox open batch file.

    Quote Originally Posted by penagate
    The command line.
    Explain a little more of your circumstances if you could. Perhaps we can help you to find a better solution.
    By command line .........!! It works ,but how?
    I want to do this

    SmartCodeStudio -p C:\Label.lbx -records="1" -num="10"

    this command can be done in RUN or command line .

    How can I do this in a web page?

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: FireFox open batch file.

    You can't. That's not what web pages are for.

    Why do you want to do this using a web page?

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    4

    Re: FireFox open batch file.

    I'm developing a web page on an intranet .......which contains the last command that prints something...........
    Isn't it logical?
    Any suggestions?
    Last edited by abo_mahmoud; Mar 12th, 2008 at 03:02 AM.

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: FireFox open batch file.

    Quote Originally Posted by abo_mahmoud
    Isn't it logical?
    Not really.
    Web pages don't print things. They're static. You can do a limited amount of manipulation of the web page itself on the client side by using JavaScript, but that's it.

    Do your paper documents walk over to the photocopier and copy themselves? Of course not.
    Don't expect a web page to be able to do anything more.

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