Connecting Tech Pros Worldwide Help | Site Map

code question: what is it?

  #1  
Old July 21st, 2008, 07:45 AM
Mason C
Guest
 
Posts: n/a

I'm a novice at this and would be forever grateful if someone would tell
me what this code accomplishes. It is repeated 149 times on the page.
This is the 97th: (I've removed some trivial code.)

<script>
function swapon97()
{
document.img97.src="img/navigr97.gif";
}
function swapoff97()
{
document.img97.src="img/navig97.gif";
}
</script>

<a href="page97.html" onclick="return true">

<img src="navig97.gif" /></a>

then <scriptand repeat above with "98"


Thanks for any instruction or source,

Mason C

  #2  
Old July 21st, 2008, 08:15 AM
Geoff Muldoon
Guest
 
Posts: n/a

re: code question: what is it?


Mason C says...
Quote:
>
I'm a novice at this and would be forever grateful if someone would tell
me what this code accomplishes. It is repeated 149 times on the page.
This is the 97th: (I've removed some trivial code.)
>
<script>
function swapon97()
{
document.img97.src="img/navigr97.gif";
}
function swapoff97()
{
document.img97.src="img/navig97.gif";
}
</script>
>
<a href="page97.html" onclick="return true">
>
<img src="navig97.gif" /></a>
>
then <scriptand repeat above with "98"
>
>
Thanks for any instruction or source,
It's a bit of javascript which will when triggered (probably by another
bit of javascript) switch the source of each of a number (149?) of images
on the page from one value - img/navigr97.gif ('r' for red?)- to another -
img/navig97.gif (note no 'r' in the name).

From your description it's a shitty bit of coding.

Geoff M
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible? mariommariom answers 2 September 14th, 2009 10:24 AM
Is it possible to pass a variable to a PHP script from inside another PHP piece of code? leonardodiserpierodavinci@gmail.com answers 3 October 28th, 2007 12:45 PM
Is it safe to use /NODEFAULTLIB Matej Trampus answers 0 July 21st, 2006 08:15 AM
HOw to Raise Events in an ASCX User Control (Is it better in ASPNET 2.0 ?) Anonieko answers 1 February 7th, 2006 10:25 PM
Is it OK to modify argv ??? Charles Sullivan answers 28 November 13th, 2005 08:00 PM