html

Dragging HTML cells over the table using Javascript

Folks, I need a solution that allows drag-and-drop cell over the table. The cells can be of different colspans, so when the cell is dropped into the middle of another cell, which is bigger, the following steps should be performed: Another td element is created, which is equal in width to the draggable element. Cells on left and righ...

I'm looking for a regular expression to remove a given (x)HTML tag from a string

Let's say I have a string holding a mess of text and (x)HTML tags. I want to remove all instances of a given tag (and any attributes of that tag), leaving all other tags and text along. What's the best Regex to get this done? Edited to add: Oh, I appreciate that using a Regex for this particular issue is not the best solution. Howeve...

What browser is best for testing web standards?

When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality. Knowing that none of the browsers have perfect standards adherence, which one comes closest? Also, are there any standards areas in which a single browser seems to specialize? Oper...

MySpace DOM?

Hi, I've been given the task of doing some work customizing an artist's space in MySpace. It seems that you sort of hack the HTML you want into your edit profile page (which has several empty boxes). The MySpace page, it seems, is already HTML so you can only hack into that. Suggested "tweaks" include incomplete HTML code (e.g., a <DIV> ...

Javascript to extract author/date from SVN keyword substitution

SVN keyword substition gives is not pretty. E.g., Last updated: $Date$ by $Author$ yields Last updated: $Date: 2008-09-22 14:38:43 -0400 (Mon, 22 Sep 2008) $ by $Author: cconway $" Does anybody have a Javascript snippet that prettifies things and outputs some HTML? The result should be more like: Last update: 22 Sep 2...

Scrape multi-frame website

I'm auditing our existing web application, which makes heavy use of HTML frames. I would like to download all of the HTML in each frame, is there a method of doing this with wget or a little bit of scripting? ...

Seam/JSF form submit firing button onclick event

I have a search form with a query builder. The builder is activated by a button. Something like this <h:form id="search_form"> <h:outputLabel for="expression" value="Expression"/> <h:inputText id="expression" required="true" value="#{searcher.expression}"/> <button onclick="openBuilder(); return false;">Open Builder</button> <h:...

Hyperlinking an image using CSS

I know this is probably the dumbest question ever, however I am a total beginner when it comes to CSS; how do you hyperlink an image on a webpage using an image which is sourced from CSS? I am trying to set the title image on my website linkable to the frontpage. Thanks! Edit: Just to make it clear, I'm sourcing my image from CSS, the C...

Best way to rotate content within a DIV using JavaScript?

For example, see the MySQL website. It's only going to be used to rotate through about 3-5 "ads" to noteworthy areas of the site. I'd like to have some kind of link control to backtrack to the other content (again, like the MySQL site). Google gives me a bunch of very easy to implement stuff for the rotation itself, it's the link control...

Best way to manipulate pages while embedding Webkit?

I'm using Webkit-sharp to embed Webkit into an application and I need to hook certain links to perform actions in my app rather than their normal action. I've considered using Javascript to iterate over the anchor tags and replace the ones that match with the proper link, but I'm wondering if this is the best way. Is there a preferred ...

Convert a UTF-8 string to/from 7-bit XML in PHP

How can UTF-8 strings (i.e. 8-bit string) be converted to/from XML-compatible 7-bit strings (i.e. printable ASCII with numeric entities)? i.e. an encode() function such that: encode("“£”") -> "&#8220;&#163;&#8221;" decode() would also be useful: decode("&#8220;&#163;&#8221;") -> "“£”" PHP's htmlenties()/html_entity_decode() pair d...

Is there ever a good reason to force opening a new browser window?

As a power web user, I know how to use my browser and it drives me nuts when web sites force me to open a new page. My mother, by contrast, just gets confused when this happens. At the end of a web session, she closes the current browser window and wonders where all these other browsers came from. Some companies I've worked with have ...

What is semantic markup, and why would I want to use that?

Like it says. ...

What are the "must have" features for a XML based GUI language

Summary for the impatient: What I want to know is what you want to have in a new gui language. About the short answers mentioning $your_favorite_one; I assume you mean that, such a language should look like $your_favorite_one. These are not helpful. Resist the temptation. I'm thinking on the user friendliness of XML based languages suc...

What's the best way to introduce non-majors to HTML / programming?

The following question has been eating at me for the last couple months. After witnessing the quality of the replies here, I'm hopeful that I'll get some great responses here. I'm TAing a course in the ECE department entitled "Exploring Digital Information Technology", intended for non-majors to get their feet wet with the whole "how c...

How can I extract the data out of a typical html day/time schedule?

I'm trying to write a parser to get the data out of a typical html table day/time schedule (like this). I'd like to give this parser a page and a table class/id, and have it return a list of events, along with days & times they occur. It should take into account rowspans and colspans, so for the linked example, it would return {:event...

What tools allows me to keep track of html tags when doing web development?

What tools allows me keep track of tags when doing web development? For example, I would like to be able to quickly find whether I missed closing a div tag. At the moment I am using notepad++ to write html. It highlights starting and ending tags, but it can take me time to review almost all tags to find where I went wrong. ...

Highlight a word with jQuery

I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word "dolor" in this text: <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. </p> <p> Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero. Aliquam rhoncus eros at augue. Suspendisse vitae...

Select tag's size attribute through css?

Normally you can do this: <select size="3"> <option>blah</option> <option>blah</option> <option>blah</option> </select> And it would render as a selectionbox where all three options are visible (without dropping down) I'm looking for a way to set this size attribute from css. ...

XSS Blacklist - Is anyone aware of a reasonable one?

As a temporary quick fix to mitigate the major risk while working on the permanent fix for XSS Vulnerability in a very large code base, I'm looking for a pre-existing XSS prevention blacklist that does a reasonable job of protecting against XSS. Preferably a set of Regular Expressions. I'm aware of plenty of cheat sheets for testing and...