LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2003, 04:44 PM   #1
sub_slack
Member
 
Registered: Jul 2003
Distribution: slackware
Posts: 56

Rep: Reputation: 15
html question


i want to make a simple web page that generates new textcolor and background color every time someone visits it . the content of the page should stay the same . how would i do that?
 
Old 07-28-2003, 04:46 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
It depends on your favoured tools and the clients you expect to connect. To make sure it will work for all clients then use something on the server like perl and SSI. If you want to do it on the client then use javascript.
 
Old 07-28-2003, 10:16 PM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
if you want the colors to be the same sequence for each user:


blue, red , green for 1, 2 and 3, the same for each new user:

then you will need to do something maybe with cookies or persistent sessions so that you can keep track of user visits.

like david said, you'd need to look into some type of scripting. you're gonna need more than just some html.
 
Old 07-28-2003, 10:34 PM   #4
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
First decide wether you want to use client side (javascript, etc) or server side(perl, etc).

If you have little to none experience with websites and/or scripting, then i would recommend going the javascript route first. Just look into how it works. You'd need to know about how to generate random numbers (to either create the colors or pick a preset color from a list), how to change attributes of an html page through javascript and ofcourse how colors work in general.

Either way you go it's not to difficult. Visit w3schools they have a lot of information on html, javascript, etc.
 
Old 07-29-2003, 03:38 AM   #5
sub_slack
Member
 
Registered: Jul 2003
Distribution: slackware
Posts: 56

Original Poster
Rep: Reputation: 15
i got the idea from some site and in the source there was no javascript so i guess it was something on the server . thanks for the replies, now i think i know how it works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML question. JohnStormrider Programming 5 09-20-2005 10:03 PM
HTML question Lleb_KCir General 4 04-20-2004 06:16 PM
AN HTML Question Tap-Out Programming 5 07-20-2003 10:27 AM
Another HTML question Tap-Out Programming 3 12-10-2002 07:28 PM
An HTML question Tap-Out Programming 5 11-26-2002 07:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration