html

iPhone Full Screen Image

How do I go about making an image or section of the page full screen on the iPhone? I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page. Currently if I drop the image on a blank page and I open it up on the...

How to detect if JavaScript is disabled?

There was a post this morning asking about: How many people disable javascript. Then I began to wonder what techniques might be used to determine if the user has it disabled. Anyone know of some short/simple ways to detect if Javascript is disabled? my intention is to give warning that the site is not able to function properly without th...

Implementing User-Controlled Style Changes in ASP.NET

Ok, so we have clients and those clients get to customize their web facing page. One option we are giving them is to be able to change the color of a graphic (it's like a framish-looking bar) using one of those hex wheels or whatever. So, I've thought about it, and I don't know where to start. I am sending comps out this week to my xht...

Replace text inside a DIV element

I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available. <div id="panel"> <div id="field_name">TEXT GOES HERE</div> </div> Here's what the function will look like: function showPanel(fieldName) { var fieldNameElement = document.getElementById...

What to do when IE's moveToElementText spits out an Invalid Argument exception

We've written a plugin to the Xinha text editor to handle footnotes. You can take a look at: http://www.nicholasbs.com/xinha/examples/Newbie.html In order to handle some problems with the way Webkit and IE handle links at the end of lines (there's no way to use the cursor to get out of the link on the same line) we insert a blank eleme...

Is there a .NET equivalent of Perl's LWP / WWW::Mechanize?

After working with .NET's HttpWebRequest/Response objects, I'd rather shoot myself than use this to crawl through web sites. I'm looking for an existing .NET library that can fetch URLs, and give you the ability to follow links, extract/fill in/submit forms on the page, etc. Perl's LWP and WWW::Mechanize modules do this very well, but ...

Parse HTML links using C#

Is there a built in dll that will give me a list of links from a string. I want to send in a string with valid html and have it parse all the links. I seem to remember there being something built into either .net or an unmanaged library. I found a couple open source projects that looked promising but I thought there was a built in modul...

opening links in the same window or in a new (tab)

It has always been best practice to open links in the same window. Should that still be the rule now that most common browsers use tabs? Personally i prefer closing a tab/window over hitting the backbutton. What are your thoughts? ...

Underused Features of HTML

Yes, many web developers live and breathe HTML, but there are still tags and tricks that aren't used as often as they could be. What are some of your favorites? ...

Fixed TD height property in HTML

I can't make td "Date" to have fixed height. If there is less in Body section td Date element is bigger than it should be - even if I set Date height to 10% and Body height to 90%. Any suggestions? <tr> <td class="Author" rowspan="2"> <a href="#">Claude</a><br /> <a href="#"><img src="Users/4/Avatar.jpeg" style="border-width:0...

Can I use RegEx and VI (or something similar) to autofill some text for me?

NOTE: I am not set on using VI, it is just the first thing that came to mind that might be able to do what I need. Feel free to suggest any other program. I have a form with nearly 100 fields that I would like to auto-fill with PHP. I know how to do the autofill, but I would like to avoid manually adding the needed text to 100 fields. ...

How do I place HTML content above a Flash movie?

A site I'm working on has Flash headers (using swfobject to embed them). Now I'm required to code in a bit of HTML that's supposed to overlap the Flash movie. I've tried setting z-index on the Flash element's container and the (absolutely positioned) div but it keeps "vanishing" behind the Flash movie. I'm hoping for a CSS solution, b...

How to tell if a DOM element is visible in the current viewport?

Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport)? (The question regards Firefox) ...

How can I select an <img> element programmatically using JavaScript?

I have an <img> in an HTML document that I would like to highlight as though the user had highlighted it using the mouse. Is there a way to do that using JavaScript? I only need it to work in Mozilla, but any and all information is welcome. EDIT: The reason I want to select the image is actually not so that it appears highlighted, but ...

Python library for rendering HTML and javascript

Is there any python module for rendering a HTML page with javascript and get back a DOM object? I want to parse a page which generates almost all of its content using javascript. ...

How to force a web browser NOT to cache images

Background I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On that form I allow the administrator to upload an image related to t...

What guidelines for HTML email design are there?

What guidelines can you give for rich HTML formatting in emails while maintaining good visual stability across many clients and web based email interfaces? An unrelated answer on a question on Stack Overflow suggested: http://www.campaignmonitor.com/blog/archives/2008/05/2008_email_design_guidelines.html Which contains the following g...

Mouse Scroll Wheel and IFRAME

I have an IFRAME with a vertical scroll bar on a page with a vertical scrollbar. I would like to be able to scroll the IFRAME with the scroll wheel, but in IE7 and FF3, when I click the IFRAME and scroll, both the IFRAME content and Page scrolls, not just the IFRAME. Eventually, the IFRAME is no longer under the mouse Has anyone had t...

HTML: What's the effect of adding 'return false' to an onclick event ?

Many times I've seen links like these in HTML pages: <a href='#' onclick='someFunc(3.1415926); return false;'>Click here !</a> What's the effect of the return false in there ? Also, I don't usually see that in buttons. Edit: Is this specified anywhere ? In some spec in w3.org ? ...

Accessing created DOM elements

Hi, I have code to create another "row" (div with inputs) on a button click. I am creating new input elements and everything works fine, however, I can't find a way to access these new elements. Example: I have element <input type='text' id='name_1' name="name_1" /> I then create element <input type='text' id='name_2' name="name_2" /...