Why w3 validator says onClick is not valid? - onclick

w3 validator gives me this error
there is no attribute "onClick"
I can't see what is making my code invalid.
<img alt="" src="./favorites-intro.jpg" />
suggestions?

If you change it to lower case onclick, the error goes away. Like this:
<img alt="" src="./favorites-intro.jpg" />

Related

Put a pop-up text on hover of mouse

I have an image like this one:
<img class="alignnone size-full wp-image-262" src="http:/localhost/wp-content/uploads/2017/10/myimage.png" alt="" width="352" height="343" />
I would like to put text in a box and this appears when the mouse hovers on from the image. How is it possible to make it?
You can use:
<img ... title="TEXT HERE">
Here's a quick JSFiddle demo for you.
https://jsfiddle.net/23vbh1ov/
<img src="http://dev.benchanmusic.com/wp-content/uploads/2017/07/cropped-cropped-me_blackandwhite.jpg" alt="" width="352" height="343" title="TEXT HERE" />
You should also fill in the "alt" property, as it's used for search engine indexing as well as if the image itself fails to load for any reason.

Img source close tag

I am using img tag but its not working this is my code
<img src="resources/images/dsr_sprites.png" ></img>
and I have also use that type
<img src="resources/images/dsr_sprites.png" />
but when I open in firebug that have no close tag and we we use that code for itextpdf its also showing error message that img close tag is missing
Img tag is self closing, also on html 5 you can if you want, not closing the tag.
xHtml:
<img src="image.jpg" alt="My image" />
Html5
<img src="image.jpg" alt="My image">
Please dont forget the alt attribute.
i think you use this type your image tag:
<img src="../resources/images/dsr_sprites.png" />
It looks like you're using the incorrect path, so your HTML can't find your image anywhere.
The second tag is correct, but your path needs to be relative. Check out this article for more on the difference between absolute and relative paths.
<img src="../resources/images/dsr_sprites.png" alt="Sprites"/>

<a href> with image is disable in Chrome

hey, i have a .net C# function thats write html image links code such as:
<img src="..." />
and show it by asp:literal,
it works fine in Explorer and Firefox but in chrome the clicking is disable,
any ideas?
example code:
<div class=\"whitebox\" style=\"width:500px;\">
<div style=\"float:left;\">
<a href=\"../reader/Default.aspx?u=4&t=2&sr=f-53D\">
<img width=\"75px\" height=\"75px\" src=\"http://www.Knu.com/main.jpg\" />
</a>
</div>
</div>
The only problem I can see with that is if you're somehow outputting it exactly like that, with the C# escaping included.

Html is being truncated on save in drupal (full html)

If I unput a certain piece html into my page, it seems to be truncating:
<div id="slideshow">
<img style="cursor: pointer;" src="files:img/slideshow/3.png" id="left_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/1.png" id="center_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/2.png" id="right_slide" alt=""/>
</div>
It all looks good in the preview, but when I save it it becomes:
<div id="slideshow">
<img style="cursor: pointer;" src="http://local.drupal.com/sites/default/files/img/slideshow/3.png" id="left_slide" alt="" />
</div>
I'm at a loss! I'm not using any nasty WYSIWYG editors and the input format is full html. The second code example indicates that I'm using the path filter module but I've also tried disabling that and resaving. It still truncates.
I'm using Drupal 6.19.
You certainly print the teaser only.
To publish to the front page the complete node Go to Administer > Content Management > Post Settings > Choose 'unlimited' from the 'length of trimmed post' select box.
You can also manually controlling the teaser break point by inserting:
<!--break-->
If you use a views you can control if you want to show the complete node or the teaser in the settings of the view.

Opera Bug: src="" generated by asp:image is empty

I have the following problem with Opera.
The following asp.net code
<asp:Image runat="server" ID="imgExpand"/>
<ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server"
ImageControlID="imgExpand"
ExpandedImage="<%$ Image:collapse.png %>"
CollapsedImage="<%$ Image:expand.png %>"
/>
generates the following in FF3, IE6, IE7, IE8:
<img style="border-width: 0px;" src="/style/img/collapse.png" id="ctl00_ContentPlaceHolder1_imgExpand" title="Ausblenden..."/>
however the following in Opera 10:
<img id="ctl00_ContentPlaceHolder1_ucProductList_rptProducts_ctl02_imgExpand" class="expand-img" src="" style="border-width:0px;"/>
As you can see the src="" is empty and thus no image is beeing displayed.
Do you know any solution to this problem?
Thanks alot
Sounds pretty weird. I haven't heard of that particular error, but you could probably work around it the same way you can avoid all the problems associated with ASP.NET's idiotic, broken browser-sniffing: turn it off.
Discovered the same problem. But noticed that official example is working under Opera. After some playing found a reason:
It's necessary to specify image for control (ImageUrl="~/Img/icon-plus.gif")
<asp:ImageButton ID="ib" runat="server" ImageUrl="~/Img/icon-plus.gif" ImageAlign="AbsMiddle" />
And after that put the ID of it into control (ImageControlID="ib"):
<ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server" TargetControlID="pD" ExpandControlID="pH" CollapseControlID="pH"
Collapsed="True" TextLabelID="lCategoryName" ImageControlID="ib" ExpandedText="(Hide Details...)" CollapsedText="(Show Details...)"
SuppressPostBack="true" ExpandedImage="~/Img/icon-minus.gif" CollapsedImage="~/Img/icon-plus.gif" />

Resources