xhtml

A tag and click events href="javascript: my_function()" vs onclick="my_function()" or ...

There are several ways to define click action on anchor tag like: <a href="javascript: void(0)" onclick="funciton_X()">click here</a> or <a href="javascript: funciton_X()">click here</a> or <a id="a_tag" href="javascript: void(0)">click here</a> <script type="text/javascript"> $('#a_tag').click(function(){}) </script> ...

Headers in definition terms? (HTML)

I've noticed an awkward occurence in Firefox/Firebug: <dl> <dt><h3>test</h3></dt> <dd>stuff</dd> </dl> renders as this <dl> <dt></dt> <h3>test</h3> <dd>stuff</dd> </dl> I've never seen this happen before. Can anyone explain why? ...

jQuery loop ul li

What's wrong with this? I'm trying to hide all empty li. $(document).ready(function() { $("#details li").each(function() { if ($(this).length == 0) { $(this).css({ display: "none" }); ; } }); }); Markup: <ul id="details"> <li>Lorem Ipsum</li> <li>Lorem Ipsum</li> <li>...

Prevent iframe "This webpage is not available." error from displaying on website

Hi, Is there a way to prevent the error "This webpage is not available." from displaying within an iframe that displayed on another site? For example, if I have a website and I want to display my Facebook fans in a box, one way to display it is with an iframe (typically Facebook supplied code). However, if for some reason Facebook is d...

XHTML HTML element with 100% height causing scrollbars

In my CSS file I use this: html,body{height:100%;padding:0;margin:0;border:0;} Which causes a vertical scrollbar to appear on IE8, Chrome 5 and Mozilla 3.6, all latest version. Also, the document is empty, it only has the html, head and body tags so nothing is going out of screen to cause that. Setting overflow:hidden; on the html e...

Use XSL to keep only first paragraph of RSS <description> field

I am trying to work with this RSS feed. I would like to use XSL to keep only the first paragraph of the description field. I have read up on how to target only certain children of an XML structure, but I think because the paragraph tags in the RSS feed are added as &lt and &gt they don't seem to work when doing something like this: <xs...

XHTML place div on bottom of page

Hello! I have an XHTML with its content of unknown height. I want to have a small text in a div that's always on the bottom of the browser viewport when the content is smaller than the height of the viewport and go under the viewport when the content is higher. I can't do this with position:fixed and bottom:0 because if the content is...

ASP.NET: How can you add a custom/namespaced XHTML attribute to a web control declaratively?

Normally, unknown attributes of a webcontrol are passed through to to the rendered element in the browser. So the following works. <asp:label runat="server" Text="Label Text" helpId="101" /> However, if you use a namespaced attribute like the following <asp:label runat="server" Text="Label Text" myNs:helpId="101" /></div> The att...

why insert double <span> tag in <button>

sometimes, I found too mary people like to insert tag in tag, sometimes, they place two tags. I want to know, why do this? ...

input and textarea fading value

I want to be able to do something like <input type="text" name="txtField" value="" title="input your text" /> <textarea name="areaField" title="input your long text"></textarea> And the title will auto fade out and back in as the field value, unlike the "search" here in stackoverflow (right on the top, it only fade out). I could come...

What to replace <span> in <form> with? "In XHTML 1.1 the tag <form> cannot contain tag <span>

Hello Folks, I am a beginner in html. I am using a login module from yootools: What to replace <span> in with? I have XHTML 1.1 strict doctype (changing transitional fixes it) and I get error: "In XHTML 1.1 the tag <form> cannot contain tag <span> This is user/pass box lined up next to each other on the same line. What can I replace...

Editing an html file like xml file

Hi, I need to convert HTML file to iXBRL format. iXBRL format is basically html with some embedded nodes or some information of html file wrapped under ixbrl tags. For this, I will need to SEARCH and REMOVE some nodes from HTML file and WRAP some nodes under iXBRL tags. I'm not able to use XML DOM as it shoots an exception on content t...

InvalidArgument with HTML Table's insertBefore method

Hi.. I think I know this is an IE bug ... I need to add new row to an HTML table at the exact position. (don't want insertRow(index) cuz this looks like gonna be better for some other reasons) function AddNewItem(td) { ///td comes from button at the HTML code, <input ... onclick="AddNewItem(this.parentNode)" var grid = GetGrid(); ...

Some HTML input fields get cleared off on PHP validation, others don't

Here is the problem. I have data validation and sanitation code in PHP and an HTML form. When there is some field left empty on the form, the validation code executes and prints a message. I thought I designed the form the way all the filled out fields retain their input data at that point. However, it proves to be inconsistent. For exam...

HTML Interview Question

Well I got this question in an interview test.Give two reasons why the page might take longer to download than necessary with this image. < IMG src="somethin.gif" width=10 height=10 border=0 > Well I came up with 3 instead of 2 reasons Xhtml validation problems,image resizing and unnecessary border=0.So what is wrong in here? . ...

Which HTML tags have no content

Some HTML tags like br and hr have no content and cannot have a closing tag. What is the complete set of these tags? ...

Lift Framework BindHelpers.attr Question (or better practice?)

My problem is extracting xhtml attributes to generate absolute links, since they need to be different on testing and production environment. I would like to use a "global snippet" that binds all "src" and "href" attributes to "localhost:8080" or "www.mydomain.com" depending on a conf value. This is how the template looks like: <lift:Gl...

Everything is way off in IE7 & IE8

Hey, It's just insane, I've made soo many websites and still it seems every time IE7 and IE8 behave differently every time!! I'm working on a friends website: Class One Except I can't seem to get my head around why IE7 and 8 seem to be adding in extra spacing. The positioning of the text overlay div on the jquery slider is off a few ...

sending a value with input get ?

<a href="companies.php?id='. $_GET['id'] .'&offset='. $next_offset .'"><input id="button" type="button" value="More"/> i somehow want to send &offset=avalue but useing a input button. without the id. how can i do the similer thing with useing form action get ? like ( warning epic fail ) i should add a hidden input or something ? ...

jQuery .hide() not working in IE

Hello, I have a few span elements that I am hiding via CSS (display: none;). When the page loads, I would like the first span element to show which in all browsers, except IE7, seems to be the case. Anyone have any clue as to why this might be happening? There isn't any crazy code that would cause this problem, it simply just isn't w...