Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Submit

Status
Not open for further replies.

craig322

MIS
Apr 19, 2001
108
US
Is there a way to automatically perform a submit when you land on a page? I am automatically populating the fields on the page but now have to click on the submit button.

TIA

Craig
 
it may be more efficient to use:

<script language=javascript>
function submitForm(){
document.<formname>.submit;
}
</script>


<BODY onLoad='submitForm()'>

This will give the page a chance to populate the fields with data rather than submitting the form as soon as it hits the script.

-Ovatvvon :-Q
 
I am using this but it is not working...
here is my code
Code:
<html>
<head>
<script language=javascript>
  function submitForm(){
    document.theform.submit;
  }
</script>
</head>
<BODY onLoad=&quot;submitForm()&quot;>
<cfif #POC# is &quot;NewPOC&quot;>
<cfoutput>
<cfform method=&quot;post&quot; action=&quot;newPOC.cfm&quot; name=&quot;theform&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;ProjectID&quot; value=&quot;#ProjectID#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;TaskName&quot; value=&quot;#TaskName#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;TaskType&quot; value=&quot;#TaskType#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;txtDescription&quot; value=&quot;#txtDescription#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;Resourcename&quot; value=&quot;#Resourcename#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;Assignedby&quot; value=&quot;#Assignedby#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;dteStart&quot; value=&quot;#dteStart#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;deadline&quot; value=&quot;#deadline#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;DenixMenu&quot; value=&quot;#DenixMenu#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;POC&quot; value=&quot;#POC#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;QABy&quot; value=&quot;#QABy#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;urlDenixLoc&quot; value=&quot;#urlDenixLoc#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;urlDatamgrLoc&quot; value=&quot;#urlDatamgrLoc#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;txtNotes&quot; value=&quot;#txtNotes#&quot;>
</cfform>
</cfoutput>
<cfelse>
<cfoutput>  
<cfform method=&quot;post&quot; action=&quot;taskassigned.cfm&quot; name=&quot;theform&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;ProjectID&quot; value=&quot;#ProjectID#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;TaskName&quot; value=&quot;#TaskName#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;TaskType&quot; value=&quot;#TaskType#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;txtDescription&quot; value=&quot;#txtDescription#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;Resourcename&quot; value=&quot;#Resourcename#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;Assignedby&quot; value=&quot;#Assignedby#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;dteStart&quot; value=&quot;#dteStart#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;deadline&quot; value=&quot;#deadline#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;DenixMenu&quot; value=&quot;#DenixMenu#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;POC&quot; value=&quot;#POC#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;QABy&quot; value=&quot;#QABy#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;urlDenixLoc&quot; value=&quot;#urlDenixLoc#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;urlDatamgrLoc&quot; value=&quot;#urlDatamgrLoc#&quot;>
<INPUT type=&quot;hidden&quot; name=&quot;txtNotes&quot; value=&quot;#txtNotes#&quot;>
</cfform>
</cfoutput>
</cfif>
</body>
</html>

it is obviously in cold fusion, is that a problem or what?
 
there needs to be () in the submit
<script language=javascript>
function submitForm(){
document.theform.submit();
}
</script> Sometimes starting over can fix a problem at the end

admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top