-------------------------------------------------------------------------------------------------- Last Updated: 08/16/2011 -------------------------------------------------------------------------------------------------- This information retrieved from the Ohman Automation Corp. website, http://www.OhmanCorp.com/reference.asp, and may be copied with this header intact. Author: Jay R. Ohman ** disclaimer and release: I am NOT an expert ** ** programmer, use my coding at your own risk! ** ====================================================== ASP snippet to retrieve current FileName ------------------------------------------------------ <% sPath = Request.ServerVariables("PATH_INFO") sDocName = Right(sPath, Len(sPath) - InStrRev(sPath, "/")) %> ====================================================== Sample Form - Provide 'Submit' and 'Cancel' psuedo-buttons (or just leave as normal appearing hyper-links) ------------------------------------------------------ --- THE FORM ---
--- THE 'BUTTONS' --- Submit Cancel --- THE JAVASCRIPT --- NOTES: -------------------- - If desired, the javascript function call can be substitued as: onclick="return document.MyForm.submit; return false;" (the return false cancels the hyperlink click) - any javascript that references the value needs the FormName example: document.MyForm.TextBoxVal.value - No need to set the id using this method example: omit the 'id="MyForm"' from the form attributes - This avoids having to use the 'getElementById' can be avoided: return submitForm(document.getElementById('MyForm')); SIDE NOTE: -------------------- - when using javascript to fetch data from an input element, it the element is NOT contained within a form element, the input element can NOT be referenced by 'name' (document.TextBoxVal) In that case, then use document.getElementById('TextBoxVal').value