User Tools

Site Tools


redirecting_users

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
redirecting_users [2019/09/17 23:36] lucyredirecting_users [2020/06/19 11:37] – [Add a redirect script when a form gets submitted or when a link/button gets clicked] lucy
Line 19: Line 19:
 ===== Add a redirect script when a form gets submitted or when a link/button gets clicked ===== ===== Add a redirect script when a form gets submitted or when a link/button gets clicked =====
  
-**Variation A**: no data gets send to LUCY): Just add an onclick event to the button or link within the source of the code and the user will get redirected to the site defined in %redirect%. Please note: since you are redirecting the user to another site LUCY won't be able to Trigger successful form submits anymore and no data input from LUCY will be recorded.+**Variation A**: no data gets send to LUCY): Just add an onclick event to the button or link, or onsubmit event to a form within the source of the code and the user will get redirected to the site defined in %redirect%. Please note: since you are redirecting the user to another site LUCY won't be able to Trigger successful form submits anymore and no data input from LUCY will be recorded.
  
  
 +    Example form: <form action="" method="post" onsubmit="location.href = '%redirect%';">
 +    
     Example Button:<button onclick="location.href = '%redirect%';" id="myButton"      Example Button:<button onclick="location.href = '%redirect%';" id="myButton" 
     class="float-left submit-button" >Submit</button>     class="float-left submit-button" >Submit</button>
redirecting_users.txt · Last modified: 2021/09/07 23:00 by lucy