html

How to clear the content of an IFRAME?

How do I clear the content of my IFRAME element, using javascript, without loading a blank page into it? I can figure out to do this: iframe_element.src = "blank.html", but there must be a better, instant, method. ...

Change table based on dropdown box selection

I need to be able to have the displayed table change based on the drop down menu item selected. I have no idea what to write in javascript. The code I have so far is: JS: //change table viewed $("#view").change( function (event) { $.getJSON('view.php?view=' + $(this).val(), function (json) { }); }); HTML: <div> ...

HTML validator for Win32?

Does anybody know a fast, free local HTML validator to copy-and-paste code in, that shows errors directly on their respective lines? ...

How to show scrollbar in Swing's JOptionPane.showOptionDialog?

Hi, In our Swing application, we show error messages using JOptionPane.showOptionDialog. However, some of the messages are long and we would like to limit the height of the dialog and show a scrollbar. We thought of using HTML and CSS in the dialog text to limit the height and show scrollbar, but it seems Swing's HTML & CSS is quite limi...

Masking &amp; for AJAX requests

This is a follow-up to a question I asked a few weeks back. The following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <title>Test</title> </head> <body> <a onclick="start_ajax_request('url.php&key1=val1&key2=val2&key3=val3')">Test</a> </body> </html> ...

How to add non-standard attributes in a valid way

Is there a way to have non-standard attributes like onselectstart oncontextmenu ... in a tag, and still pass validation as HTML 4.01 transitional somehow? Apart from adding the properties later on using Javascript. ...

HTML data entry

I have gotten a project on my desk. It involves updating the bios for a bunch of people, however, my boss does not want into a database (I think that would be the best solution but lets not go there). Although, he never said anything about flat files! :) So, my solution would be to create a PHP page with some form elements with like "Ed...

How to add a full-sized image to the center of a webpage using jQuery?

The way I have my site setup is that I have a grid of thumbnails that is sized based on the user's screen resolution and also has a scrolling mechanism in it. Another feature I'm trying to add is the ability to click on a thumbnail and have the image you clicked appear in the center of the screen at full size (or as close to full size a...

CSS randomly breaking?

Breaking in two senses, 1) Functionally breaking and 2) <BR>eaking to a new line. I have no idea what's causing this problem.. but randomly as I load divs of data with php, I'll get maybe 1 out of 10 to bust: I can't for the life of me figure this out. Has anyone experienced this before? It's not any specific column or row that's ha...

HTML Table Tag without the Thead Tag

Is the markup still valid if I try to use a table tag without the thead tag? ...

How to emulate the look of an off-white sheet of paper on a computer screen

Thanks for the comments below. In hindsight, I should have been more detailed. I hope the edited version is clearer. At a high-level, I want to emulate the look of paper as a screen background. This is because I find white (#FFFFF) to be too bright. I looked at a few hardcover books I own and noticed that none of them are bright white. ...

Do you use any tools for rapid html/css development?

I just heard about zen-coding, which basically is just a script that generates markup based on a css-esque selector, ex: div#foo > p*6 generates <div id="foo"> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> </div> Edit: Here's a more advanced example.. And PS - I'm not even going through any API, I'm total...

HtmlSpecialChars equivalent in Javascript?

Apparently, this is harder to find than I thought it would be. And it even is so simple... Is there a function equivalent to PHP's htmlspecialchars built into Javascript? I know it's fairly easy to implement that yourself, but using a built-in function, if available, is just nicer. For those unfamiliar with PHP, htmlspecialchars transl...

An easy way to display prototype nodes in PHP?

It's a kind of UI second flavor, function UISecond($elements) { } So that this functions shows the specified elements(with name,id and type) which is neccesary,but not too picky about how exactly it's displayed. EDIT Give it an array,output the HTML. Anyone has tried this? EDIT AGAIN I want to develop a render engine like drupal...

Detect actual form change?

Is there a ready-made way (maybe in one of the frameworks) to detect whether a form has changed compared to its original values? The onchange event won't do, because it fires regardless of actual change (I could for example tick a checkbox on, and off again, with two onchange events). The last resort would be to store each element's o...

Wrapping text within a multiple <select> list

I want to give the user the ability to select multiple elements (which happen to be about a paragraph each). The problem is that a standard select multiple in html is (as far as I can tell) a single line per choice. This is a problem as the layout gets very screwy if I let the line go long. Also, if I just truncate the line, the main ...

What does this snippet mean?

It's what I see in page.tpl.php of Drupal,but I don't understand. <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script> ...

how to store regions in a database field

i have a webbased tracking application and i am storing data in SQL server. I am tracking which locations i have deployed applications. The web interface is a dropdown combo and I have a varchar(100) field right now. I have the user select a dropdown list: Global America Europe Asia but now i have applications that are stored in m...

Is there an html entity equivalent of ▼?

Like &nbsp;. And what about other symbols? ...

html nested tables agility pack valid xpath

Assuming nested tables don't have unique attributes ( id , class or anything else ) to get the required one via doc.DocumentNode.SelectSingleNode("//table[@width='500']") Does XPath prohibit using table several times in its path ? foreach (HtmlNode table in doc.DocumentNode.SelectNodes("//table/tr/center/table")) throws excepti...