My website is created with the work of CSS / HTML Frame which is integrated into ASP.NET website.
Inside a content placeholder, I have a simple login form. The catch is that I am using an image's onclick event to submit the form. It normally works very straight forward, but this time I am having a problem
& lt; Div id = "login" & gt; & Lt; Form action = "index.aspx" method = "post" id = "nothingForm" name = "nothingForm" & gt; & Lt; / Form & gt; & Lt; Form action = "https://google.com.au" method = "post" id = "loginform" name = "loginform" & gt; & Lt; Input type = "text" name = "uname" value = "username" onfocus = "if (! This._haschanged) {this.value = ''}; this._haschanged = true;" /> & Lt; Input type = "password" name = "pword" value = "password" onfocus = "if (! This._haschanged) {this.value = ''}; this._haschanged = true;" /> & Lt; / Form & gt; & Lt; Br / & gt; & Lt; Img src = "picture / login.gif" alt = "" onclick = "document ['login form']. Submit ()" /> & Lt; / Div & gt;
I have to leave the second form to create an onclick = "document ['loginform'] before the actual format. Submit ()" It really should not be a matter of work , But I could not find any solution on the web.
Has anyone else come on this before?
Your problem is that the page already has a form around all the codes form nested Can not be done, so your first form tag will be ignored, and this end tag will end the external form.
You have to keep your form outside of the existing form.
Comments
Post a Comment