How to Make an Ajax Form Work Under SSL

SSL allows you to secure parts of your website, such as a login page, keeping your visitors and their information safe from prying eyes. An encrypted connection manifests itself as an "HTTPS" header in the URL instead of the more typical "HTTP." Failure to code your AJAX form requests to work under encrypted URLs will result in an unsecured form that puts users at risk. Fortunately, you can make your AJAX form work under your SSL encryption simply by pointing it to the encrypted URL.

Instructions

    • 1

      Right-click on the code file of the Web page with the AJAX form. Select "Open With" from the menu that appears. Choose "Notepad." The Web page file will be opened in Notepad for you to edit.

    • 2

      Locate the AJAX form script by scrolling down the file, or by pressing "Ctrl" and "F" on your keyboard and typing "AJAX" into the search field, then pressing "Enter."

    • 3

      Locate the URL within the AJAX script that is used by the code to call out its request. Change the call URL so that it contains an "HTTPS" header instead of "HTTP." For example, if the beginning of your code looks like:

      $.ajax({ type: "TEXT", url: "http://www.mysecuresite.com/")

      Change it so that the URL reads "https://www.mysecuresite.com/" instead.

    • 4

      Press "Ctrl" and "S" to save the changes you made to the AJAX form. Close Notepad.

Related Searches:

References

Comments

Related Ads

Featured