PDA

View Full Version : Javascript login form HELP



chris1988
05-23-2012, 04:28 PM
Hello, i have a problem, i have this html code for login page with a select list.



<!-- #LOGIN# -->



<div id="mobileLoginWrapper" class="activeMobileMenu mobileOnly">

<div id="mobileLogin">

<form action="http://server1.com/index.php?action=loginAvatar&function=login" method="post" name="mobileLoginForm" id="mobileLoginForm">

<div class="input-wrap">



<label for="mobileLogServer">server</label>





<select name="uni_url" id="mobileLogServer" class="validate[required]">







<option class=""

value="server1.com"


cookieName=""

>





server1

</option>





<option class=""

value="server2.com"

cookieName=""

>





server2

</option>





<option class=""

value="server3.com"

cookieName=""

>





server3

</option>





<option class=""

value="server4.com"

cookieName=""

>





server4

</option>









</select>

</div>



<div class="input-wrap ">

<label for="mobileLoginName">username</label>

<input id="mobileLoginName" name="name"

type="text" value="" class="validate[required,exemptString[username]]" />

</div>



<div class="input-wrap ">

<label for="mobileLoginPassword">password</label>

<input id="mobileLoginPassword" name="password"

type="password" value="" class="validate[required,exemptString[password]]" />

</div> <div class="input-wrap noBG">

<div class="button-wrap">


</div>

<input type="hidden" value="" name="kid" id="mobileLoginKid"/>

<button class="btn-login" id="mobileLoginBtn" type="submit">submit</button>



</div>

</form>

</div>

</div>


</html>


but i want to make it dynamic with javascript, for example when the user selects server3, at the form
<form action="http://server1.com/index.php?action=loginAvatar&function=login" method="post" name="mobileLoginForm" id="mobileLoginForm">
to send the login to server3 and when another user selects server2 to send the login form to server2.
Any help please?