473,770 Members | 7,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can anyone help me?

I'm not a programmer and I don't have the time and energy to start learning
right now So I need some help.

Let's say I have made an HTML Table (consisting of three columns and six
rows). In each cell, in the first column I have put in an image (six
different ones).
In the second column I have merged all six cells into one cell and there put
in an image matching the background colour.
In the right column I have again put in six different pictures, one in each
cell.

What I now want is, when I MouseOver the first top-left picture the middle
image shall change into another as well as the top right image shall change.
When I remove the pointer from the image both the changed images shall turn
back again.

When I MouseOver the second-left picture, again the middle image shall
change as well as the second-right picture, and so on and so on.

Can anyone help me?
Jannick.


Jul 23 '05 #1
6 1092
In article <40************ *********@dread 12.news.tele.dk >, [Nospam]
ja************* *@skolekom.dk enlightened us with...
I'm not a programmer and I don't have the time and energy to start learning
right now So I need some help.
<snip>
Can anyone help me?


How much does the job pay?
--
--
~kaeli~
Santa's helpers are subordinate clauses.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
> How much does the job pay?

Yeah, that's a good question!
This is actually an idea I got from another web site with some
modifications. Unfortunately that site no longer excists, .
The guy (a Norwegian) who made the web site once promised me to show me how
he had done this. I don't know what happened to him. Can't get in contact
with him anymore.

It is a simple "image change" script (as far as I understand). I tried to
sit down and make it myself, but I only got the "MouseOver-image" to change.
I thought that some might have done this before and had the script lying
around somewhere.

Jannick.
Jul 23 '05 #3
J. Nielsen wrote:
<snip>
What I now want is, when I MouseOver the first top-left picture the middle
image shall change into another as well as the top right image shall change.
When I remove the pointer from the image both the changed images shall turn
back again.
When I MouseOver the second-left picture, again the middle image shall
change as well as the second-right picture, and so on and so on.


This might get you started, give the images you want to change a unique
id (and matching name). This will allow you to change their src to
display a different image.

var imgsrc = new Array();
imgsrc[1]=new Array();
imgsrc[1][0]='art_1.jpg';
imgsrc[1][1]='amber_sm_3.jp g';
imgsrc[2]=new Array();
imgsrc[2][0]='art_2.jpg';
imgsrc[2][1]='amber_sm_4.jp g';

function changepics(num) {
var bigpic=document .getElementById ('bigpic');
bigpic.src=imgs rc[num][0];
var littlepic=docum ent.getElementB yId('littlepic' +num);
littlepic.src=i mgsrc[num][1];
}
</script>
</head>

<body>

<table border="1" cellspacing="1" width="861">
<tr>
<td width="149"><im g border="0" src="art_1_sm.j pg" width="144"
height="110" onMouseOver="ch angepics(1)">&n bsp;</td>
<td width="602" rowspan="4"><im g border="0" src="art_3.jpg"
width="600" height="450" name="bigpic" id="bigpic"></td>
<td width="149"><im g name="littlepic 1" id="littlepic1 " border="0"
src="amber_sm_1 .jpg" width="144" height="108">&n bsp;</td>
</tr>
<tr>
<td width="149"><im g border="0" src="art_2_sm.j pg" width="144"
height="108" onMouseOver="ch angepics(2)">&n bsp;</td>
<td width="149"><im g name="littlepic 2" id="littlepic2 " border="0"
src="amber_sm_2 .jpg" width="144" height="108">&n bsp;</td>
</tr>
</table>

Jul 23 '05 #4
mscir wrote:
<snip>
var imgsrc = new Array();
imgsrc[1]=new Array();
imgsrc[1][0]='art_1.jpg';
imgsrc[1][1]='amber_sm_3.jp g';
imgsrc[2]=new Array();
imgsrc[2][0]='art_2.jpg';
imgsrc[2][1]='amber_sm_4.jp g';

<snip>

You really should become familiar with writing Array literals, which can
appear in array literals, producing as near to multi-dimensional arrays
as javascript gets:-

var imgsrc = [
[
'art_1.jpg',
'amber_sm_3.jpg '
],
[
'art_2.jpg',
'amber_sm_4.jpg '
]
];

Richard.
Jul 23 '05 #5
In article <40************ *********@dread 12.news.tele.dk >, [Nospam]
ja************* *@skolekom.dk enlightened us with...

It is a simple "image change" script (as far as I understand). I tried to
sit down and make it myself, but I only got the "MouseOver-image" to change.
I thought that some might have done this before and had the script lying
around somewhere.


If all you need is the image swap function, search the archives.
There's tons.

http://groups.google.com/groups?hl=e...UTF-8&oe=UTF-8
&q=image+swap&b tnG=Search&meta =group%3Dcomp.l ang.javascript

Also, dynamic drive probably has some canned ones.
http://www.dynamicdrive.com

--
--
~kaeli~
What if the Hokey Pokey IS what's it's all about?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6
Richard Cornford wrote:
mscir wrote:
<snip>
var imgsrc = new Array();
imgsrc[1]=new Array();
imgsrc[1][0]='art_1.jpg';
imgsrc[1][1]='amber_sm_3.jp g';
imgsrc[2]=new Array();
imgsrc[2][0]='art_2.jpg';
imgsrc[2][1]='amber_sm_4.jp g';


<snip>

You really should become familiar with writing Array literals, which can
appear in array literals, producing as near to multi-dimensional arrays
as javascript gets:-

var imgsrc = [
[
'art_1.jpg',
'amber_sm_3.jpg '
],
[
'art_2.jpg',
'amber_sm_4.jpg '
]
];


Thanks Richard, that did seem inefficient.

If I wanted to use that approach and still control the 1st dimension
indexes, say to non zero-beginning, or non-consecutive numbers, is this
the most efficient way to approach it?

var imgsrc = new Array();
imgsrc[3]=['art_1.jpg','am ber_sm_3.jpg'];
imgsrc[5]=['art_2.jpg','am ber_sm_4.jpg'];

Mike

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2991
by: lawrence | last post by:
I'm trying to read up on the rfc's that govern form inputs. Much of what I'm reading is stuff I didn't know before and some of it is alarming. This one left with me questions: http://www.ietf.org/rfc/rfc1867.txt Is this (below) addressed to me as a web designer, or is this addressed to the makers of web browsers? Identifying the type of file being uploaded seems way outside of my scope as a PHP coder. Am I
1
2060
by: Harag | last post by:
Hi all Classic ASP, Textpad Local "test" WebServer. IIS5 Well my MS script debugger isn't running and I can't findout why. I'm sick of it failing on me so was looking for an alternative. I spotted one called Team Remote ASP Debugger
13
2229
by: penguin732901 | last post by:
Checking back for discussions, there was a lot of talk about 2000 being slower than 97, but not so much lately. What is the latest opinion? Anyone care to set up a poll for how many NG members are still using 97? 2000? I am slightly tempted to upgrade by a new client whose data is in 2000, but of course, I can just port it all back through Excel...right? and I guess I have seen a couple of nice features...
4
2512
by: Hai Nguyen | last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using panel to test myself. I tried to use these code below, which is written in VB, and to transform them to c sharp but I got hard time to understand vb syntax. I don't know if anyone in here can point out which is the equivalent object used in c sharp. Translate these two lines to C sharp: Sub Next_Click(Sender As Object, e As EventArgs) Select Case...
7
2317
by: Skc | last post by:
Hullo Just like to check whether anyone has tried RentACoder. I intend to farm out a small job that must use C#, WinForms, ADO.Net for around US$400, but don't know whether RentACoder is reliable. Any views anyone? BTW, I am not from United States but from a small country on the other side of the globe.
8
2195
by: Dgates | last post by:
Has anyone typed up an index for the O'Reilly book "C# and VB.NET Conversion?" I'm just learning C#, and often using this little book to see which VB.NET terms translate directly to some term in C#. However, it's a real hassle that the book has no index, just a table of contents. For example, as early as page 8, the book teaches that C#'s "using" statement is the equivalent of VB.NET's "imports" statement. However, that concept...
0
1487
by: Gareth | last post by:
I cannot find a reference anywhere to anyone having done this successfully... can anyone enlighten me on how you get a SSL login page working with ASP.NET and forms authentication. I have configured the web.config as specified in numerous manuals and the MSDN. I have a SSL Certificate, I have a secure web directory for my login page, but the forms authenticated with ASP.NET does not work leaving me with an "Access Denied" error. Can...
2
2320
by: Bruno Alexandre | last post by:
Hi guys, does anyone know where is the Website used in the MSDN "Lear ASP.NET 2.0 with Jeff Prosise" (http://msdn.microsoft.com/asp.net/beta2/multimedia/default.aspx) events? The website used is called "Contoso", but I can't find it in the MSDN site, so I can evaluate it with the webcasts. If anyone know here is it, or if anyone is using it, please post here a
5
2729
by: tony | last post by:
I'm using PHP 5 on Win-98 command line (ie no web server involved) I'm processing a large csv file and when I loop through it I can process around 275 records per second. However at around 6,000 records this suddenly drops off to around 40 records per second. This is a big problem as the "live" list is over 4 million records long. I'd break it up but this is to be a regular test so that would be messy
169
9216
by: JohnQ | last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post). It would be more than a little bit nice if C++ was much "cleaner" (less complex) so that it wasn't a major world wide untaking to create a toolchain for it. Way back when, there used to be something called "Small C". I wonder if the creator(s) of that would want to embark on creating a nice little Small C++ compiler devoid of C++ language features that make...
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.