html

insert html listbox items from database

how do i insert items into an html listbox from a database? im using asp c#. i cant make the listbox run at server because the application wont work if i do that. so i have to insert values from a database into an html listbox. I just need to display 1 column of data. cheers.. ...

Why did my <OBJECT> fail to load?

I have an HTML document that is using to embed a control. In some cases, IE fails to load the control in the tag and loads my alternative text. Only problem... I don't know why it is failing. It doesn't show up as an error in the exclamation in the lower-left. I overrode the window.onerror method, but that didn't get fired. I see ...

Safari Frames Invisible Scrollbar

I'm working on a website that uses not just frames, but frames within frames (ew, I know, but I don't get to choose). It actually works ok most of the time, but I'm running to a problem with some of the frames within frames on Safari (only). Some of the two-deep frames render in Safari with a small space on the right-hand side of the f...

How can I get a div to fill a table cell vertically?

As a followup to this question on absolute positioning within a table cell, I'm trying to get something working in Firefox. Once again, I'm about 95% there, and there's just 1 little thing that's keeping me from declaring victory. Using the follow sample markup: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www....

How to use javascript to swap swf in html?

Hi all, I embedded a swf in my html page, but I would like it to swap to another swf when I clicked on a button in html. I used swfobject.js to embed the swf, and I use prototype to write the javascript. I thought I can just do this $('movie').value = 'swf/bhts.swf'; alert($('movie').value); the value did change to swf/bhts.swf, but ...

Retreiving AlternateView's of email

I can't seem to retrieve the AlternateView from System.Net.Mail.AlternateView. I have an application that is pulling email via POP3. I understand how to create an alternate view for sending, but how does one select the alternate view when looking at the email. I've have the received email as a System.Net.MailMessage object so I can ea...

Best Way to Embed PDF in HTML

What is the Best Way to Embed PDF in HTML? iFrame? Object? Embed? Adobe pronounces itself about it? Supose that the PDF was generated on the fly, so it can't be uploaded to a thrid-party solution prior to flushing it ...

ASP.NET Create style of nav menu like windows.com

I'm newbee in asp.net. Just noticed that the style of the navigation menu on windows.com is just what i need for my website. I'm wondering how to create that kind of drop down list that has multiple columns. When the mouse hover on each item, the column gives a preview of that item. Thank you. ...

Deleting all tables in HTML with JavaScript

How can I delete all the tables in a web page? The tables don't have any ids associated with them. ...

excluding characters in \S regex match

I have the following regex expression to match html links: <a\s*href=['|"](http:\/\/(.*?)\S['|"]> it kind of works. Except not really. Because it grabs everything after the < a href... and just keeps going. I want to exclude the quote characters from that last \S match. Is there any way of doing that? EDIT: This would make it grab on...

JavaScript for HTML Form

I'm a simple soul with simple needs, and I'm trying to configure a form. I detest forms. It needs to have JavaScript to transfer the data, it needs to send an e-mail with the data to an e-mail address, and it needs to redirect visitors to a pdf. CGI has always been confusing to me, and I don't know much JavaScript. I've already done ...

Regular expression to remove empty <span> tags

Hello, I would like such empty span tags (filled with &nbsp; and space) to be removed: <span> &nbsp; &nbsp; &nbsp; </span> I've tried with this regex, but it needs adjusting: (<span>(&nbsp;|\s)*</span>) preg_replace('#<span>(&nbsp;|\s)*</span>#si','<\\1>',$encoded); Cheers. ...

Browser application & local file system access

I want to enhance my browser-based web application with functionality that enables management of local files and folders. E.g. folder tree structures should be synchronized between local workstation and server via HTTP(S). I am aware of security-related limitations in browser-based applications. However, there are some techniques that "...

Identifying list item index - which is a better approach?

I need to pick up list items from an list, and then perform operations like adding event handlers on them. I can think of two ways of doing this. HTML: <ul id="list"> <li id="listItem-0"> first item </li> <li id="listItem-1"> second item </li> <li id="listItem-2"> third item </li> </ul> Using the IDs- ...

Robust, Mature HTML Parser for PHP

Are there any robust and mature HTML parsers available for PHP? A quick skimming of PEAR didn't turn anything up (lots of classes for generating HTML, not so much for consuming), and Google taught me a lot of people have started and then abandoned a variety of parser projects. Not interested in XML parsers (unless then can consume non-...

Is there really any point to using relative font sizing in CSS?

I've read a lot about the pros and cons of sizing with either relative or absolute font sizes. Fixed sizes don't zoom in IE6 but that's not much of an issue these days. Accessibility is important, but I assume that all good accessibility software is built to deal with these issues? I guess it mainly comes down to whether you want to be ...

HtmlAgilityPack Drops Option End Tags

I am using HtmlAgilityPack. I create an HtmlDocument and LoadHtml with the following string: <select id="foo_Bar" name="foo.Bar"><option selected="selected" value="1">One</option><option value="2">Two</option></select> This does some unexpected things. First, it gives two parser errors, EndTagNotRequired. Second, the select node ha...

How do I fix wrongly nested / unclosed HTML tags?

I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc. For example, something like <p> <ul> <li>Foo becomes <p> <ul> <li>Foo</li> </ul...

Display confirmation popup with JavaScript upon clicking on a link

How do I make one of those hyperlinks where when you click it, it will display a popup asking "are you sure?" <INPUT TYPE="Button" NAME="confirm" VALUE="???" onClick="message()"> I already have a message() function working. I just need to know what the input type for a hyperlink would be. ...

How can I populate another dropdown with the onChange event of the first dropdown?

Hi, with jquery, or with simple just javascript, I want to populate a 2nd dropdown from the choice of the first dropdown. The value of the first dropdown is the condition to get rows for the second dropdown. How does the onChange event look like? ...