Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2008

Tip: Looking for answers? Try searching our database.

Question on JavaScript

Thread view: 
Dorothy Mantooth - 30 Jun 2008 16:55 GMT
My company is switching from using a vendor DNS server to our own as
well as creating a new network.  We want to verify whether or not our
customers can "reach" our new network so we have placed some
JavaScript on the logon page of one of our applications to check for
the existence of an image on the new network.  We have had over 20,000
successes and about 300 failures.  I want to know if the failures
could be do to the following scripting code or if we should continue
to look at the DNS, ACL's, etc.  I want to rule out the script.  The
failures are falling into the isBad funciton and we are logging.

            function testImage(URL)
                var tester=new Image();
                tester.onload=isGood;
                tester.onerror=isBad;
                tester.src=URL;
            }

            function isGood() {
                if( debug ) {
                    alert('Image exists!');
                    //Log success (around 20,000)
                }
            }

            function isBad() {
                if( debug ) {
                    alert('Image does no exist!');
                    //Log failure (around 300)
                }
            }
Joshua Cranmer - 30 Jun 2008 17:31 GMT
[ Sorry for top-posting ]
JavaScript != Java. Moving to c.l.js
> My company is switching from using a vendor DNS server to our own as
> well as creating a new network.  We want to verify whether or not our
[quoted text clipped - 26 lines]
>                 }
>             }

Signature

Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.