WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : write an event to the eventlog via JScript
Categories : Java Script, Windows 2000
Boaz Yahav
Date : Jan 03rd 2001
Grade : 1 of 5 (graded 1 times)
Viewed : 4604
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Boaz Yahav
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

I found this script very useful. You can use it to write messages to the event tog. I tested it
on win2K soI'm not sure how it runs on other systems. The source for this file is MS.


// NOTIFY.JS
// Description:
// Notify.js can be customized by the user
// Right now it reports a missing hotfix on commandline and writes an event to the eventlog
// But it is also possible to generate a mail, halt IIS or generate other events that are
// relevant to administrators.


function Notify(type,sBulletin, sTitle, sLink, sMachine)
{
        var oShell = new ActiveXObject("WScript.Shell");
        switch(type)
        {
                // consts (for instance HOTFIX) are declared in HFCHECK.WSF
                case HOTFIX:
                        WScript.Echo("\nMissing Hotfix on Machine " + sMachine + "
Detected:\nMicrosoft Security Bulletin (" + sBulletin + ")\n" + sTitle + "\nLink:
http://www.microsoft.com" + sLink);                                
                        oShell.LogEvent(2,"Missing Hotfix on Machine " + sMachine + "
Detected:\nMicrosoft Security Bulletin (" + sBulletin + ")\n" + sTitle + "\nLink:
http://www.microsoft.com" + sLink);
                        break;
                case WORKAROUND:
                        WScript.Echo("\nWorkaround Notification for Machine " +
sMachine + ":\nMicrosoft Security Bulletin (" + sBulletin + " )\n" + sTitle + "\nLink:
http://www.microsoft.com" + sLink);
                        oShell.LogEvent(2,"Workaround Notification for Machine " +
sMachine + ":\nMicrosoft Security Bulletin (" + sBulletin + " )\n" + sTitle + "\nLink:
http://www.microsoft.com" + sLink);
                        break;
                case MISSINGINFO:
                        WScript.Echo("\nHotfix Warning for Machine " + sMachine
+ ":\nUnable to verify hotfix install \nMicrosoft Security Bulletin (" + sBulletin + ")\nLink:
http://www.microsoft.com" + sLink);
                        oShell.LogEvent(2,"Hotfix Warning for Machine " + sMachine
+ ":\nUnable to verify hotfix install \nMicrosoft Security Bulletin (" + sBulletin + ")\nLink:
http://www.microsoft.com" + sLink);
                        break;
        }
}



javascript doesn't accept a fieldname with []
Categories : Java Script
PHP4 session helper HTML file.
Categories : PHP, Java Script, HTML and PHP, Sessions
Install Flash player plug-in
Categories : Flash, Java Script
Clock at Status Bar
Categories : Java Script, HTML, Date Time
Select a value for your form from a list in a separate window.
Categories : User Interface, Java Script
Dynamic Calender in PHP, Javascript and HTML.
Categories : PHP, Java Script, HTML and PHP, Calendar
Building dynamic menus with PHP & MySQL (ADO), JavaScript and CSS
Categories : PHP, Databases, MySQL, Java Script, User Interface
Javascript URL and Email Validation
Categories : Java Script, Data Validation, Form Processing, Email, URLs
Simple Javascript CSS Digital Clock
Categories : Java Script, Date Time, CSS, Beginner Guides, Web Design
Unobtrusive javascript for maintaining scrollable layer state
Categories : DHTML, Java Script, HTML
Pull Down Surfing - Surf on Change
Categories : Java Script, MySQL, HTML and PHP, PHP, Databases
Java Script Based Navigation
Categories : HTML, Java Script, Navigation
Hilight Form Element onFocus
Categories : Java Script, Form Processing, CSS
Enchancing dd/mm/yyyy forms with unobtrusive javascript
Categories : Java Script, HTML, User Interface, Date Time
Zephyr: AJAX Based Framework for PHP5 Developers
Categories : PHP, AJAX, Frameworks, Java Script, Web Applications