Advice activity

Click the computer for more advice...

(only tested on Chrome so far - let me know if it has issues on any other browsers please!)

Thinking...

Comments

Advice activity

Works fine on IE8,
and I think it's great!

Realy cool

Really cool way of presenting this topic. Love it and the questions are quite relevant.

How did you do this?

Used firefox. It worked fine! ;-)

Simple bit of javascript and some tweaking...

 <script type="text/javascript">
var msgn=0;
var msg=new Array(6);
msg[0]="Don't fret if you're on the net, just have good etiquette!";
msg[1]="Keep the pictures nice and clean, Mother will see you on the screen!";
msg[2]="Don't use your name for your password, make sure you make it more absurd!";
msg[3]="Chat room beware! You don't know who's actually there!";
msg[4]="What happens when you google you? It may not all be really true!";
msg[5]="Someone could impersonate you... what would you do?";
msg[6]="Find stuff out, help a friend,\n but always think, before you press send!";

function next() {
 msgn=msgn+1;
 if (msgn>6)
  msgn=0;
 document.getElementById("msg").innerHTML=fmt(msg[msgn]);
}
function fmt(t) {
 return ('<CENTER><FONT SIZE="+2" COLOR="00ff00">' + t + "</FONT></CENTER>");
 }
</script>
<IMG SRC="http://thisisme.reading.ac.uk/mod/file/thumbnail.php?file_guid=476&size=large" onclick="next();">
<DIV id="msg" STYLE="position:absolute; top:100px; left:110px; width:400px; height:25px" >
<CENTER><FONT SIZE="+2" COLOR="00ff00">Thinking...</FONT></CENTER>
<script type="text/javascript">
 document.getElementById("msg").innerHTML=fmt(msg[msgn]);
</script>

 Dirty, but it works.  Had to tweak the top and left of the msg div to get it to work in the Drupal page.  I ought to do that via script, really, then it might be easily re-usable elsewhere.

I'd like to make some mods to it; allow an "interactive" journey where you can click Yes or No and work through a simple dialogue.  That may have to wait for a little while though (or, you never know, it might get done as an avoidance tactic for doing other more important things!)

 

Glad to hear it works in Firefox :-) 

Oh I forgot...

 I was going to say that I was also thinking of getting the script to fetch the advice from a database (or web page) so that it can be dynamically updated with extra advice.  It ought, really, to keep track of what advice it has given in a cookie too, but I doubt I will get that far with it.  Should be relatively easy to turn into a widget too, I guess.

Creative Commons license icon
This work is licensed under a Attribution Share Alike Creative Commons license