Read my Dreambook guestbook!
Dreambook
Sign
my Dreambook


50% Silly .. 50% Real Mini ...... Eat Dirt Hatchback!


spiders!


* Best viewed with any browser:

Click here to get emailed if this page changes ever!!! | click here to bookmark THIS PAGE - (AOL USERS click AOL Heart) | AND... ..here if you see any bad links or images like this
To get in contact generally: . Click Here!!!

down to end and the site search box

INFO: THE HTML ABOVE HERE IS ADDED TO EVERY PAGE ON THIS SITE BEFORE DELIVERY BY USING SSI COMMANDS



 You will find a lot of simple little Javascript Thingies running on the FBRpages and they all seem to work ok, the buttons/menus on this page should too!

You will also find a few add ons to augment FORM scripts with interesting things like where the from sender came from ( good for pracing links and verifying legitimacy), and get around the PayPal 2(two) field (os0,os1) limits (allows combination of more than 2 values together to populate the options windows on PayPal shopping carts

YOU ARE BEST TO COPY THE HTML SOURCE ( do VIEW then SOURCE then SAVE AS TEXT FILE in your browser) FROM THE PAGES THEMSELVES AS THE TEXT HERE HAS BEEN CHOPPED UP TO FIT ACROSS THE SCREEN and might not work OK if just cut 'n' pasted back into yours!

Go HERE for the EXCELLENT source of some of these scripts!

....You might also try following this link to Java Resources on Google: beware, some sites are not for beginners

TOP TIP: make sure no button names or function names occur more than once on each page, your gee-whizz Java might not work!

WHERE TO START?: (i) Copy and paste a script (NOT the cookies one) into one of your pages in the SAME LOCATIONS (ie in the HEAD or BODY areas), if it doesn't work check all the lines in the source code that were intact are STILL intact in your code... if you can't work out what is wrong........join a newbie friendly Javascript discussion group like this one:

Subscribe to java-script-world
Powered by groups.yahoo.com

SLOW!!!
WEAK JAVA!

FatblokeRacing Welcomes:
(none)
A.k.a:
54.144.29.233
(The IP details shown on the sign is produced using SSI system variable values)
 
* Best viewed with any browser:
 

#1 Hide your email address whilst still displaying a click link (added 31 Aug 2003)

from: http://www.blazonry.com/javascript/js_hiding.php

Here's the code for the function (put BETWEEN the body tags):

<script language="JavaScript">
<!--

var lhs = "antispamjavafailed";
var rhs = "fbr.nildram.co.uk";

function print_mail_to_link()
{
document.write("<A HREF=\"mailto");
document.write(":" + lhs + "@");
document.write(rhs + "\">" + lhs + "@" + rhs + "<\/a>");
}

//-->
</script>

Here's the code to call the function:

<!--

var lhs = "antispamjavafailed";
var rhs = "fbr.nildram.co.uk";

function print_mail_to_link()
{
document.write("<A HREF=\"mailto");
document.write(":" + lhs + "@");
document.write(rhs + "\">" + lhs + "@" + rhs + "<\/a>");
}

//-->

This code goes where you want your mailto:address to appear on the page.

look works pretty well.. [any posts to this address will be reported as ABUSE to your ISP by the way]

.....it has to execute to be useful!!!!!

A variation on this: hidden links using javascript!! Hide links from search engines???

Put this in the body where you want the link that cannot be seen without the page being rendered!!!

Try this somewhat messy banged together JS: (edit values for linkurl &linktext and edit "_blank" to your desired frame reference......

<script language="JavaScript">
<!--

var linkurl = "//www.linkurl.com";
var linktext = "linktext";

function print_munged_link()
{
document.write("<A HREF=\"http");
document.write(":" + linkurl );
document.write("\" Target=\"_blank\">" + linktext + "<\/a>");

}

//-->
</script>

..... is thus generated with

<script language="JavaScript" type="text/javascript">
print_munged_link()
</script>

#2 A click to bookmark a precise URL for visitors to your site using the actual text in the <title> tag! (added 23 June 2002)

click here to bookmark THIS PAGE : the Java behind this looks like this:

<a href="javascript:window.external.AddFavorite(location.href,document.title)" target="_top" onClick="console=false">click
here to bookmark THIS PAGE</a>

put it anywhere!

#3 (i) Navigate your visitors using the memory of the browser for where it was last (ii) Open full window page LIKE POWERPOINT, and close a window!!!! (added 23 June 2002)

looks like this, it only "knows" where the current window has visited so try it on your site ater adding it to a few pages:


<input type="button" value=" <-- Back a Page" onClick="history.go(-1)" name="button5">
<input type="button" value="Forward a Page-->" onClick="history.go(1)" name="button22">
<span class="minute"><span class="minute"><span class="minute">


OVERKILL CORNER!!!:

ALWAYS HAVE ONE of the "CLOSE WINDOW" buttons ON THE FULL SCREEN WINDOW YOU OPEN

AS it is FULL SCREEN without browser navigation!!!!

looks like this:


<script>
<!--
function fullwin(){
window.open("yourURLhere","bfs","fullscreen,scrollbars")
}
//-->
</script>
<input type="button" onClick="fullwin()" value="Open Site in Full Screen" name="button3">
<input type="button" value="Close the Window" onClick="window.close('fs')" name="button4">
</h3>

#4 Open a sized window on click of a button (added 23 June 2002)

Put this in the head <head> </head> section:


<SCRIPT LANGUAGE="JavaScript">
function myscript()
<!-- From Fatblokeracing.org -->
{
var page ="mypage.htm";var windowprops = "width=425,height=400,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no";window.open(page, "",windowprops);
}

</script>


Put this in the body <body> </body>of the text:



<input type=button value="mybutton" onClick="myscript()" name="button4">


to produce one of these!

When you set up the window sizes place a page in there with everthing you need to a nice table forced to have a width of about 25 pixels less than the width=, also unless your table is short have scrollbars set to yes, DON'T set height bigger than say 600 unless you tune the size by trying the page out

#5 Open a window after so many seconds: Check out: http://www.fatblokeracing.org/main3.shtml again... wait for a while ;) (added 23 June 2002)

Put this in the head <head> </head> section NOT MY SCRIPT SO DON'T TAKE OUT THE CREDITS:


<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore, Editor -->
<!-- Web Site: The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
closetime = 0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds

function Start(URL, WIDTH, HEIGHT) {
windowprops = "location=no,toolbar=no,menubar=no,scrollbars=yes,
resizable=no,left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}

function doPopup2() {
url="http://www.fatblokeracing.org/resist.htm";
width = 425; // width of window in pixels
height = 600; // height of window in pixels
delay = 20; // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}
// End -->
</script>


ADD this to the body tag:

OnLoad="doPopup();"

like so:


<body OnLoad="doPopup();" bgcolor="#FFFFFF">

#6 Load a page on the click of a menu choice without a "GO" button... See below ;) (added 23 June 2002)

Here are some PAGES we prepared earlier!....

Looks a bit like like this: each line is a displayed option ( ie. "option selected" line shows the text displayed on load)

<option value="something.shtml">Dooby dooby doo!!!!!</option>

Using Dreamweaver you can automatically move and update the options:

Source


CAREFUL: If you use this script more than ONCE on a page you need to rename select name & form name to make them different between occurances of the pulldown.

#7 Load a page in the existing Browser Window on the click of a button! see http://www.ihatethebmwmini.org (added 23 June 2002)

VERY SIMPLE but good when you want a choice to launch a URL put this in your body HTML:


<input type=button value="buttontext" onClick="opensite()" name="button1">


you get this: with This in the HEAD area:


<SCRIPT LANGUAGE="JavaScript">
function opensite()
{self.location.replace('yoururl.htm')}
</script>

#8 Put this in the top of any page in the <BODY> and it will bust any frameset it is opened in to occupy the top frame!! (added 24 Dec 2002) this will stop people opening your page in their framesets.... try http://www.imm2004.co.uk!!! this routes to www.imm2004.org and breaks us out of the original hosts frameset watch

<SCRIPT LANGUAGE="JavaScript">

<!--

if (window != top) top.location.href = location.href;

// -->

</SCRIPT>

#9 Try using cookies!: this puts a cookie called fatblokeracingjava on the viewing machine that lasts for a year, if it is a first visit it launches javawelcome.html as a new window, if the visitor returns it opens javawelcomeback.html...

IMPORTANT: please do a "find and replace" to change "fatblokeracingjava" to yourname for YOUR cookie!

TRY HITTING "REFRESH" on your browser and see if a DIFFERENT window opens now you are visiting the page AGAIN ;) (added 23 June 2002)

This Script opened the welcome box you got when you came to this page!

THIS LOT GOES IN THE <HEAD>


<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var expDays = 365; // number of days the cookie should last

var page = "javawelcome.html";
var windowprops = "width=450,height=400,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no";
var returnpage = "javawelcomeback.html";
var windowprops = "width=450,height=400,location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no";

function GetCookie (fatblokeracingjava) {
var arg = fatblokeracingjava + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (fatblokeracingjava, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = fatblokeracingjava + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (fatblokeracingjava) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (fatblokeracingjava);
document.cookie = fatblokeracingjava + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
window.open(returnpage, "", windowprops);

}
}
// End -->
</script>


This goes in the <BODY> TAG:<BODY OnLoad="checkCount()" bgcolor="#FFFFFF">


#10 ....to print the page off!!

Needs this in the <BODY> area:


<input type=button value="Print Page" onClick="myprint()" name="button">


AND this in the HEAD:


<script language="JavaScript">
function myprint()
{
window.print();
}
// End -->
</script>

 

Finally, to print the page off!!

#11 .... Embed Referring URL and other Viewer information into Forms! (added 15 12 02)

These MUST be between the <Form> and </form> tags to work!! Check your form script will support them too, if you try one out and the form script returns a default value expect that your "tweak" is incompatible

A QUESTION!

How can you combine values inputted in a form to form a third hidden value?

eg. existing hidden field is:

<input type=hidden name="subject" value="IMM2004 pre registration RECEIVED">

another 2 are filled in by the submitter: email address and real name

<input type=text name="email" size="50" maxlength="75">
<input type="text" name="realname" size="45" maxlength="75">

so how can I generate a value for subject of: IMM2004 pre registration RECEIVED from: (email) (realname)?

The Answer HERE

Set up hidden fields in your forms to embed in the form where the viewer came from (Their IP etc AND the refering URL) some form scripts support other functions you can stuff things into!!!!

SSI must be enabled for some of this to work!!!! try anyway to see if it is....

REFERRING URL

<script language="JavaScript">

<!-- Begin
var fromurl = document.referrer;
document.write("<input type=hidden name=return_link_url value='" + fromurl + "'>");
// End -->

</script>

This hidden field can be used to set a return link on form submission to take them back where they came from ( FormMail.cgi from Matts Scripts supports this) this function NEEDS SSI to be enabled!!


<script language="JavaScript">

<!-- Begin
var fromurl = document.referrer;
document.write(fromurl);
// End -->

</script>

***** THIS displays the Referring URL NEEDS SSI to be enabled!!!!

AND gives a REFERRING URL output like this (follows in bold)....

this will be blank if you didn't come here from another page.. check it AGAIN click here!!


<script language="JavaScript">

<!-- Begin
var fromurl = document.referrer;
document.write("<input type=hidden name=referringURL value='" + fromurl + "'>");
// End -->
</script>

***** THIS inserts the Referring URL as a HIDDEN form field entry NEEDS SSI to be enabled!!!!


REFERRING IP Address and the like

<script language="JavaScript">

<!-- Begin
var fromip = '<!--#echo var="REMOTE_ADDR"-->';
document.write("<input type=hidden name=referringIP value='" + fromip + "'>");
// End -->
</script>

***** THIS inserts the Referring IP as a HIDDEN form entry NEEDS SSI to be enabled!!!!

#echo var="REMOTE_ADDR" gives an output like this (follows in bold): 54.144.29.233

(Not ALL might not be supported by your server)

#echo var="REMOTE_HOST" gives (follows in bold) : (none)

#echo var="HTTP_USER_AGENT" tells you their Browser (follows in bold): CCBot/2.0 (http://commoncrawl.org/faq/)

you could use HTTP_USER_AGENT in the script above



<script language="JavaScript">

<!-- Begin
var fromhost = '<!--#echo var="REMOTE_HOST"-->';
document.write("<input type=hidden name=remoteHOST value='" + fromhost + "'>");
// End -->
</script>

***** THIS inserts the Remote_Host as a form entry NEEDS SSI to be enabled !!!!

#12 Combining form field values to be used elsewhere in the form as hidden values!!!!

OK.. here you go thanks to Jinushaun http://www.nationleprechaun.com/: from the Java-Script-world yahoo! group for the answer!!!!

Change the <form> tag to read

<form onsubmit="return onFormSubmit()" name="registration">
<input type=hidden name="subject">

this tells the function to execute on submit and give the from a name "registration"

you also need the line about the hidden field "subject" as yet without a value!!!!

then add this javascript between the form tags (email and realname are 2 of the formfield values:

<script language="JavaScript">
<!-- Begin

function onFormSubmit()
{
var email = document.registration.email.value; // form value 1
var realname = document.registration.realname.value; // form value 2

document.registration.subject.value = "IMM2004 PreReg TRADER Form From: " + email + " / " + realname; // set new value

return true;
}
// End -->
</script>

this generates a value for the field "subject" of

subject: IMM2004 PreReg TRADER Form From: johnbullas@xxxx.com / John Bullas

and this is added tothe email the form sends!!!

#13 Combinng form inputs to work with the limited number of fields in the PAYPAL shopping cart! ( added 31 Aug 2003)

<form onsubmit="return onFormSubmit()" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" name="bookingsub" method="post">

change the form line to read like this (name must be unique on a page for each form)

set up inputs for the vlues you want to combine

<select name="clubornot">
<option value="Club Booking">Club Members</option>
<option value="Individual Booking ">Non-Club Members</option>
<option selected>Select one...</option>
</select>

<input type="text" name="clubname" size="50" maxlength="50">

<select name="carnos">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="20+">20+</option>
</select>

<select name="arrday">
<option value="Friday 20th AUGUST 2004">Friday 20th AUGUST 2004</option>
<option value="Saturday 21st AUGUST 2004">Saturday 21st AUGUST
2004</option>
<option value="Non stated" selected>Please choose one</option>
</select>
at:
<select name="arrtime">
<option value="08:30-10:00">08:30-10:00</option>
<option value="10:00-12:00">10:00-12:00</option>
<option value="12:00-14:00">12:00-14:00</option>
<option value="14:00-16:00">14:00-16:00</option>
<option value="16:00-18:00">16:00-18:00</option>
<option value="18:00:20:00">18:00-20:00</option>
<option value="20:00-23:59">20:00-23:59</option>
<option value="AM">AM</option>
<option value="PM">PM</option>
<option value="Unknown">Unknown</option>
<option value="non stated" selected>Please Choose One</option>
</select>

<input type="text" name="quantity" size="3" maxlength="2">

NOTE using a field called quantity ports over a quantity value for the shopping cart!!!!

<input type="text" name="numveges" size="3" maxlength="2">

They can be anywhere on the form

YOU NEED TO ADD

<input type="hidden" name="on0" value="Club and Club name (if applicable)">
<input type=hidden name="os0">
<input type="hidden" name="on1" value="Car Numbers and Arrival details">
<input type=hidden name="os1">

to tell Paypal the headings for the cart entires and to expect values for 0s0 and os1!!!!

this script THEN combines them on form submission

<script language="JavaScript">
<!-- Begin

function onFormSubmit()
{
var clubornotvar = document.bookingsub.clubornot.value; // form value 1
var clubnamevar = document.bookingsub.clubname.value; // form value 2
var carnosvar = document.bookingsub.carnos.value; // form value 3
var arrdayvar = document.bookingsub.arrday.value; // form value 4
var arrtimevar = document.bookingsub.arrtime.value; // form value 5
var numvegesvar = document.bookingsub.numveges.value; // form value 5

document.bookingsub.os0.value = "Type:" + clubornotvar + "/ Club:" + clubnamevar; // set new value
document.bookingsub.os1.value = "Cars:" + carnosvar + "/ Arriving (day):" + arrdayvar + " (Time):" + arrtimevar+ " - Vegetarians:" +numvegesvar;

return true;
}
// End -->
</script>

It produces complex "Options" cart entries like this using only 2 on0,os0 on1,os1 standard fields!!!!

This is useful to avoid having to have paperwork returned by the purchaser to record details you really wanted at the time!

#14 If you want to M*NIMISE the grief when you have to install windows again:

Save all your downloaded drivers into a directory called REBUILD ESSENTIALS before you install them

.. into subdirectories like VIDEO drivers etc etc regularly back this up to CD

Sometimes "SAVE AS" will not work and you have to "Run from current location"

If it gets bigger than a CD keep 2 copies of what you delete to create space

EXPECT to have to reinstall software sooner or later

 

Windows 2000 2k Errors: Remembr I am not an IT specialist THIS MAY NOT WORK ON YOUR PC!!!

" Explorer.exe has generated errors "and is closing? EVERYTIME you try to run it

One possible on SP3 install: http://www.jsifaq.com/SUBL/tip5500/rh5561.htm

BUT I got this error ONLY after Ghosting a Hard Disk and running the ghosted drive as the boot drive

I am Running Win2k Prof with SP3

I solved it by running the Win 2k install disk again

select fresh install ( multiple boot)

enter the Key

Continue until The option than comes up to "repair the existing install"

I chose the option without the rescue disk!

A lot of files were flagged as changed so I just let the install/repair replace them all.......

AFTER: Adobe Acrobat Reader needed a re install ALSO Internet explorer and/or Outlook Express and or other apps might need a reinstall?

BUT at least EXPLORER works now!!!!!!

TIP: you can download the WHOLE of INTERNET EXPLORER 6.0 to HDD somewhere from the MS website ( good for later reinstalls)

http://www.microsoft.com/windows/ieak/downloads/ieak6/ieak6sp1.asp might be right? but there are licencing issues


NOTE: THE HTML BELOW HERE IS ADDED TO EVERY PAGE ON THIS SITE BEFORE DELIVERY BY USING SSI COMMANDS

 

back to the top

Go on...vote for Fatblokeracing.org .... ORIGINAL CONTENT © John "Fatbloke" Bullas 2004 | To Link to FBR click HERE | HTMLBLUNDERS? Click Here!!!! please