Microsoft KB Archive/163623

= FIX: Form.Submit Method Doesn't Use Form.Action Property =

Article ID: 163623

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Internet Explorer 3.0
 * Microsoft ActiveX SDK

-



This article was previously published under Q163623



SYMPTOMS
When you create a form in an HTML page, using scripting to set the form.action property and calling form.submit has no effect, for example:   Action element in a Form 

   

 Sub Button1_OnClick form1.action ="http://www.microsoft.com" ' this will not work form1.submit End Sub  



RESOLUTION
Call the window.navigate method or set the window.location.href property. However, this sets the method to "GET" as opposed to "POST." You'll have to pass the contents of the form yourself:   Action element in a Form</TITLE> </HEAD>

<FORM NAME="Form1"> <INPUT TYPE="BUTTON" NAME="Button1"> </FORM>

 Sub Button1_OnClick window.navigate "http://www.microsoft.com?Text1=" & form1.text1.value ' or you can also do: ' window.location.href = "http://www.microsoft.com?Text1=" & ' form1.text1.value End Sub </SCRIPT> </HTML>

<div class="status_section">

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Internet Explorer 4.0.

Keywords: kbbug kbfix KB163623

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.