Discussion Forums  >  WebViews and HTML for Mobile

Replies: 3    Views: 176

Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
09/14/12 02:03 PM (13 years ago)

html redirect based on time question?

I have created a jotfform product order test form and hacked up the html to move collapsing fields within the purchase order. It works great via android native browser and also on pc but for some reason its glitchy when viewed via custom url/html screen and I can't figure out why although I have started an html course as recommend by @GoNorthWest . so until I get that finished I won't be able to debug it correctly. In the meantime I can launch it via native app. My question is. can I insert a script or something to the top of the html form in order to redirect it to another url between 2300hrs and 1600hrs? I need the script or html only to redirect at these times else continue with current page the code is inserted on. I do not wish it to redirect to 2 different urls as I do not wish anyone to be able to access the form by clicking through their history in browser so it must only redirect away to 1 url otherwise display the form html under the redirect. hope this makes some sense thanks
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/14/12 04:04 PM (13 years ago)
Hi Stuck. I've used this code for years: <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"> from: http://www.instant-web-site-tools.com/html-redirect.html Maybe that might help? Cheers, David buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
09/14/12 10:25 PM (13 years ago)
@MrDavid thanks. I have used that code before and yes it would work however it would require manual insertion/removal so I was looking for something to redirect automatically. there are scripts on net that do this by checking time and redirecting eg. if its "this.time" then direct to this url, else redirect to "this" url. don't know if that makes sense however the first part, the "if" its xxxx then redirect to a different url is fine, its just the second part, the "else" statement I do not want to redirect. I want the "else" to continue with the current page html that the redirect is at the top of. sorry if its a bit mumbo jumbo but I can't think how else to explain it thanks
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
09/15/12 06:22 AM (13 years ago)
on further thinking can someone give me an idea of how to add an if statement that checks a url for something"open" or "closed" and if it = closed then it redirects to a different url? do not want an else statement as if its open then it just carries on with next line of html. any help will be great thanks
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.