473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

By jove! an answer to my dilemma perhaps?

http://www.codeave.com/javascript/image_click.html

With this guy's method of selecting an image, and displaying the results, I
do believe I can accomplish what I want now.

If my thinking is correct, I can just use a simple image swap to place the
output in the desired division?

Going one step farther, including a description with a mouse over before the
visitor clicks on the link.

Comments welcomed.

Jul 23 '05 #1
8 1154
Richard wrote:
http://www.codeave.com/javascript/image_click.html

With this guy's method of selecting an image, and displaying the results, I
do believe I can accomplish what I want now.

If my thinking is correct, I can just use a simple image swap to place the
output in the desired division?

Going one step farther, including a description with a mouse over before the
visitor clicks on the link.


The code could be optimized:

<img... onclick="document.images['large'].src=this.src">

That replaces 50 lines of code...
Mick

Jul 23 '05 #2

"Richard" <An*******@127.001> wrote in message
news:cs********@news2.newsguy.com...
http://www.codeave.com/javascript/image_click.html

With this guy's method of selecting an image, and displaying the results, I do believe I can accomplish what I want now.

If my thinking is correct, I can just use a simple image swap to place the
output in the desired division?

Going one step farther, including a description with a mouse over before the visitor clicks on the link.

Comments welcomed.


Working out quite well actually.
It is a basic image swap with a twist.
However, in the coding i want to show the full size image rather than just
another thumbnail.

if(clicks==0){document.images['large'].src=image0.src;}

What's the proper syntax for adding +big to the src code?
that is, this code displays "images/pic1.jpg" but I want to display
"images/pic1big.jpg" instead.

Jul 23 '05 #3

"Mick White" <mw***********@rochester.rr.com> wrote in message
news:JN*********************@twister.nyroc.rr.com. ..
Richard wrote:
http://www.codeave.com/javascript/image_click.html

With this guy's method of selecting an image, and displaying the results, I do believe I can accomplish what I want now.

If my thinking is correct, I can just use a simple image swap to place the output in the desired division?

Going one step farther, including a description with a mouse over before the visitor clicks on the link.


The code could be optimized:

<img... onclick="document.images['large'].src=this.src">

That replaces 50 lines of code...
Mick


When learning, one takes it one step at a time.
I plan on cleaning up the code later after it all comes together the way I
want.
I could also put the click checking lines into a loop which would eliminate
a lot of repetitive coding.
Jul 23 '05 #4
Richard wrote:

Working out quite well actually.
It is a basic image swap with a twist.
However, in the coding i want to show the full size image rather than just
another thumbnail.

if(clicks==0){document.images['large'].src=image0.src;}

What's the proper syntax for adding +big to the src code?
that is, this code displays "images/pic1.jpg" but I want to display
"images/pic1big.jpg" instead.

function image_click(clicks){
document.images['large'].src="images/pic"+clicks+"big.jpg"
}
No need for : if(clicks==0) etc. Just build the src string using the
"clicks" parameter, as above.

Mick
Jul 23 '05 #5
In article <cs********@news2.newsguy.com>, An*******@127.001 says...

"Mick White" <mw***********@rochester.rr.com> wrote in message
news:JN*********************@twister.nyroc.rr.com. ..
Richard wrote:
http://www.codeave.com/javascript/image_click.html

With this guy's method of selecting an image, and displaying the results, I do believe I can accomplish what I want now.

If my thinking is correct, I can just use a simple image swap to place the output in the desired division?

Going one step farther, including a description with a mouse over before the visitor clicks on the link.


The code could be optimized:

<img... onclick="document.images['large'].src=this.src">

That replaces 50 lines of code...
Mick


When learning, one takes it one step at a time.


You're not learning though, are you, RtS? You're just borrowing code
from others far more talented that you.

--
Hywel http://kibo.org.uk/
I do not eat quiche.
Jul 23 '05 #6

"Mick White" <mw***********@rochester.rr.com> wrote in message
news:Zt*******************@twister.nyroc.rr.com...
Richard wrote:

Working out quite well actually.
It is a basic image swap with a twist.
However, in the coding i want to show the full size image rather than just another thumbnail.

if(clicks==0){document.images['large'].src=image0.src;}

What's the proper syntax for adding +big to the src code?
that is, this code displays "images/pic1.jpg" but I want to display
"images/pic1big.jpg" instead.

function image_click(clicks){
document.images['large'].src="images/pic"+clicks+"big.jpg"
}
No need for : if(clicks==0) etc. Just build the src string using the
"clicks" parameter, as above.

Mick


Thanks mike. I'll put that to good use.
I beleive the guy was merely showing the simplicity rather than the extreme.
He could have put it all in loops to make it easier.
Jul 23 '05 #7

"Hywel Jenkins" <hy**********@hotmail.com> wrote in message
news:MP************************@news.individual.ne t...
In article <cs********@news2.newsguy.com>, An*******@127.001 says...

"Mick White" <mw***********@rochester.rr.com> wrote in message
news:JN*********************@twister.nyroc.rr.com. ..
Richard wrote:

> http://www.codeave.com/javascript/image_click.html
>
> With this guy's method of selecting an image, and displaying the

results, I
> do believe I can accomplish what I want now.
>
> If my thinking is correct, I can just use a simple image swap to
place the
> output in the desired division?
>
> Going one step farther, including a description with a mouse over
before the
> visitor clicks on the link.
>

The code could be optimized:

<img... onclick="document.images['large'].src=this.src">

That replaces 50 lines of code...
Mick


When learning, one takes it one step at a time.


You're not learning though, are you, RtS? You're just borrowing code
from others far more talented that you.


Wellll duhhhhh. Don't we all?
"Borrowed" coding appears to be a fairly accepted on the web from what I've
seen so far.
Hell, for every code you write, I'll bet I can find 50 examples of the same
thing elsewhere.
And 40 of them will be copyrighted no less.
Jul 23 '05 #8
Richard wrote:
"Hywel Jenkins" <hy**********@hotmail.com> wrote in message
news:MP************************@news.individual.ne t...
In article <cs********@news2.newsguy.com>, An*******@127.001 says...
"Mick White" <mw***********@rochester.rr.com> wrote in message
news:JN*********************@twister.nyroc.rr.c om...

Richard wrote:
<--snip-->
When learning, one takes it one step at a time.


You're not learning though, are you, RtS? You're just borrowing code
from others far more talented that you.

Wellll duhhhhh. Don't we all?
"Borrowed" coding appears to be a fairly accepted on the web from what I've
seen so far.
Hell, for every code you write, I'll bet I can find 50 examples of the same
thing elsewhere.
And 40 of them will be copyrighted no less.


Thats easy enough to prove your assumption (which is incorrect).

Search the archives for "dynamically load JS Files" and then find me 50
examples of that code on the web, and 40 of them that are copyrighted.

Either back up your assinine assumptions or STFU
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #9

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

Similar topics

7
by: Bruce W...1 | last post by:
I made my first PHP page that uses includes. http://php.didah.com/main.php But I can't get rid of a gap (about 5 pixels) between the table rows. The content of each include file is one line like...
0
by: A. B., Khalid | last post by:
Hello all. After the effort of getting most of Python 2.3.4 Final compiled in MinGW (see: http://mail.python.org/pipermail/python-list/2004-June/225967.html, and get the patch and read more...
3
by: Kevin Dahlhausen | last post by:
Could anyone post a simple setup.py script that uses a SWIG interface to C++ code and the mingw compiler? I followed some online samples, and am using the setup.cfg file to specify swig-c++=1....
1
by: Fernando Libonati | last post by:
Hello, after read your message I put hands on work and try to get python2.3.4 sources compiled with DevC++4.9.9 and I've failed. Could you explain a bit more especifically how to get the .dsp /...
4
by: A. B., Khalid | last post by:
Hello all. This is to inform those interested in getting Python to compile in MinGW that the pyMinGW patch is now able to help compile both Python 2.3.4 Final and Python 2.4a3 and the resulting...
1
by: vincent delft | last post by:
I've a module written in C and the associated setup.py. Work fine (and compile fine with mvc) with Python 2.3.x Now I've installed Python 2.4 (all the rest unchanged) When I try to compile it,...
188
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
3
by: bearophileHUGS | last post by:
To use Pyrex, SWIG and the like on a Win2K I have followed this way: http://jove.prohosting.com/iwave/ipython/pyMinGW.html I already had MinGW 3.4.2, so I have decompressed the Python 2.4.2...
4
by: homsan toft | last post by:
I've tried the below code with MSVC and Comeau online compiler. Both complain that operator<< for Outer<part<size_t> >::inner is not defined. So how do I declare it without doing full...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.