Javis Posted February 4, 2008 Share Posted February 4, 2008 Umm what would i need to do (if i even can) to make it so on my site (im using free hostia as a host) i have a certain page come up before another. An example of this would be before i have my forums come up i would like for it to display my tos page. If you have any questions about what im asking just ask because im sure it isnt very clear lol. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/ Share on other sites More sharing options...
phpQuestioner Posted February 4, 2008 Share Posted February 4, 2008 Just send them to your tos page; when the click on your forum link or button or however they are accessing you forum. Then add this little snippet of code to your tos page. <h3>Do You Agress To These Terms?</h3> <br/><br/> <input type="button" onclick="document.location.href='http://www.yourdomain.com/forumpagename.php'; return true" value="Yes"> <input type="button" onclick="alert('You Must Except Our TOS Agreement To Use Our Forum')" value="No"> Obviously this is a very simple way to do this, but if you want to make it mandatory that they click "yes"; I suggest you do this differently and use server side scripting to validate their answer. But if you just want to give the a quick "heads up"; this will work just fine. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-457353 Share on other sites More sharing options...
TheFilmGod Posted February 4, 2008 Share Posted February 4, 2008 If I clicked "join" and then something just automatically popped out without loading, this would piss me off. You are better using php to go through the information and come out with an error without using a javascript. Javascript is a great language, but for this instance, it clogs up the source code and is rather annoying. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-457791 Share on other sites More sharing options...
Javis Posted February 4, 2008 Author Share Posted February 4, 2008 my tos is in php i was just wondering how to do this and it seemed more like an html thing to me. Its not a pop up any ways. What it is would be like say my site was phpfreaks.com. When you type that url into the address bar it would bring you to my tos page ensted of my actuall site Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-458096 Share on other sites More sharing options...
GameYin Posted February 5, 2008 Share Posted February 5, 2008 You want to avoid using JavaScript to validate to see whether something has been done on the page. If people have JavaScript turned off, then the form or whatever will be sent and it will screw up big time. For my website, out of my 2000 some visitors a day, about 130 or so have JavaScript turned off. That's a surprisingly big number. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-458735 Share on other sites More sharing options...
Javis Posted February 6, 2008 Author Share Posted February 6, 2008 Just send them to your tos page; when the click on your forum link or button or however they are accessing you forum. Then add this little snippet of code to your tos page. <h3>Do You Agress To These Terms?</h3> <br/><br/> <input type="button" onclick="document.location.href='http://www.yourdomain.com/forumpagename.php'; return true" value="Yes"> <input type="button" onclick="alert('You Must Except Our TOS Agreement To Use Our Forum')" value="No"> Obviously this is a very simple way to do this, but if you want to make it mandatory that they click "yes"; I suggest you do this differently and use server side scripting to validate their answer. But if you just want to give the a quick "heads up"; this will work just fine. Not what im asking lol I have already set up the tos so it redirects to my site.. what im looking for is a way to make it when the type in my site like lets say mysite.freehostia.com for it to bring me to my tos and not my web site. also note that my tos is not a pop up. It is a seperate page. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-459927 Share on other sites More sharing options...
phpQuestioner Posted February 7, 2008 Share Posted February 7, 2008 Then you need to set-up your tos webpage to be you index page of your domain. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-460343 Share on other sites More sharing options...
Javis Posted February 7, 2008 Author Share Posted February 7, 2008 ya that was what i was thinking.. what would i need to do? like what code would i put in there Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-460369 Share on other sites More sharing options...
phpQuestioner Posted February 7, 2008 Share Posted February 7, 2008 No specific code needed; just save your tos web page as "index.(whatever file extension your using - examples: htm,html,shtml,php,asp,aspx,jsp,pl or whatever - you get the point). Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-460385 Share on other sites More sharing options...
Javis Posted February 7, 2008 Author Share Posted February 7, 2008 ahh i see i was thinking i needed to add it to my server index. Quote Link to comment https://forums.phpfreaks.com/topic/89302-question/#findComment-461017 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.