Trying to submit a post via $.post when page loads

Trying to submit a post via $.post when page loads

Greetings to everyone.  My very first post to these forums.  And my sincere thanks in advance for anyone who can help me solve this since I am "days new" to jquery.  I am trying to come up with a single sign-on solution for my web site.

Thus far I have a php document that verifies the user name and password that gets submitted to it, then passes those credentials to my forum software via the vendors own provided auth method, but the last step eludes me.  I am trying to pass the same credentials to the chat software I'm using so that they don't have to log in to them as well.  The web page that you sign in from is here ...

http://ww2.portalofdreams.com/main/

When you click submit the form data is passed to ...

http://ww2.portalofdreams.com/login/

It's on this page that I have added the $.post example from this site.  All I need to do is submit an empty form to the following URL with the user name and password passed along as part of the URL ...

http:// {user} : {pass} @chat.portalofdreams.com/chat/devroom/

If anyone would like to try it out and share with me their ideas on how to resolve this, I would be very excited to receive your comments.  The test user name is "foradmin" and the password is "newadminpass12".  Here is the code at the bottom of the web page at http://ww2.portalofdreams.com/login/

  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3.   $.post("http://foradmin:newadminpass12@chat.portalofdreams.com/chat/devroom/", function(data) {
  4.     alert("Data Loaded: " + data);
  5.   });
  6. });
  7. </script>