SearchDomino.com July 23, 2001 Developer Tip ================================================= ------------------------------------------------- Sponsored By: Swing Software ------------------------------------------------- ************* MS OFFICE INTEGRATION ************* Integrate your applications with Microsoft Office using new SWING Integrator v2.0. Create, save, edit Office documents as attachments; field exchange, mail-merge, labels, templates... Now there's no easier way. No DLLs -- no end-user licenses -- unlimited distribution (ROYALTY-FREE)! Learn what hundreds of developers and thousands of end-users already know. http://www.swingsoftware.com/searchdomino.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ June's Tip Prize Winners: 1st place: "Re-attach ID files" by Patty Halsey Congratulations to Patty Halsey, a consultant in Evansville, Indiana. Patty won the Secret Agent Man digital watch. 2nd place: "Debug LotusScript menu workaround" by Thomas Ozenne 3rd place: "Create database link as shortcut on your Windows Desktop" by Gokmen Eris ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= Feature Tip ================================================= Title: Input validation for file attachments using JavaScript This tip was submitted by Lothar Mueller, a senior IT consultant and senior developer in Muenchen, Germany. We all have learned that for performance reasons, we should perform field input validations using JavaScript if the user fills a form using a web client. To validate the attachment of a file, however, it is a bit more difficult since the file isn't uploaded until the form is submitted. A solution is to validate the value of the HTML input element instead. The standard Notes file upload control generates an HTML input element (type = "file"), which takes the absolute path of the file to be uploaded. The following code validates the contents of that element. It can be put into the onSubmit event of the form along with the rest of the field validation functions. CODE: function validateFileUpload () { for(i=0;i<document.forms[0].elements.length;++i) { var elem = document.forms[0].elements[i]; if (elem.type == "file") { alert ("Element-Value: " + elem.value); if (elem.value == "") { alert ("please attach you file"); return (""); } } } } END CODE http://searchdomino.techtarget.com/tip/1,289483,sid4_gci754792,00.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= Do you have a comment on this tip? Jump into our Developer Discussion forums and toss your ideas around with your peers: http://searchdomino.discussions.techtarget.com/WebX?50@@.ee7740b OR SEND US YOUR FEEDBACK TO BE POSTED ON THE TIP TO: [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= ------------------------------------------------- Sponsored By: ONLINE CORPORATE SOFTWARE ------------------------------------------------- *********** WIN AN IBM THINKPAD T21 ************* Online Corporate Software is giving away a brand new IBM Thinkpad T21. To enter the draw just visit our website and complete the trivia quiz. With over 35 open source code Lotus Notes applications and free online Notes technical support OCS is fast tracking Domino development. http://www.onlinecorporatesoftware.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= NEWLY POSTED DEVELOPER TIPS: ================================================= We posted 11 new tips last week. Thanks for all your tips and keep them coming! Domino Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283837_alpD_idx0,00.html [1] File upload validation for file type with JavaScript Formula Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283836_alpD_idx0,00.html [1] Show who last edited document in view [2] Create a section with an action button [3] Determine only newly selected checkbox items [4] Validating a richtext field for attachments HTML Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283838_alpD_idx0,00.html [1] Dynamic HTML table as an action bar Java Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283839_alpD_idx0,00.html [1] How to resolve the problem of planning in Lotus Notes JavaScript Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283840_alpD_idx0,00.html [1] Trim functionality on web in JavaScript Other Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283842_alpD_idx0,00.html [1] Combining LotusScript, JavaScript and Formula language Script Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283841_alpD_idx0,00.html [1] Excel import into Lotus Notes [2] Calculate date ranges excluding weekends and company holidays ================================================= FEATURED BOOK: ================================================= CLP Fast Track: Lotus Notes/Domino 5 Application Development By: Tim Bankes, Dave Hatter and Dennis Maione If you are a Lotus professional looking to update your CLP 4 status or starting down the road to the CLP 5 certification, the Fast Track title offers you all the information you need to pass the 3 exams that make up the Application Development certification. As you know, with the release of R5, Lotus updated their certification strategy to include task-specific testing levels, while maintaining the division between System Administration and Application Development within their testing arena. There are now three exams that candidates must take to be certified in the application development arena. Created for the experienced exam candidate, someone with a prior version certification or that has worked with Notes/Domino for a while, the Fast Track hones in on what you need to know to pass the exam specifically, without overwhelming you with unnecessary detail. CLP Fast Tracks are the accelerated path to CLP certification success. http://www.digitalguru.com/dgstore/product.asp?sku=0735708770&dept%5Fid=288&ac%5Fid=60&accountnumber=&couponnumber ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= Disclaimer: These tips are submitted by your Domino peers. Our tips services and online tips exchange are a way for you to learn from other IT professionals and share technical advice and expertise with your peers. Techtarget.com provides the infrastructure to facilitate this sharing of information. However, we can't guarantee the accuracy and validity of the material submitted. You agree that your use of the searchDomino.com tips services and your reliance on any questions, answers, information or other materials received through searchDomino.com will be at your own risk. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= NOTIFY US WITH FEEDBACK ================================================= Send us your tips feedback! Cast your vote and send us your tips comments. If you have vital code information or other comments you'd like to add to one of our online tips, send your comments to [EMAIL PROTECTED], and we'll add your User Feedback to the online tip! ================================================= If you would like to sponsor this or any TechTarget newsletter, please contact Gabrielle DeRussy at [EMAIL PROTECTED] ================================================= If you no longer wish to receive this newsletter simply reply to this message with "REMOVE" in the subject line. Or, visit http://searchDomino.techtarget.com/register and adjust your subscriptions accordingly. If you choose to unsubscribe using our automated processing, you must send the "REMOVE" request from the email account to which this newsletter was delivered. Please allow 24 hours for your "REMOVE" request to be processed.