• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Posting Form to Another Server

Contributor ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

I'm trying to do the following:

1. Users enter their username and password into a form on my server
2. Form submits to a CF page that checks username and determines which web mail server user is on
3. CF page then submits username/password to the web mail server so user is logged in

This would not work using CFHTTP since I want the user's browser to log in and get the response (not the server). I believe it would also not work using CFLOCATION because I need to use post and not get for the form.

I know I can do this by returning a page with the appropriate form fields and then using JavaScript to submit to the server. Is there another option available that does not use JavaScript?

Thanks.
TOPICS
Advanced techniques

Views

371

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

I know I can do this by returning a page with the appropriate form
fields and then using JavaScript to submit to the server. Is there
another option available that does not use JavaScript?

Just the ones you have already dismissed. If you want the browser to do
this, you have to send a request to the browser. There is no way you
can not have the server do this for the browser.

You can have the server do this and send the results to the browser, but
this is the options you have dismissed.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

sigh.. sorry Ian, that's the second time I've done that. Not trying to rewrite your thoughts, you've managed to reply to two threads at the same time I'm typing I think.

edit: well, now that I actually read the posts, I see my issue.. clearly my lunch hour has gone for to long.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

sigh.. sorry Ian, that's the second time I've done that. Not trying to
rewrite your thoughts, you've managed to reply to two threads at the
same time I'm typing I think.

Not a problem. More likely it is the delay in the system for us
newsreader users. Our replies may not show up in the web forum for 15
to 30 minutes after we send them according to the newsgroup FAQ.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

LATEST
Not trying to rewrite your thoughts,...

Actually I would not have minded if you could have rewritten this one:
"There is no way you can not have the server do this for the browser."

That is not my best composed sentence. I believe I wanted to say
something like:
"There is no way you can have the server do this for the browser."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

Once the form is submitted and you have confirmed that the information entered is correct, display another form with the username and password in hidden form fields, named appropriately to match the webmail login form. The action of that form should also match the action of the webmail login form. Then add something like <body onload="document.form[0].submit()"> and you will forward the user to the webmail app, submitting the username and password just as if they did it normally, with the exception that the referrer will not be correct. Hopefully the app doesn't check for that.

You should consider putting a submit button on that page however, just in case the user has javascript disabled otherwise they could be left in limbo. Place the button inside a <noscript> block so that it's only displayed to these users. That will give you the most seemless appearance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation