html

Is there a better HTML escaping and unescaping tool than CGI for Ruby?

CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('…') # => "…" # correct - an ellipsis CGI.unescapeHTML('…') # => "…" # should be "…" CGI.unescapeHTML('¢') # => "\242" # correct - a cent CGI.un...

How to post the selections of an HTML List Box with multiple selected values

I have a listbox on an HTML form with a Submit button. The listbox has multiple selection enabled. I am able to select multiple values in the listbox, but I don't know how to figure out what values were selected when the form is submitted. Also, I am adding user generated values to the list box dynamically using JavaScript, and I woul...

Is there a tool that will find html tags with class attributes that don't have a corresponding class in CSS?

I have found http://www.sitepoint.com/dustmeselectors/ which does about the opposite of what I want, identifying selectors in CSS that aren't used in HTML. I want a tool that will find elements that have a class attribute but the class isn't defined in any CSS being loaded by the page. Thanks ...

Can you nest html forms?

Is it possible to nest html forms? Like so: <form name="mainForm"> <form name="subForm"> </form> </form> So that both forms work? My friend is having problems with this, part of the subForm works, while part of it does not. Thanks ...

How common is it for Javascript to be disabled

I see lots of JavaScript advice centered around making sure your web application still works when JavaScript is disabled. But is that still an issue? What percentage of people do that? And are they are large enough group to actually care about? I'm being asked to create more interactive pages by my customers (a la AJAX and JQuery for m...

Dynamic Floating window by javascript

Hi Friends, I want to build a dynamic floating window with close button at corner. Is it possible, and also i want to add some content dynamically into that window. Please help me.. It should be in javascript.. Better without AJAX.. Thanks in Advance ...

Better interface for file downloads and uploads from a web page?

I have what seems like a typical usage scenario for users downloading, editing and uploading a document from a web page. User clicks a link to download a document User edits downloaded file User saves the file User goes back to the web page and uploads the new file with the changes The problem is that downloaded files are typically s...

Has anyone got a solution for the problem <asp:treeview /> != <ul><li></li></ul>

I'm using the asp:TreeView and would really rather just output it to a standard nested <HTML> list using <ul> and <li>, at the moment it produces some pretty ugly code using <div>s and <table>s. Has anyone got a decent workaround? I'm using <asp:XmlDataSource> to populate the TreeView This explains the current situation very well. ...

Use Javascript to change which submit is activated on enter key press.

I have a form on an HTML page with multiple submit buttons that perform different actions. However, when the user is typing a value into a text input and hit enters, the browsers generally act as though the next submit button sequentially was activated. I want a particular action to occur, so one solution I found was to put in invisible ...

YUI Button misalignment

Im using YUI and am having alignment problems with YUI buttons inline with text input fields. The rendering problem is occuring in FF3 and is even present on YUI's own site. http://developer.yahoo.com/yui/examples/button/btn_example09.html As you can see the button sits higher than the text fields. Any ideas on how to get it all at t...

IE7 missing Atom feed autodiscovery

I've been showing a website to a customer who insists on using IE and found out, to my surprise, that IE7 does not autodiscover the Atom newsfeed. The feed is linked to within the HEAD element of a valid HTML 4.01 Strict page with <link rel="alternate" type="application/atom+xml" href="atom.xml" title="Atom 1.0">, the link is pointing t...

Direct Email Link no need to outlook

Hi How can I have a link for submit an email directly? I don't want to use outlook to send email. I want to post email by clicking on submit button without open outlook eexpress and use it. ...

Acceptable website navigation methods?

In the past I have created websites with navigation that is aided by php $_GET variables. There was a layout that was implemented, and then content that was included based on the variable passed into the URL. I am now creating a website without any server-side help. I am wondering what are good ways to navigate pages without the redunda...

Correct way to write lists

This is something I've pondered over for a while, as I've seen both used in practise. Method 1 <ol> <li>List item 1</li> <li>List item 2 <ol> <li>List item 3</li> </ol> </li> <li>List item 4</li> </ol> This seems semantically correct to me, since the sub-list is a sub-list of that list item...

div tags-on and off

Should be super simple for you guys...div one gets clicked, div two appears. What I don't know how to do is make div 2 go away when div one is clicked again. <img src="/..." width="" height"" onClick="MM_showHideLayers('logo','','show','logoEasterEgg','',show')"> What should I add to this line of code to make the div 'logoEasterEgg' d...

CSS Expand Parent Div To Child Height

I have a page structure similar to this: <body> <div id="parent"> <div id="childRightCol"> <div> <div id="childLeftCol"> <div> </div> </body> I would like for the parent div to expand in height when the inner div height expands. Edit: One caveat is that if/when the width of the child content expands past the width of ...

Good 'ole Internet Explorer Problems

I'm running into some little glitch on Internet Explorer. The site looks like it should in Firefox (http://i27.photobucket.com/albums/c190/blcArmadillo/FirefoxView.jpg). But when I load it in Internet Explorer the background from my top bar seems to be applied across the site as you can see in this screenshot: http://i27.photobucket.com/...

What is the best way to determine which source files are no longer needed?

I am now responsible for a Rails application that was built in a very quick-and-dirty fashion. It has many view files (html templates) that are not used. It also has many css files that are not used. What is the best way to determine which files are no longer needed so they can be deleted? I'm looking for a generic solution and not a R...

Simple web page layout and templating in PHP

In the past I've written sites in ASP.NET just to get nice reusable templating via master pages (layouts) and user controls (partials). I'm talking about sites that have no more complicated code in them than simple variable substitution in templates - I'm just using it to keep my HTML organized. It's great to be able to define the basic ...

javascript options selected IE6 vs. FF2

the following js works fine in FF2 but in IE6 the dropdown always selects one option to early, IE -> testix2 vs. FF2 -> testix3 If we add an alertBox somewhere in the script, it also works fine in IE6. But how to solve this without an alertBox? tia <script language="JavaScript" type="text/javascript"> <!-- function Entry(value, name, s...