html

Rendered pIxel width data for each character in a browser's font

I have a table column that needs to be limited to a certain width - say 100 pixels. At times the text in that column is wider than this and contains no spaces. For example: a_really_long_string_of_text_like_this_with_no_line_breaks_makes_the_table_unhappy I would like to calculate the width of text server-side and add an ellipsis aft...

Textarea overflow-x when a user copy-pastes into it?

Hi, I have a textarea with overflow-x: auto; attributed to it. It works great when a user is typing text into the box by hand. When a user copy pastes a line from a file, however, that is bigger than my textarea, the overflow-x property does not work, instead the textarea wordwraps the long line. Is there a way (maybe javascript) to ma...

Wiki style text formatting

Hi, I'm looking for some kind of text-parser for ASP.NET that can make HTML from some style of text that uses a special format. Like in Wiki's there is some special syntax for headings and such. I have tried to look on google, but I did not found anything for .NET. Do someone know about a library for .NET that can parse the text to HTM...

AJAX and the Browser Back Button

I run a browser based game at www.darknovagames.com. Recently, I've been working on reformatting the site with CSS, trying to get all of its pages to verify according to the HTML standard. I've been toying with this idea of having the navigation menu on the left AJAX the pages in (rather than taking the user to a separate page each time...

Ajax versus Frames

In light of how ajax is actually used by most sites today; why is ajax embraced while frames are still regarded as a bad idea? ...

Testing onbeforeunload events from Selenium

I'm trying to write a Selenium test for a web page that uses an onbeforeunload event to prompt the user before leaving. Selenium doesn't seem to recognize the confirmation dialog that comes up, or to provide a way to hit OK or Cancel. Is there any way to do this? I'm using the Java Selenium driver, if that's relevant. ...

Character offset in an Internet Explorer TextRange

As far as I can tell there's no simple way of retrieving a character offset from a TextRange object in Internet Explorer. The W3C Range object has a node, and the offset into the text within that node. IE seems to just have pixel offsets. There are methods to create, extend and compare ranges, so it would be possible to write an algorith...

Printing Labels from ASP.Net Page

I am working on an ASP.Net web application that must print dynamically created labels on standard Avery-style label sheets (one particular size, so only one overall layout). The labels have a variable number of lines (3-6) and may contain either lines of text or a graphic barcode image. Our first cut, that I inherited, used monospaced f...

How can I set the focus inside the Yahoo Rich Text Editor

I have a an HTML form which contains the YAHOO rich text editor on it. When I display the form I want the YAHOO editor to have focus so that the cursor is ready to accept input without the user having to click on it or tab into it ...

Insert a Link Using CSS

I'm hand-maintaining an HTML document, and I'm looking for a way to automatically insert a link around text in a table. Let me illustrate: <table><tr><td class="case">123456</td></tr></table> I would like to automatically make every text in a TD with class "case" a link to that case in our bug tracking system (which, incidentally, is ...

How do I get the contents of the "title" tag in the element "span" with jQuery?

Hey all, I have a "span" element inside a "table" "td" element. The span tag has a Title. I want to get the title of that span tag and pull it out to make it the "mouseover" tip for the "td" element. For example: I want to turn this: <td> <a href="#"><span id="test" title="Acres for each province">Ac...

How to add a Tooltip to a "td" with jquery?

I need to add a tooltip/alt to a "td" element inside of my tables with jquery. Can someone help me out? I tried: var tTip ="Hello world"; $(this).attr("onmouseover", tip(tTip)); where I have verified that I am using the "td" as "this". Edit:I am able to capture the "td" element through using the "alert" command and it w...

Opinion: in HTML, Possible Duplicate IDs or Non-Standard Attributes?

It seems pretty common to want to let your javascript know a particular dom node corresponds to a record in the database. So, how do you do it? One way I've seen that's pretty common is to use a class for the type and an id for the id: <div class="thing" id="5"> <script> myThing = select(".thing#5") </script> There's a slight html s...

how can I scale the content of iframe

how can I scale the content of iframe (in my example is an html page), and is not a popup is in page of my web site? So I want for example to put the content that appears in iframe in for example 80% of the real size. Can someone help me please.... Thanks (question scraped from http://www.htmlcodetutorial.com/help/sutra32209.html) ...

Chinese Characters displaying in IE7+

The Problem: Chinese characters aren't displaying correctly in IE7+. They are displaying in Firefox 3, Chrome, Opera 9.5, and IE6. Example: Transportation Scroll down to the footer on the page, click on "Translate This page" and the second option in the select box should be the Chinese characters. ...

How do you right-justify text in an HTML textbox?

I have a need to display many numerical values in columns. These values need to be easily editable so I cannot just display them in a table. I am using textboxes to display them. Is there a way for me to right-justify the text displayed in a textbox? It would also be nice if when the user is entering data for it to start displaying what ...

XSLT Abstractions

I'm exploring the XML -> XSLT -> HTML meme for producing web content. I have very little XSLT experience. I'm curious what mechanisms are available in XSLT to handle abstractions or "refactoring". For example, with generic HTML and a service side include, many pages can be templated and decomposed to where there are, say, common header...

Will targeting IE8 with conditional comments work?

When IE8 is released, will the following code work to add a conditional stylesheet? <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="ie-8.0.css" /> <![endif]--> I've read conflicting reports as to whether this works with the beta. I'm hoping someone can share their experience. Thanks. ...

What is the simplest way to allow a user to drag and drop table rows in order to change their order?

I have a Ruby on Rails application that I'm writing where a user has the option to edit an invoice. They need to be able to reassign the order of the rows. Right now I have an index column in the db which is used as the default sort mechanism. I just exposed that and allowed the user to edit it. This is not very elegant. I'd li...

How do I show an embedded excel file in a WebPage?

I want to allow an Excel report to be viewed embedded in a WebPage... is there a way? I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application. I don't want users to download and then open it. Using an iframe wouldn't be a problem, but my preliminary t...