Jump to content

Search the Community

Showing results for tags 'redirect'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 14 results

  1. I've deployed 2 datapages inside one webpage (I am using WIX as my hosted CMS) - one search form and one results form. I've configured Caspio bridge to redirect the search form to a new page after form submission but this new page is the same page. Purpose is to have the search form and results displayed simultaneously. Problem: The search form redirects to the results page WITHIN the embedded frame instead of opening a new page tab. Would appreciate any help. Thank you.
  2. Hi, the below code is to disable and relabel the Update button in Bulk Edit when it is clicked (it's a datapage with a lot of records and takes several seconds to update so the user needs to know what's happening and not click the Update button more than once). This code is in the footer of the Results page and not the Bulk Edit form. I need to add the additional code (see below) that redirects to another webpage and I can't figure out where/how to insert it into the disable/relabel code. Does anyone know how to do this? Here's the disable/relabel code for the Update button in Bulk Edit: <script> document.addEventListener('DataPageReady', function (event) { const target = document.querySelector('body'); const observer = new MutationObserver(mutations => { const updateBtn = document.querySelector('input[value="Update"]'); if(updateBtn){ updateBtn.addEventListener('click',function(){ disable(this); redirectToDP(this); }); } }); const config = {subtree:true, childList:true}; observer.observe(target, config); function disable(btn){ btn.disabled = true; btn.style.background="grey"; btn.value = 'Please Wait'; btn.removeEventListener('click',disable); } }); </script> Here's the code in the Bulk Edit footer for redirecting (I think it needs to be there because I have to get parameters from the Bulk Edit data fields): <script> function redirectToDP() { var v_proposal = document.getElementById("BulkEditItems_Triggers_CopyProposalID").value; var v_project = document.getElementById("BulkEditItems_Triggers_CopyProjectID").value; var url = "../proposal?ProposalID=" + v_proposal + "&ProjectID=" + v_project + "&pti=p"; location.replace(url); } </script> I tried to call the function 'redirectToDP' from the disable/relabel code but it doesn't work. Does anyone know how to get the redirect code to work with the disable/relabel code? Many thanks!
  3. I have a Search and Report Page that contains a details link. After running the initial report i click on the details link taking me record details. Upon submitting the details form I would like to take the user back to the Search and Report Page using the previously selected filters. I would imagine that i would use the appSession URL param but it is not predefined param. How do i incorporate appSession or another technique to return uses to their previous query results.
  4. How do I redirect a user to a login page if the user is not logged in? There is already question similar to this one but it doesn't have a clear answer.
  5. Hello. I am trying to configure a login redirect based on user role per: https://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/ My Admin user role is indicated by a YesNo checkbox in the User table that the authentication is based on. Here is my javascript from the source code of the footer of a standalone Caspio HTML login page: <script> if("[@authfield:Admin]" == "Yes"){ window.location = "https://[myurl]/a_dashboard.html"; } else { window.location = "https://[myurl]/s_dashboard.html"; } </script> The Authentication I am using has the redirect "Advanced Option" set to "Same Page" for a successful login. If I enter a redirect here I can only enter one URL. When I try to log in with a User having the Admin role (YesNo checkbox checked), I do not get a redirect to the a_dashboard.html. The login.html web page just refreshes but no longer displays the embedded Caspio login form. Everything works if I remove my javascript redirect code and just let the Advanced Options of the authentication specify a particular page to go to, but this doesn't let me redirect by role...
  6. Hi, I have a tabular datapage that I'm using Bulk Edit to update selected records. When the 'Update' button is clicked I need to redirect to another url (using some parameters passed). I've tried a number of methods but can't seem to get it to work. - tried a custom 'update' button in an html block but it doesn't actually update the selected records (perhaps this is because and 'Update' on a Bulk Edit isn't the same as on a Details page?) - tried to modify, in Localization, the Bulk Edit text with html code for the redirect url but it just shows the html markup in the button. Not sure if there's a way to do this there but it seems like it'd be cleanest if so. Any help would be greatly appreciated-
  7. My site has public and private pages. The public pages contains long lists of items. When a user selects an item they are taken to a private details page for that item; however they must be logged in. Currently, if the user is not logged in then they are taken to the login page and upon login they are redirected to the index page. However, I would like the user to be redirected to the private details page that initiated the login. I.e. I don’t want the user to have to find the item again once they are logged … they should just be taken to that details page upon successful login. Description is a little confusing but hopefully someone understands! Thx
  8. I have the following code in the footer and it produces a button on the bottom of my results page that works to redirect the user to another url. <script type="text/javascript"> if(!document.getElementById("norecord")) { document.write('<button onclick=document.location.href="https://www.myirlog.com/logbook/new-record-entry">No, Really, I want to add a new record</button>'); } </script> However, when I put that same code inside of an HTML block, it does not work: <script type="text/javascript"> if('[@field:participant_1_name]' != '[@authfield:Name]' && '[@field:participant_2_name]' != '[@authfield:Name]' && '[@field:participant_3_name]' != '[@authfield:Name]' ) { if('[@field:participant_2_name]' == '' || '[@field:participant_3_name]' == '' ) { document.write('<button onclick=document.location.href="https://www.google.com">take me away</button>'); } } </script> The buttons appear in both locations, but only the footer button works, when the in-line button (the one coded in the HTML block) is clicked, the whole page just refreshes instead of going to google.
  9. I simply want to place a box next to a listed service trade, on my home page, where a site visitor will enter his zip code and be directed to all the say, Plumbers in a particular zip code that we have a page in our site for . I do NOT want a search box, I have that now and it is a 2 step process. I'm looking for one simple process. Is this what Caspio can do ? Are there any video tutorials or instruction for this ? Advice plzz. THANKS ALL !
  10. I'm curious if anyone here knows how to have a user redirected to a web page (URL/Datapage/Etc) if a datapage that requires a parameter notices that parameter has not been received for any reason. For example, our users upon login are directed to a page where they select from a dropwon project they are working on. The project that is selected passes a Project_ID parameter that is required in many other datapages in our system. This is so that the user does not have to repeatedly select the project on each datapage after. This parameter is currently stored in the browser cache and frequently over time is either corrupted or removed from the browser cache. Thus making any datapage that normally receives the *Required parameter Project_ID display some sort of error due to the lack of the parameter. I would like to choose a URL/datapage/etc that would be a redirect destination if this required parameter is not present. In my previous example this destination would be the webpage where the user selects the Project and can pass the Project_ID parameter again. Ideally it would function similarly to basic authentication redirections where it checks the datapage attempting to be accessed against some specified criteria and redirects they user if the criteria is not satisfied. If anyone has accomplished something similar to this I'd be eager to hear about it. Thanks in advance
  11. Hello Gurus! I am hoping to redirect users of my app to a login page when they get timed out. Does anybody have a workflow built for this? Currently, if a user times out they simply get logged out, but remain on the same page. So when they come back it looks like the attached image. This 1) looks unprofessional and 2) doesn't allow me to perform login routines that I can perform when logging in from the correct page. Any thoughts on this will be greatly appreciated. BeGreat CHAD
  12. Hello, I'm a newbie at Caspio and I'm have a frustrating expirience trying to figure out why my HTML script snippet in a HTML data page is not working, instead after a succesful login just renderd de code without making the redirection to the corresponding web page. I replicate exactly the example (tables, views, authentication, etc.) from the tutorial "Create User-Specific Redirect After Login" just to verify if I was doing something wrong within my application and the surprise was the same result. Login screen seem to be ok: and then: Please if someone can advise me what is going on I will really appriciated. My website is hosted in Squarespace using Chrome as browser. Thankyou in advanced Jaime Cuellar Monterrey, Mexico
  13. Dear all, I have seen the article related to this topic. But there is something I do not understand. I was ask to create one view per user type (I have three user type like in the example). Then to create on authentication per view. The last step is to create a Datapage to include the html code and to restrict the access with authentication. My question is which authentication to chose since I have created three? If I select one I will not be able to login with another profile than the one related to the authentication I chose. What did I miss?
  14. Hi - this appears to be a solution to many issues, so I need to figure out how to direct a form submission to a different datapage so that it updates one or more fields automatically. There are two main instances where i want to do this: I have a new user form which creates a user_ID autonumber and passes it as an external paramater, I have fields for First_name and Last_name (both passing as external parameters on exit) and want to then create a full name by sticking them together. The way I presumed to do this was to direct to a 'Name creation' datapage which is a single record update that received First_name and Last_name as external parameters (hidden fields) and has a third hidden field that sets a Default value of [@First_name] [@Last_name]. I then redirect back to the original page. Not working though - any idea what I'm doing wrong? I'm building a project management tool and need to compare timelines on form exit. So I need it to see if the projected finish date is different to the actual finish date and - if it is - adjust some other dates accordingly. I also need to update some other fields, like 'Current_step' or 'Current owner'. Any ideas at all would be most welcome! Cheers. Tim
  • Create New...