More Help- LOL

o sorry i dint relise i posted it the first time :( sorry, if i repated any of the quotes never mind. but dont repeat them on the thing?>
 
<form name="random"><input type="text" name="random" size=78 value=""></form>
<script LANGUAGE="JavaScript">
<!--
// Copyright 1996 - Tomer and Yehuda Shiran
// This example will appear in our forthcoming book on JavaScript.
// Feel free to "steal" this code provided that you leave this notice as is.
// Additional examples from the book can be found at //http://www.geocities.com/SiliconValley/9000/
// For more information contact Tomer or Yehuda Shiran <yshiran@iil.intel.com>

function getMessage() {
// create array of murphy laws
var ar = new Array(20)
ar[0] = "I've heard your line of patter my son. If they don't know Adam Ant's birthday or the Chelsea result it's goodnight Vienna, innit?"
ar[1] = "Tough? Tough? It's the toughest chicken I've ever known. It's asked me for a fight in the car park twice!"
ar[2] = "There's got to be a way! He who dares wins! There's a million quid worth of gold out there - our gold. We can't just say 'bonjour' to it."
ar[3] = "Yeah, but I'd like to meet the git who told him he could sing!"
ar[4] = "Yeah, that'll do fine if you're out of Brandy. "
ar[5] = "If anything simply cannot go wrong, it will anyway."
ar[6] = "Del knows what he's talking about. And I don't see what the Beatle's manager has got to do with it anyway. "
ar[7] = "How the hell can it be the same bloody broom then?"
ar[8] = "And then they turn up! And within fifteen seconds some sod's shooting' at us!"
ar[9] = "I don't know about St. Claire a la Chappell, they should rename this place Trottersville!"
ar[10] = "Chuck him on the back seat? He's the driver! "
var now = new Date()
var sec = now.getSeconds()
document.random.random.value="Murphy's Law: " + ar[sec % 20]
}
getMessage()
//-->
</SCRIPT>

OK, I found this script and think it is what you are looking for.
 
Dude, the quotes come up but not the quotes i want, its like halfe of one quote and helfe of the other and also it keeps saying: Murphys law b4 every quote??
 
<form name="random"><input type="text" name="random" size=78 value=""></form>
<script LANGUAGE="JavaScript">
<!--
// Copyright 1996 - Tomer and Yehuda Shiran
// This example will appear in our forthcoming book on JavaScript.
// Feel free to "steal" this code provided that you leave this notice as is.
// Additional examples from the book can be found at //http://www.geocities.com/SiliconValley/9000/
// For more information contact Tomer or Yehuda Shiran <yshiran@iil.intel.com>

function getMessage() {
// create array of murphy laws
var ar = new Array(20)
ar[0] = "I've heard your line of patter my son. If they don't know Adam Ant's birthday or the Chelsea result it's goodnight Vienna, innit?"
ar[1] = "Tough? Tough? It's the toughest chicken I've ever known. It's asked me for a fight in the car park twice!"
ar[2] = "There's got to be a way! He who dares wins! There's a million quid worth of gold out there - our gold. We can't just say 'bonjour' to it."
ar[3] = "Yeah, but I'd like to meet the git who told him he could sing!"
ar[4] = "Yeah, that'll do fine if you're out of Brandy. "
ar[5] = "If anything simply cannot go wrong, it will anyway."
ar[6] = "Del knows what he's talking about. And I don't see what the Beatle's manager has got to do with it anyway. "
ar[7] = "How the hell can it be the same bloody broom then?"
ar[8] = "And then they turn up! And within fifteen seconds some sod's shooting' at us!"
ar[9] = "I don't know about St. Claire a la Chappell, they should rename this place Trottersville!"
ar[10] = "Chuck him on the back seat? He's the driver! "
var now = new Date()
var sec = now.getSeconds()
document.random.random.value=" " + ar[sec % 20]
}
getMessage()
//-->
</SCRIPT>

Try it now.
 
good code David, I wish I could do client-side, got any suggestions for scriptlanguages to learn? Jscript, Java script, VBscript? I am V. interested.

I don't know if you would like this due to it's complex nature, but another option is to use a server-side script, now of course you are then going to require a script server, but if your host already supports it, then take full advantage of it!!

if you are looking to rig your entire site with serverside-scripts, then if you could do everything serverside; it would firstly simplfy the entire process (because you wouldn't have to make client and serverside comparisons) and it makes integration all that bit much more fun (NOT), but if you do it right, you end up with an fully active web.

that's getting into all the tech specs, but you also have to keep in mind the target audience concerns, because if your pals on the other end of the line can't do Javascript (in what-ever universe I know), regardless of the fact that you wouldn't want people that couldn't do client side on your site, then they are going to have one V. messed up page. so compatability is another issue, if your host can do the processing for them, it's doesn't matter what they are running, client-side or not, they'll still get the message.

Client-Side is great for interactivity, but unless your server has some sort of processing inaptitude, I would recommend server-side.

Anyway, that's the opinion of a very biased server programmer, that has had very minimal client-side exposure.

RC

P.S. thanks for the link to the members list David,
 
JavaScript is good but I wouldn't recommend it anymore. I'll be talking about it tomorrow in the newsletter.
 
Well I would be very interested to get into client side programming, and I've got some spare time coming up so I'll be able to have a look over some languages, what would you suggest?

RC
 
well it seems like OFAH FAN uses Lycos so I don't think he's got much choice but to use client-side scripts.
But I would always recommend server-side scripts if it's possible.
 
Back
Top Bottom