|
-
Oct 17th, 2003, 09:42 AM
#1
Thread Starter
Lively Member
[JAVASCRIPT] Submit function
Hi
Can anyone help with a puzzling problem:
I have a form and the form has an action, to an external url and a method of post. This form is used to log into a website that is not ours.
If i put a button into the form labelled sumbit then the user is logged into this new form.
However if i use the following code then we are redirected to the page but not logged in.
<a onclick="javascript: Login();">Click here to login</a>
<script>
function Login()
{
theplusForm = document.forms['plusLogin'];
theplusForm.submit();
}
</script>
Anyone have any ideas?
Sarah
-
Oct 17th, 2003, 03:05 PM
#2
Is plusLogin the name of the form?
what happens if you go
Code:
document.plsLogin.submit();
or is there more than one form on the page?
-
Oct 20th, 2003, 03:16 AM
#3
Thread Starter
Lively Member
plusLogin is the name of the form.
Unfortunately this code does not work either 
Sarah
-
Oct 20th, 2003, 03:45 AM
#4
Two suggestions:
Try this:
Code:
<a href="#" onclick="java script: Login();">Click here to login</a>
And the other suggestion would be to use a submit button that has the action equal to the full URL of the page that it's to be submitted to.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|