Jump to content
  • 0

Auto Submit


mark048

Question

13 answers to this question

Recommended Posts

  • 0

Hello jlwilliford, 

 

Created simple JavaScript that may satisfy your needs.

 

pre-requisites:

- In Styles the class "cbFormError" should be set (non empty). This could be check under: Styles >> Edit Style >> Click "Show Advanced options" on 1st wizard step >> Forms/Details (3rd wizard step) >> Errors and Messages >> "Source" tab

- Your Web Form do not results with ending message (step "Destination and Triggers" when editing DataPage; radio option selected other than "Display this message")

1) In the header of your WebForm paste modified script 

2) In the footer you paste the checking for errors on page: I did not test all the browsers, but think it should work as there are common JavaScript functions used.

 

Please tell if this helped.

Link to comment
Share on other sites

  • 0
Hi, in autosubmit formula, i have one big problem, i can not close de page, after autosubmit and his doing submit after submit until the user decides close your browser  

 

I make the folow code:  



<script> function f_submit() { document.getElementById("caspioform").submit(); } window.onload = f_submit; </script> 
<script language="javascript"> <!-- setTimeout("self.close();",700) --> </script>   


But dont work in all browsers  thnks

Link to comment
Share on other sites

  • 0
Done, after autosubmit, because is not close page in all broswer, i put this code.  

 


<script> function f_submit() { document.getElementById("caspioform").submit(); } window.onload = f_submit; </script>  
<script type="text/javascript">
<!-- function redirect(){    
window.location = "../test.html" } 
-->
</script>
<script language="javascript"> <!-- setTimeout("redirect();",700) --> </script>

 

Im redirect for another page, and his make just one submit...  Thanks

Link to comment
Share on other sites

  • 0

This code works for me in IE  

<script> function f_submit() { document.getElementById("caspioform").submit(); } window.onload = f_submit; </script>

but in Firefox it loops over and over. (I put it in the footer in the destination form).  

I tried the above suggestions, but I couldn't get them to work.  

I would be really grateful if you have any suggestions as to how I could solve this.  

 

Thank you  

Bjorn

Link to comment
Share on other sites

  • 0
I found a solution. 

 

I redirect to the form from another form through a querystring. 

 

In the querystring I defined a variable that I then used in an if statement as below: 



<script>
function f_submit()
{
document.getElementById("caspioform").submit();
}  
if('[@ItemID]' !='')
{
window.onload = f_submit;  
}
else
{
window.close();
}
</script>


 

The window doesn't actually close in Firefox either, but that's OK.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...