html

How to make floating divs fill up space

Hi, I'm trying to create a "workflow" bar on a web page. The items in the workflow might be of different lengths. There might be enough items to fill the width of the screen, hence the flow needs to wrap onto the next line. I'm using left floating divs to do this. However, I'd like the divs to take an appropriate amount of screen w...

Why is this regex returning errors when I use it to fish img src's from HTML?

I'm writing a function that fishes out the src from the first image tag it finds in an html file. Following the instructions in this thread on here, I got something that seemed to be working: preg_match_all('#<img[^>]*>#i', $content, $match); foreach ($match as $value) { $img = $value[0]; } $stuff = s...

Embed Tag in HTML - How can I know in Javascript that the .wav file is done playing?

Right now I'm trying to add a button to a webpage that when pressed will start playing a .wav file by dynamically adding an embed tag to the DOM. The text switches to "Stop" while the sound plays, and I'd like to be able to switch it back automatically to "Play" once the file has finished playing. How would I be able to execute some Jav...

Disabling button with javascript: FF vs IE

I have a row of buttons, which all create a pdf file which I want to open in a new tab. This way the button page stays on top, and the pdf's open to get printed. To prevent clicking a button twice I disable the button, like this (I use python): <input type='submit' value='Factureren' name='submitbutton' id='%s' onclick="javascript:docum...

What is the most efficient way to create HTML elements using jQuery?

Hi guys, Recently I've been doing a lot of modal window pop ups and what not, for which I used jQuery. The method that I used to create the new elements on the page has overwhelmingly been along the lines of: $("<div></div>"); However, I'm getting the niggling feeling that this isn't the best or the most efficient method of doing th...

J2ME Html renderering

Does anyone know of an HTML rendering library for MIDP 2.0? I need to render HTML inside my application, no Javascript support required but potentially complex HTML and CSS. The only option I've found so far is PocketLearn, but I'm keen to try others. ...

autocomplete user/password in firefox

Hi, I've created a login submit form in HTML but for some reason user/password autocompletion does not work like I expect in firefox. This is what happens in Firefox: I give username and password and click on the login button Firefox prompts me if I would like to remember the password. I press 'remember' and login works. (I made sure...

Extracting text from HTML file using Python

I'd like to extract the text from an HTML file using Python. I want essentially the same output I would get if I copied the text from a browser and pasted it into notepad. I'd like something more robust than using regular expressions that may fail on poorly formed HTML. I've seen many people recommend Beautiful Soup, but I've had a ...

Need a regex to add css class to first and last list item

UPDATE: Thank you all for your input. Some additional information. It's really just a small chunk of markup (20 lines) I'm working with and had aimed to to leverage a regex to do the work. I also do have the ability to hack up the script (an ecommerce one) to insert the classes as the navigation is built. I wanted to limit the number ...

iframe shifts 1 pixel to left on some browser sizes

i have code like, sorry i dont have the exact code now. but its valid. <iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"></iframe> the target is a html file that contains code for a banner. everything displays well. but when i resize browser or go to maximize. the content is shiftet to the left by 1 pixel. s...

HTML and CSS for newbie

I wanna start HTML and CSS. Did you guys have any idea about how and where to start? Thanks ...

How to apply a line wrap/continuation style and code formatting with css

When presenting preformatted text on the web (e.g. code samples), line wrapping can be a problem. You want to wrap for readability without scrolling, but also need it to be unambiguous to the user that it is all one line with no line break. For example, you may have a really long command line to display, like this: c:\Program Files\My ...

Difference between selectitem and selectitems tags

What is the difference between the selectitem and selectitems tags in jsf? ...

error outputting html with javascript

Hello, I have this php code, with which I am trying to generate a popup window that will contain the contents of a html file, however after adding in the script tags, no html is displayed. I tried echoing out $row2, but the word array is printed to the screen and nothing else. <?php session_start(); if (isset($_GET["cmd"])) $cmd = $_...

How do you disable caching on Modal dialogs in IE?

We have implemented a popup window as a modal dialog using the IE method: window.ShowModelDialog(...aspx) The target of the popup window is itself an ASP.Net web page. Assume for the following steps that the popup has never been launched: Launch popup. Page_Load event handler executes on server side. Close popup. Immediately launch...

html links in c# textbox

How can I put a link in a c# textbox? I have tried to put html tags in the box but instead of showing a link it shows the entire html tag. Can this be done with a textbox? Thanks ...

Is it possible to hide the scroll bar on an HTML textarea element ?

Is it possible to hide the scroll bar on an HTML textarea element using CSS or any other means ? ...

How to resize html canvas element?

I have a canvas element defined statically in the html with a width and height. If I attempt to use JavaScript to resize it dynamically (setting a new width and height - either on the attributes of the canvas or via the style properties) I get the following error in Firefox: uncaught exception: [Exception... "Illegal operation on Wra...

Can't make my slice from the HTML link repeat to extend

I have attempted to insert an html image withing an email (Outlook) to save as a template. I am finding that there is a slice that should repeat is not working correctly (to have the color extend to where the text ends). Is there someone who may be able to assist me in this matter? Below is the coding that I am using. <HTML> <HEAD>...

How can I switch a text box for a <label>, <div>, or <span> using jQuery?

I'm trying to "single source" a form page which can be in edit mode or view mode. For various reasons, this isn't using the ASP.Net FormView or DetailsView controls. Since there is no way to disable a textbox without turning its contents gray (well, we could "eat" all of the keystrokes into it, but that isn't very elegant either) and di...