CharlesFoxtrot Posted February 20, 2014 Report Share Posted February 20, 2014 Hello, I'm trying to follow the example at: http://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/Here's what my code looks like: <script> alert("[@authfield:Admin]" ); alert("[@authfield:username]" ); alert("[@authfield:pass]" ); alert("[@authfield:email]" ); alert("hello"); if("[@authfield:Admin]" == "Yes"){ window.location = "http://www.mydomain.org/admin.html"; } else{ window.location = "http://www.mydomain.org/regular.html"; } </script> I've been tweaking this code a bunch, to get it to work right. What's strange is that sometimes it works as expected. I sign in as an admin user, I see the alerts and I go to the admin page. Sometimes, I sign in as an admin user, I do not see any alerts and I go to the regular page, which is the behavior I would expect if it were using a version of my html page from earlier today. Sometimes, if I sign in as a regular user, I see the alerts and get taken to the regular page, sometimes I see no alerts and get taken to the regular page, which is what I would expect if I were using an older version of the page. What the behavior looks like to me is that caspio has some kind of server farm and some of them are serving older versions of the page. I can't see how else I'd be getting alerts sometimes and not other. Does anyone have another explanation? I've tried clearing my IE cache and disabling it. I've tried Chrome. It does the same thing either way. I'm not seeing the html from my page in a fiddler trace, so it's hard to tell what's going on. -Charlie Quote Link to comment Share on other sites More sharing options...
MayMusic Posted February 24, 2014 Report Share Posted February 24, 2014 Can you provide the link to the page? What is the admin field type? Is it a Yes/No field? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.