473,382 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

forces users to different pages?

Hello

Say I have a welcome page and 2 other pages, a.htm and b.htm.

How can use Javascript to guide visitors, alternately to a and to b?

Cheers

Geoff
Mar 21 '08 #1
2 1028
Geoff Cox wrote on 21 mrt 2008 in comp.lang.javascript:
Say I have a welcome page and 2 other pages, a.htm and b.htm.

How can use Javascript to guide visitors, alternately to a and to b?
alternating by visitor by using serverside Javascript.

=========

An ad random guiding can be done with clientside javascript:

<a href = 'noJS.html'
onclick = 'location.href = (Math.random()<.5)?"a.html":"b.html"'
>nextpage</a>
not tested

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 21 '08 #2
On 21 Mar 2008 09:11:31 GMT, "Evertjan."
<ex**************@interxnl.netwrote:
>Geoff Cox wrote on 21 mrt 2008 in comp.lang.javascript:
>Say I have a welcome page and 2 other pages, a.htm and b.htm.

How can use Javascript to guide visitors, alternately to a and to b?

alternating by visitor by using serverside Javascript.

=========

An ad random guiding can be done with clientside javascript:

<a href = 'noJS.html'
onclick = 'location.href = (Math.random()<.5)?"a.html":"b.html"'
>>nextpage</a>

not tested
thanks Evertjan

Cheers

Geoff
Mar 21 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Jonas Smithson | last post by:
I'm going to say something now that may seem to completely contradict a previous post of mine, in which I basically said that taking a "who cares" attitude about certain browsers (because of their...
24
by: Jim Hubbard | last post by:
Anybody know?
102
by: me | last post by:
How do I prevent the save/print/email/mypictures toolbar from popping up when IE users place their cursor over photos at my website? Thank you in advance for your help. Signed, me
7
by: jsale | last post by:
I have made an ASP.NET web application that connects to SQL Server, reading and writing data using classes. I was recommended to use session objects to store the data per user, because each user...
3
by: William Sullivan | last post by:
Have a frameset HTML page (parent) with child .aspx pages. When each of the child pages loads, it checks to see if the user is authenticated, and if not, redirects to the login page: ...
1
by: Arun | last post by:
I have a folder “Secured” under the root folder of the project In the project root web.config authentication is given as <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="15"...
9
by: antonyliu2002 | last post by:
I am not sure how to google this concept. Basically, what I wanna do is to direct different users to different pages. I do not have a whole lot users. For example, if user name 'tomcat'...
9
by: Jonathan Wood | last post by:
I've spent days trying to come up with a solution. I'd appreciate it if anyone can help. My site requires all users to log on. There are three different roles of users, and each user type will...
0
by: raylopez99 | last post by:
10 years ago, the below was written (see very end, after my signature RL). What, if anything, has changed? I have Access 2003 and soon Access 2007 on a Windows XP Professional or Windows...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.