473,320 Members | 1,699 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,320 software developers and data experts.

OnClick Event Question

Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?

Thanks,
John
Jul 20 '05 #1
5 1536
Spank hu kiteb:
Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?


Style sheets.

..blah { cursor: hand; }

The exact value of .blah will depend on your name/id attributes for your
images.

--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #2
Spank wrote:
Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?

Thanks,
John


If you want it to act, look, and feel like a link, then make it a link.

--
Randy

Jul 20 '05 #3
An easier way, add a HREF to point to '#'
"Spank" <sp*********@yahoo.com> wrote in message
news:1b**************************@posting.google.c om...
Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?

Thanks,
John

Jul 20 '05 #4
Randy Webb wrote:
Spank wrote:
Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?

Thanks,
John

If you want it to act, look, and feel like a link, then make it a link.


Randy,

I did something similar. If you want an image to have the "hand" cursor
you can use css to do it:

<style type="text/css">
img { cursor:pointer; }
</style>

Jul 20 '05 #5
While the city slept, mscir <ms***@access4less.net> feverishly typed:
Randy Webb wrote:
Spank wrote:
Hello,

I have a thumbnail image with the onclick event. When clicked, a
larger pic is displayed via a javascript funtion. When browsing the
page, the client does not realize the image is clickable because the
arrow your mouse displays as you browse from page to page, does not
transform to the pointer--something that natuarally happens when you
hover over a hyperlink. How may I provide this functionality?

Thanks,
John

If you want it to act, look, and feel like a link, then make it a
link.


Randy,

I did something similar. If you want an image to have the "hand"
cursor you can use css to do it:

<style type="text/css">
img { cursor:pointer; }
</style>


First, it is the OP who is having the problem, not Randy.

Second, as Randy said, it should be a link. It currently acts like a link,
and your code will help it look like a link, so let's actually make it one
that will work alround...

<a href="mypic.jpg" onClick="myjsfunction('mypic.jpg'); return false;"><img
src="mythumbnail.jpg" width="100" height="100" alt="picture of something.
Links to full size version" title="This is a thumbnail. Click on it to open
the full size version in a pop-up window"></a>

.... If javascript is available to the user, and enabled, then this will open
the image in the pop-up. The 'return false' bit in the onClick attribute
stops the file referenced in the href attribute being opened. If javascript
is not available, then the file in href will open in the current browser,
and the user will still be able to see the picture.

Hope that helps,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!
Jul 20 '05 #6

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

Similar topics

8
by: Shock | last post by:
Hello everyone, I am having a problem with the program below. I have isolated the problem to the onclick event that is located throughout arrQuestions. The onclick event refers to a function...
2
by: Andreas Knollmann | last post by:
Hi, I create an object like this: var cell = document.createElement("td"). It doesn't have to be cell. I want this cell to use the onclick event. What doesn't work in the IE as well as with...
3
by: Jamie Jackson | last post by:
I'm rewriting all links' onclick events, but I'm having a problem. The onclick event that I'm inserting works correctly in Opera, but not in FF or IE. I'm retroactively adding the statement...
2
by: RobG | last post by:
I am trying to dynamically add an onclick to an element, however I just can't get the syntax right. consider the following function: function doClick (evt,x) { // do things with evt and x } ...
2
by: abs | last post by:
Hi all. Is that possible to call the onclick, onchange or other event from JS ? I mean how to make the browser think that user clicked the element (onclick event) ? Eg. I have <element...
5
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
10
by: Carlos Araya | last post by:
I have the following link on a web page <p class="menuitem"><a href="#" onclick="loadFragment('http://rivendellweb.net/fortress/home', 'index')" title="The Fortress Home">The Fortress...
2
by: =?Utf-8?B?Uml0YUc=?= | last post by:
I posted this question in the C# discussion group but am posting it here also since ASP is involved. I'm new to C# and need some help regarding an onClick event not firing. I have a data grid...
1
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
17
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/this-alert.html http://www.frostjedi.com/terra/scripts/demo/this-alert2.html Why, when you click in the black box, do the alert boxes say different...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.