Hello....

I'm not sure if this is possible or not ...

On my page.. index page.. I've created a form button..
Ok.. Let say... depends on the system time (server) .. whenever
my client click more than specific time.. let's say (more than 0800 hours server time).. it will directly go to specific page..

I hope your guys get it ...

Thanks in advance..

Recommended Answers

All 2 Replies

ok, I just got this.. it can be done with something like this..

and Javascript is totally new for me..

<html>
<body>

<script type="text/javascript">
var d = new Date();
var time = d.getHours();

if (time < ) 
  {
  document.write("<b>Good morning</b>");
  }
</script>

<p>This example demonstrates the If statement.</p>
<p>If the time on your browser is less than 10, you will get a "Good morning" greeting.</p>

</body>
</html>

Instead of saying good morning ... I want this page will directly go to different page..

There are plenty of examples on line on how to do this, but the only concern I have is that you are depending on the fact that javascript is going to be enabled for the user's browser. this is not always the case. If you are using a server side scripting language such as php or asp.net, it will be easier to handle and you will guarantee that this will work 100% of the time. However, if you are writing your page in pure html, you will need to depend on javascript.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.