Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > HTML, XML, Javascript, AJAX
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 01-14-2008, 05:23 AM   #1 (permalink)
Havent_a_clue
Recruit
 
Join Date: Jan 2008
Posts: 1
Havent_a_clue is on a distinguished road
Anybody know???

I'm currently working on a project and came across this piece of code. Unfortunately, as my user name suggests, i don't know whats going on. Could anybody help???
thanks in advance...

function flip(pic, r)
{
if(r == 2)
{
source = eval(pic + "2.src");
document[pic].src = source;
}
if(r == 1)
{
source = eval(pic + "1.src");
document[pic].src = source;
}
}

function link()
{
}
__________________
Havent_a_clue is offline   Reply With Quote
Old 01-14-2008, 08:10 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
It's typicaly used in creating the change of pictures, when your mouse passes over a picture, and it is usualy called like:
Code:
onMouseOver="flip(this, 2); return true;" onMouseOut="flip(this, 1); return true;"
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:07 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle