|
-
Dec 6th, 2005, 09:48 AM
#1
Submit Form stopped working after enabling SSL
The site I’m working on has an option for a printable version for many of the pages. What we have been doing is using an Include file to creates a form on the page (name=printForm). This form contains a number of hidden fields that are required for the proper generation of the page.
This is an example of the form.
<form name="printForm" action="chart_main.asp?chartname=npl&print=true" method="POST" target="NEW">
<input type="hidden" name="closeme" value="OK">
<input type="hidden" name="print" value="true">
</form>
We are using coolMenus - Version 3.02 – from www.bratta.com to generate dynamic menus. For the location value in this menu we are using 'javascript:submitForm()'. This calls this function.
function submitForm()
{
document.printForm.submit();
}
This worked great before the site started using SSL. Once we enabled SSL on the site we started getting a Page cannot be displayed error when you select the print version. If you place an Alert in the submitForm function, it will appear. So the code is calling the function but it is not submitting the form properly. When you get this error, you end up with an address like this.
https://dev.dc.keylogic.com/javascript:submitForm()
Of course, that address will fail.
Does anyone have an idea why this is not working since SSL has been enabled and how we may get around it?
-
Dec 7th, 2005, 07:47 PM
#2
Fanatic Member
Re: Submit Form stopped working after enabling SSL
Hi,
SSL encrypts the URL and the data within it from teh controls and code. If you hav code within the URL it is not encoded then decoded as normal, therefore is not recognised as any sort of command or code at all, as the header now includes the reference to the encryption socket, therefore looks for encrypted data and not anything else within the Uniform Locator such as code commands and such.
To get round this, sisply use the Onload function and use your javascript there.
example.
VB Code:
<body OnLoad="document.hello.print()">
This will operate the controls for you.
If you want to use multiple controls depending on the selection, then write a javascript code to read the URL and execute code depending on the outcome.
hope this helps
Kai
As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..
A few things that make a good Developer a Great One.
Methodical and a thorough approach to research and design inevitably leads to success.
Forward thinking is the key to Flow of control.
Never test in the design environment, always test in real time, you get the REAL results.
CBSE & OOSE are the same animal, they just require different techniques, and thinking.
SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
The key to good design is explicit attention to both detail and response.
Think Freely out of the "Box" you're in..... You will soar to better heights.
Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT
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
|