html

html script tag

Hi, Why doesn't this work <script src="jquery.js"/> But this works <script src="jquery.js"></script> ? Firefox 3.5.8 ...

JavaScript: How to determine the web "fold" programmatically?

Question: How can I determine the "fold" programatically (how much vertical content the browser is displaying)? The "fold" defined as where you can no longer see / have to scroll. I've tried with JavaScript to simply determine the browser window size to determine the fold; unfortunately - this doesn't work well because some browsers ha...

Centered div with a transparent background with JQuery

Hello, how to center a div across all browsers and behind this div there should be a transparent background layer covering entire screen of browser like lightbox. Thanks ...

smart page resizing

Suppose I have an HTML page with three blocks of fixed width (their height can vary if that's important), like shown on picture: I would like to make it behave as shown on next picture: when browser screen width is reduced so it can't fit all three blocks in one line, first block goes down. Is it possible to achieve such behavior? Pr...

Jquery add href instead of click event

Hi all, I need to use href instead click event so I can use hover in the following statement. What I am trying to do is to be able to use href as if was click event, so I can attach a function through href, therefore I could use the hover efect which is alredy done on css. Its a delete button, so it would be a grey x and if you hover...

In XHTML/HTML which elements has semantic value , which are presentitional and which are not in both category?

In XHTML/HTML which elements has semantic value , which are presentational and which are not in both category? And who decide which tag is semantic, presentational? W3C or web developer with their own terms? What is the difference between structural and semantic mark-up? Is DIV and span not semantic , if yes then why we use ? ...

XpathQuery to retrive particular data from html page in iphone.

I am new to iphone development.I want to retrieve a particular data from a HTML page (Data inside a particular tag like This is title).I have the link of the web page.How should i use xpathQuery to retrieve "This is title" inside the tags.Please help me out.Thanks. ...

RegEx to extract all HTML tag attributes including inline JavaScript

I found this useful regex code here while looking to parse HTML tag attributes: (\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']? It works great, but it's missing one key element that I need. Some attributes are event triggers that have inline Javascript code in them like this: onclick="doSomething(this, 'foo', 'bar');return false;...

How do i make a "div" button submit the form its sitting in?

I have ASP.Net code generating my button's HTML for me using divs to get it to look and behave how I want. This question is regarding the HTML produced by the ASP.Net code. A standard button is easy, just set the onClick event of the div to change the page location: <div name="mybutton" id="mybutton" class="customButton" onClick="javas...

What's the best way for storing record's ID on web page while editing in ASP.NET MVC ?

While a record is edited,how should be the ID stored ? I could have a textbox with enabled false, but I don't like this approach. In ASP.NET I used to have a property which has saved the value in viewstate(Actually a hidden field + encrypted value). The only solution I found Is to use a hidden field. Is it save enough ? Are there any...

If you're not supposed to use Regular Expressions to parse HTML, then how are HTML parsers written?

I see questions every day asking how to parse or extract something from some HTML string and the first answer/comment is always "Don't use RegEx to parse HTML, lest you feel the wrath!" (that last part is sometimes omitted). This is rather confusing for me, I always thought that in general, the best way to parse any complicated string i...

Is it really best to make site without using <div>, using semantic tags only?

I found this on net in google search and see article here: http://www.thatcssguy.com/limit-your-divs/ See his final layout here: http://www.nodivs.com/ Some quotes from article 1 When I limited the use of my divs all the major browser including both IE6 and IE7 would render the sites nearly perfectly. Or with very little fi...

background image is appearing on top of foreground image in Opera and Chrome

I've a tiny span with a background image. This background image scrolls below foreground image. While this works perfectly in IE and FF, it doesn't work in Opera and chrome. I've put my example here. PLease see the block with 4 small rectangles. PLease suggest solution. ...

Is it better to use "min-height" always in place of height in css?

Should we always try to not to give "height" to elements in XHTML through CSS? if yes the i think min-height would be better idea instead of fixed height. What cross browser, W3C valid css, non-javascript "min-height" method in css for browser which do not support min-height? if i add min-height to any tag example <div> then in future...

How to add video player navigation for videos in html

I need to add video player for my video files. Can any one help me to add? Is there any free players on web? ...

jquery slideToggle strange effect.

Hi all, This is an example of code I have created to explain the situation. It works well but when it toggle to hide the tbody, it does a estrange effect (first expands the tbody by three or four times more than it is and then it collapses straigh away, and when it slide down it will also do it straigh away). When slide down it is not a...

(Jquery) Find the contents of a td from a selected tr

I am very new to JQuery, so appologies for what may be a very simple question. I have a table, and when i click on a row, i want the cells details to be filled into a form: so simple example <table id="table"> <tr><td class="field1">1 </td><td class="field2">2 </td></tr> </table> <input id="input" type="text" /> So the JQuery: $(d...

<optgroup label='-------'></optgroup> gives xhtml validation eror

Error: End tag for 'optgroup' which is not finished. You have probably failed to include a required child element. Hence the parent element is "not finished", not complete. I want to achieve something like this in select options. USA UK -- Afghanistan I want to put few important countries on top and then a non-selectable divider ...

how to find the height of html content

Hi, I am trying to display 10 html pages as a single document,with 10 chapters. I am using Webkitgtk+ engine to render the HTML pages. I am getting the content of each html files and concatenating all of them to create a single 'char *content' and using webkit_web_view_load_html_string(WebKitWebView *web_view, ...

ordered list does not work on IE7 (<ol><li).

Hi all, I am trying to create an ordered list on IE7 but for some reason does not work. Does anybody knows why this can be? Update The issue is that I cant see the numbers, thanks. Thanks. eg. <ol> <li></li> <li><li> </ol> Update As an example I saw this page where if you look at it on IE7 you wont see de numbers, but if you lo...