PRB: Problem Setting document.actionLast reviewed: May 29, 1997Article ID: Q164497 |
The information in this article applies to:
SYMPTOMSWhen performing client-side processing using JScript or VBScript, it might be desirable to select a document.action based on information provided by the user. Setting the action property of the document using either VBScript or JScript does not result in the new value being called when the form is submitted. Instead the original value is still used.
RESOLUTIONAll form processing must done within the same Action target.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce BehaviorThe following page exhibits this behavior. The page contains a form with an Action. When the "Change" button is pressed, a JScript is run that attempts to alter the Action of the form. When the form is submitted it accesses the URL http://example.microsoft.com instead of the URL that the action was changed to.
<HTML> <HEAD> <TITLE>Submit() Example</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function change( ) { document.test.action="http://www.microsoft.com"; alert("Form.action was changed to " + document.test.action); document.test.submit(); } // --> </SCRIPT> </HEAD> <BODY> <FORM NAME="test" METHOD=POST ACTION="http://example.microsoft.com" onSubmit="alert(test.action); > The Form.Action is set to "http://example.microsoft.com". Click submit to call example.microsoft.com or click change to change to Action property to microsoft.com. <BR><BR> <INPUT TYPE="Button" VALUE="Change" onClick="change();"> <INPUT TYPE="Submit"> </FORM> </BODY> </HTML> |
Keywords : kbprg vbObjMdlIE kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |