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

img: on click select

Hi,

I want to combine an image with an on click event like:

onclick="document.myForm.myValue.focus();document. myForm.myValue.focus.select();"

With a simple img, it didn't work - when using an image button, it does
work,
but then the form also gets submitted (what I don't want to..)

Any ideas of how to achieve this?

Jun 7 '06 #1
1 1640
wrote on 07 jun 2006 in comp.lang.javascript:
I want to combine an image with an on click event like:

onclick="document.myForm.myValue.focus();document. myForm.myValue.focus.
select();"
What would be the HTML purpose of selecting an <img>?

What would be the HTML purpose of selecting an object's focus?
With a simple img, it didn't work - when using an image button, it
does work,
What is "work" here?
but then the form also gets submitted (what I don't want to..)
Then do not put it in a form, or do an onsubmit='return false;'
Any ideas of how to achieve this?


What? The select?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 7 '06 #2

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

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
4
by: Nathan Henderson | last post by:
Hi, Becoming quite frustrated with this. I have a commercial database written in access and I'm trying to display some images, jpegs, stored in the DB on web page. My code is as follows: ...
8
by: KS | last post by:
Just to show some code to show the consept. <img id="date" onclick="javascript:show_calendar();" src="/PlexSysWeb/images/show-calendar.gif" width=20 height=18 border=0> What i want the...
6
by: Werner Partner | last post by:
I use a page created by php. It should show two pictures of a person an a short text. If there are no picture, nothing is shown, if there is no text, nothing is shown. There a about 20...
9
by: Burak Gunay | last post by:
Hello, In my asp.net 2.0 page, I have a hyperlink with an arrow image <a id="imgtest" href="#"onclick="return hideColumn()"> <img id="imgArrow" src="App_Themes/Trmis/WebResource3.gif"...
4
by: luftikus143 | last post by:
Hi there, I have a nasty little problem, as so often, only with IE. Here is an screenshot to better illustrate the problem. http://geodata.grid.unep.ch/screenshot13.png The map is clickable (to...
3
tolkienarda
by: tolkienarda | last post by:
hi all i have a problem i have a script that i got working exactly the way i wanted it. and then i tried to intrigate it into the site and it totaly stopped working. below is the original code ...
2
by: samz | last post by:
Hello, 1. How to get my DIV (DIV.Box) fit its content (an image)? width:auto doesn't work? 2. How to get links (A) in this DIV click-able (on the IMG) in IE6 too? Thanks URL:...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.