Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-18-2003, 02:29 PM   #11
Baseband Member
 
OFAH FAN's Avatar
 
Join Date: Sep 2003
Posts: 87
Default Re: 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?>
__________________

OFAH FAN is offline   Reply With Quote
Old 09-18-2003, 02:44 PM   #12
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default

<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.
__________________

__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 09-18-2003, 02:59 PM   #13
Baseband Member
 
OFAH FAN's Avatar
 
Join Date: Sep 2003
Posts: 87
Default Re: More Help- LOL

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??
OFAH FAN is offline   Reply With Quote
Old 09-18-2003, 03:06 PM   #14
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: More Help- LOL

<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.
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 11-14-2003, 10:19 PM   #15
Baseband Member
 
Join Date: Sep 2003
Posts: 67
Default

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,
Reiken is offline   Reply With Quote
Old 11-15-2003, 03:57 AM   #16
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: More Help- LOL

JavaScript is good but I wouldn't recommend it anymore. I'll be talking about it tomorrow in the newsletter.
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 11-17-2003, 02:48 AM   #17
Baseband Member
 
Join Date: Sep 2003
Posts: 67
Default

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
Reiken is offline   Reply With Quote
Old 11-17-2003, 11:21 AM   #18
Site Team
 
David Lindon's Avatar
 
Join Date: Dec 2002
Posts: 15,233
Default Re: More Help- LOL

HTML and JavaScript are really the only client site languages.
__________________
[url=http://www.LNXPS.NET]LNXPS.NET - The XPS Library]
David Lindon is offline   Reply With Quote
Old 11-18-2003, 04:33 PM   #19
In Runtime
 
XtremeWarrior's Avatar
 
Join Date: Sep 2003
Posts: 102
Send a message via ICQ to XtremeWarrior
Default Re: More Help- LOL

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.
XtremeWarrior is offline   Reply With Quote
Old 03-03-2004, 08:59 PM   #20
In Runtime
 
Join Date: Mar 2004
Posts: 191
Default Re: More Help- LOL

Woudln't recomend it? Its great!
__________________

At0m1x is offline   Reply With Quote
Reply

« jsp | bcsave gone? »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0