Hello,
I am somewhat new to JavaScript, 2 weeks ago I started.
I have learnt the basics such as

alert('example')

and

confirm('example')

also,

prompt('example','')

But, in the end, playing around with

<HEAD>
<SCRIPT TYPE="TEXT/JAVASCRIPT">
alert('HELLO')
</SCRIPT>
</HEAD>

Gets boring, along with the others, even asking you to type your name, then it says on the page with document.write stuff such as "Hello (yourname)
So, I've decided to go a bit further with my code, and wanted to create a more advanced code script, which, actually is a JavaScript file that will activate when the user has been on the page for XXX number seconds.
The file is a .js extention file, that will be activated. And also I would like to make another .js file, and in that file, I would like a redirect script, because they will be just veiwing the page, then I would like a message saying text such as "Your Veiwing time has Expired, would you like to register? <-- YES/NO CHECKBOX WITH SUBMIT BUTTON -->"
Then it will redirect to a register screen if they selected "YES", which is the bit were the file opens up. And if they selected "NO" A message saying along the lines of "Thank-you for your time." Then after 10 seconds it will direct back to the home of the site.

Thank-you so much for helping- Matthew N.

Do you want someone to code that for you? or are you stuck somewhere trying to put your plans into action?

Im stuck with the redirect bit, also, I cant get a script to display for a set amount of time.

Which one are you talking about, redirect or set display time? To redirect, you may use window.location="<your_url_goes_here>"... If you want to sleep/wait before you invoke another function, you can use setTimeout("functionName(arg1, arg2, ...)", timeInMilliseconds) to do the delay where functionName(arg1, ...) is the function to be called after timeInMilliseconds has passed.

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.