homepage Welcome to WebmasterWorld Guest from 107.20.25.215
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Can javascript form.submit() use https?
Why does browser say "insecure" on form.submit()?
ordovico




msg:3704706
 6:13 pm on Jul 22, 2008 (gmt 0)

Why does Firefox generate a warning dialog when a SUBMIT button uses the form.submit() javascript function? The warning says, "Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party." The page containing the button and the call to submit() was loaded through https. Can this page be made secure, or is the warning spurious?

 

rocknbil




msg:3704819
 8:30 pm on Jul 22, 2008 (gmt 0)

Welcome aboard ordovico!

You have to have something else wrong, you got me curious . . . so I did exactly what you said, and get no such error. Are you using full URL's? Relative?

Tested both post and get, neither are causing a security alert. Try installing HTTP Live Headers in FF, might tell you what's up. (?) The error will be in where it's posting to.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled</title>
<script type="text/javascript">
function submitForm (form) {
alert('jussa test');
form.submit();
return false;
}
</script>
</head>
<body>
<form method="post" action="/note_relative/path_to_script.cgi"
id="form2" onSubmit="return submitForm(this);">
<p><label for="text2">Text 2</label>
<input type="text" name="text2" id="text2"></p>
<p><input type="submit" value="Submit Form"></p>
</form>
</body>
</html>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved