Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-06-2006, 10:10 AM   #1 (permalink)
krisl100
krisl100
 
Join Date: Oct 2006
Location: Montreal
Posts: 34
krisl100 is on a distinguished road
PAC files

Hi, I have a Javascript .pac file being used as an autoconfiguration proxy script that points to my proxy server. I am trying to test something & I need to have the IP address returned as a messagebox or display, like a cout in C++, is there a way to accomplish this in Javascript pac files?

I thought just using else return (myIpAddress) would work but it does not. any help is greatly appreciated.

Here is my code:

function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0"))
return "PROXY 192.168.1.1:8080";

}
krisl100 is offline   Reply With Quote
Old 11-06-2006, 12:05 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
do you have any UI elements you can print the message to? example:
HTML Code:
<html>
<head>
<script>
function loadMessage() {
  document.getElementById('test').value=FindProxyForURL('example.com');
}
</script>

<body>

<textarea id="test"></textarea>
</body>
</html>
what is a .pac file?
__________________
Mike
sde is offline   Reply With Quote
Old 11-06-2006, 12:12 PM   #3 (permalink)
krisl100
krisl100
 
Join Date: Oct 2006
Location: Montreal
Posts: 34
krisl100 is on a distinguished road
pac files

Hi, thanks for your reply, I don't think I have any UI elements I can plug it into, I don't know javascript all that well, a pac file is simply a javascript file with a .pac extension that is put into Internet Explorer in Connections, LAN settings, Use autoconfiguration script. IE then looks at this file for proxy server info & directs traffic to it. Just lookup .pac files ina search.
krisl100 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiled Java files working on one machine and not on another machine?? j.gohel Java 7 09-07-2006 11:45 AM
Rotating .swf files at random with JavaScript? VisionsIC HTML, XML, Javascript, AJAX 0 05-18-2005 11:12 AM
Temp Internet Files - Delete wendyng HTML, XML, Javascript, AJAX 0 04-18-2005 10:30 PM
.h files needed Maani Standard C, C++ 7 02-02-2005 04:59 AM
Installing and using CMUgraphics library. Valmont Standard C, C++ 12 03-29-2003 08:39 AM


All times are GMT -8. The time now is 11:02 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting