sql server - Error "Object required" While calling the function in HTML linked to embedded vbscript -
out of involvement trying create business relationship creation html store entered info in sql server, , using vbscript.
the vbscript executing well, if run independently in .vbs fromat, when embedding in html, nil happening.
what can problem?? code below.
<html> <head> <script type="text/vbscript"> <!-- ... <!-- part connects sql server //--> ... function adduser(name,age,username,pass,repass) if (pass = repass) connection.execute("insert [newsn].[dbo].[userinfo] ([name],[age],[username],[pass]) values ('"&name &"','" &age &"','"&username &"','" &pass &"')") msgbox "you added!" else msgbox "password mismatch!"&vbnewline&"please re-enter!" end if end function //--> </script> </head> <body> <h1><b><u>newsocialnetwork</b></u><br></h1> <h2>sign up</h2> <p> <pre> <font face="times new roman" size="3">please come in details: name: <input type="text" name="name"> age: <input type="text" name="age"> user name: <input type="text" name="username"> password: <input type="password" name="pass"> retype password: <input type="password" name="repass"></font> <input type="button" onclick="adduser name.value,age.value,username.value,pass.value,repass.value" value="sign up" /> </pre> </p> </body> </html>
i have edited code shown above. in function call, getting error "object required" , if remove ".value" calling line, execution succesful entered info not beingness displayed in database; [object] displayed instead of actual field values.
what wrong? how add together object?
html sql-server vbscript
No comments:
Post a Comment