PDA

View Full Version : onclick or login function in javascript


newbie_adm
05-15-2007, 06:32 PM
Hi,
I would like to ask how can i resolve my problem regarding the onlick or login function in javascript. Here is the scenario. I have a billing server with web. In this web I have a cutomer_login and account_login which we be the access of my client to see their account_details, records, etc. We have created a new website, we can call this site1. On our site1 we wanted to integrate the login process of our billing login to site1. When user/client tries to login to our site1, we wanted that the site1 will be the once to login to the blling server, after logging to site, they will be able to see their records. The developers of my billing gave me some integration script for the site1. But it seems its not working. They told me to create a function that will redirect site1 login to my billing site. I'm really a newbie to javascript, so if anyone could please help. Below are the script that was given to me by our billing support.

Thank you very much in advance.

Best Regards,
newbie_adm

<script language='JavaScript'>
document.pblogin.action = "https://logon.telco.com:8444/index.html";
document.pblogin.password.value = unescape(document.pblogin.password.value);
document.pblogin.pb_auth_password.value = document.pblogin.password.value;
document.pblogin.submit();
</script>

<form method='post' action='' name='pblogin'>
<input type='text' name='user' value=''><br>
<input type='password' name='password' value=''><br>
<input type='text' name='user' value=''>
<input type='hidden' name='pb_auth_user' value=''><input type='hidden'
name='pb_auth_password' value=''>
<input type='submit' name='subbtn' onclick='login_to_pb()'>
</form>

shyam
05-16-2007, 10:34 AM
Try this


<script language='JavaScript'>
function login_to_pb() {
document.pblogin.action = "https://logon.telco.com:8444/index.html";
document.pblogin.password.value = unescape(document.pblogin.password.value);
document.pblogin.pb_auth_password.value = document.pblogin.password.value;
document.pblogin.submit();
}
</script>

<form method='post' action='' name='pblogin'>
<input type='text' name='user' value=''><br>
<input type='password' name='password' value=''><br>
<input type='text' name='user' value=''>
<input type='hidden' name='pb_auth_user' value=''><input type='hidden'
name='pb_auth_password' value=''>
<input type='submit' name='subbtn' onclick='login_to_pb()'>
</form>