|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Need Default Printer's IP Address
For an Intranet application, we need to send the IP address of the client's default printer to a VRU Dialer application. Other than asking the user to enter the IP address, does anyone have any suggestions that we can use from our JavaScript? One idea that we have had is to create a separate start up script that would look up this information and store it as an environment variable or in the Window's Registry. But, then our JS would be dependent on that running successfully.
Thanks, Phil |
|
#2
|
|||
|
|||
|
That's not possible in JavaScript.
(How would you like a malicious script to send your IP address to a server without asking? )However, you could do that in PHP very easily. Like this: Code:
<a href="printer.php?ip_address=<?php print($_SERVER['REMOTE_ADDR']); ?>">Print</a> If you can't convert to PHP, then there's a small Firefox plugin that lets you paste in your IP address. |
|
#3
|
||||
|
||||
|
You want the printer's ip, not the actual computer's ip, correct?
Well, I agree that this is not possible in a web environment. You might want to create a standalone application, or even an ActiveX control, to use this information. the main drawback would be that this would limit your company to only Windows machines, which likely defeats the purpose of a web application. Although Javascript would be an ideal solution for an intranet, consider the exploits possible from a malicious site on the WWW. Overall, definately not possible using Javascript. You might want to consider an ActiveX approach. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Need Default Printer's IP Address |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|