SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old April 15th, 2005, 09:56 AM
PhilCYa PhilCYa is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Wheaton, IL USA
Posts: 1 PhilCYa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 56 sec
Reputation Power: 0
Send a message via Yahoo to PhilCYa
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

Reply With Quote
  #2  
Old April 26th, 2005, 01:03 PM
pentapenguin pentapenguin is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 51 pentapenguin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 7 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old April 27th, 2005, 08:02 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Need Default Printer's IP Address


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway