Dear All,
Firstly thank you for looking at my post, and am hoping you would review and help me out.
what I am trying to do is:
1) Create a form which captures username, domain using objuserinfo.username and objuserinfo.userdomain
Things work well till here - I am able to get my form with values populated.
When i submit that form and the new asp page does not recognize the form values and would return null values.
HTML Code:<html> <head> <title>Sample module</title> <body> <br><br> <form name="formname" method="post" action="framework.asp"> <table id="tblMain" align="center" cellPadding="0" cellSpacing="0"> <tr> <td colSpan="3"> <table cellPadding="0" cellSpacing="0" class="tblLgn"> <tr> <td class="lgnTL"><img alt="" src="images/lgntopl.gif"></td> <td class="lgnTM"></td> <td class="lgnTR"><img alt="" src="images/lgntopr.gif"></td> </tr> </table> </td> </tr> <tr> <td id="mdLft"> </td> <td id="mdMid"> <table class="mid"> <tr> <td><hr></td> <td> </td> </tr> <tr> <td id="tdMsg" class="auto-style2">Your identity has been obtained from your login credentials.</td> <td id="tdMsg"> </td> </tr> <tr> <td class="auto-style2"><hr></td> <td> </td> </tr> <tr> <td class="auto-style2">Computer Name</td> <td><input id="code" name="code" disabled="disabled" type="text" > </td> </tr> <tr> <td style="height: 17px" class="auto-style2">Domain</td> <td style="height: 17px"> <input id="udomain" disabled="disabled" name="udomain" type="text" ></td> </tr> <tr> <td class="auto-style2">Username</td> <td> <input id="uname" name="uname" disabled="disabled" type="text" ></td> </tr> <tr> <td class="r"> </td> <td class="r"> </td> </tr> </table> <table class="mid tblConn"> <tr> <td align="right" class="tdConnImg" rowSpan="2"> <img alt="" src="images/lgnexlogo.gif"></td> <td class="r"> <input id="btnCls" type="submit" class="auto-style1" type="submit" value="Launch Page !!"></td> </tr> <tr> <td class="tdCopy"> </td> </tr> </table> </td> <td id="mdRt"> </td> </tr> <tr> <td colSpan="3"> <table cellPadding="0" cellSpacing="0" class="tblLgn"> <tr> <td class="lgnBL"><img alt="" src="images/lgnbotl.gif"></td> <td class="lgnBM"></td> <td class="lgnBR"><img alt="" src="images/lgnbotr.gif"></td> </tr> </table> </td> </tr> </table> </form> <script> var codeElem = document.getElementById('code') var codeuname = document.getElementById('uname') var codedomain = document.getElementById('udomain') var text = ""; var objUserInfo = new ActiveXObject("WScript.network"); codeElem.value = objUserInfo.ComputerName; codeuname.value = objUserInfo.UserName; codedomain.value = objUserInfo.UserDomain; </script>
This form is generated well, it gives me all 3 fields with values populated correctly. When I click on submit button (or launch file button) - it calls a new page "framework.asp" - all I am doing in framework.asp is,
It gives me a null value. form values from the previous file are not being passed.Code:<% dim newuname newuname = request.form("uname") %> <%=newuname%>
can any one help me please????
Your help would be much appreciated.


Reply With Quote
Bookmarks