Fly Fishing Forum banner

random text

2K views 2 replies 2 participants last post by  isoh 
#1 ·
Sorry I've been absent for so long. New job is exciting with plenty to do. Juro had mentioned the need for a random quotation generator. Here'sa simple little JavaScript that can be used on any page:

http://adeluca.ne.mediaone.net/js_random.html

I've escaped the script tags to make it easy to copy and paste from the browser screen into any HTML file.

Anglers of a different sort....
 
#2 ·
Awesome! Does it take newlines as slash-n? I guess I'll find out, and that would be a standard javascript constant question. Also, does the function document.write load with the browser? Are there centering or font parameters?

Glad to see you had insomnia! Looking forward to your Florida trip I'll bet.
 
#3 ·
\<!--no-->n will generate a new line, but not an HTML line break - that's a JS constant. document.write("this
is
three lines") will load with the browser only if it is placed outside a function defintion:

<SCRIPT language="JavaScript">
function write_it() {
document.open()
document.write("This is three<BR> lines
in the<BR> browser \<!--no-->n \(two when viewing source\)")
document.close()
}
</SCRIPT>

This will not execute until the function write_it() is called. An example of how you would call it might be:

<A HREF="" onclick="write_it();return false">How many lines?</A>


Yes. I'm *psyched* for Florida. Just learned how to tie Tabory's snake fly. Show me the snook! Spinning deer hair can be a messy, messy endeavor....

Terry, I'm close to getting my scanner set up. Just have to install Win 98 since there are no USB drivers for NT :( I'm struggling with partition space. At this rate I'll be ready to show off my work just as tying season ends and sore arm season opens


al
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top