Re: Mix of javascript, image and href

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Just to touch on one of your issues, "I can manage this fine using
javascript but the href must contain a
character to get the mousehand. "

don't forget that most modern browsers support setting the div's style
to accomplish this:
<div style="cursor: pointer; cursor: hand;"
onclick="downloadnew(2);"><img src="myimagepath.jpg">
more text here
</div>



On Nov 15, 9:24 am, Laurent Bugnion <galasoft...@xxxxxxxxxx> wrote:
Hi Edwin,

Edwin Knoppert wrote:
Thanks Laurent,
I see that there is no trivial way for this.
I understand one can use code to simulate clickevents but imo it's more
reliable to use a button under the hood then.I don't really think that it's more reliable. For the records, every
time that you use a control with autopostback = true (for example
checkboxes, radio buttons, listboxes...), in fact every time you use
anything else than a HTML submit or a HTML image to submit the form, the
_doPostBack method is used. I think it works pretty well, except when
JavaScript is off.

It's always the struggle between small sophisticated code and having
reliable code :)

I somewhat agree on the imagebutton, i do no longer need the click event for
this one but still asp.net image control 's ~/ stuff is recommended to use
imo.
(Just another control that is)Not sure about the recommendation... I think that what you need is
client-side code that works. If the generated HTML code produced by
ASP.NET is not reliable enough, then you can generate your own :-)

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:http://www.galasoft-LB.ch
Private/Malaysia:http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:http://www.calcutta-espoir.ch

.



Relevant Pages

  • Re: Mix of javascript, image and href
    ... function download1(t, n) ... anything else than a HTML submit or a HTML image to submit the form, ... this one but still asp.net image control 's ~/ stuff is recommended to ... Not sure about the recommendation... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A JavaScript Tutorial for beginners
    ... JavaScript is misspelled as "Javascript", ... Section "Browsers that do not support JavaScript" is wrong. ... followed by the end delimiter of the declaration. ... The recommendation is to use the `+' operator or a ...
    (comp.lang.javascript)
  • Re: Is it possible to set focus to a table cell?
    ... I would absolutely advise the fat book of O'Reilly, AKA the bible: ... Javascript, The definite Guide 4th edition. ... Is that a recommendation given in the knowledge that the 5th Edition was ...
    (comp.lang.javascript)
  • Re: Closures Explained
    ... I thought it was listed as the lesser evil. ... even state the reasons for his recommendation there. ... And "not too bad" is certainly no endorsement. ... Prototype.js was written by people who don't know javascript for people ...
    (comp.lang.javascript)
  • Re: ImageButton event doesnt fire but Button event does
    ... page that hides ImageButtons container html element when it is ... If I remove the javascript that does this it works. ... image control inside. ...
    (microsoft.public.dotnet.framework.aspnet)