html

Faster alternative to jQuery's .html function?

I was wondering if there is an alternative to the jquery .html(variable) function? It seems to be quite slow and also freezes while inserting the html into the DOM. I tried using innerHtml, and that works great, extremely fast as well. But for some reason, when I have any jquery or MS ajax in the code that is inserted, those scripts ONL...

What happens if you use a <script> tag with the same "src" attribute multiple times within a single HTML document?

Although I am almost certain the answer to this question will be browser specific, do any of the browsers define behavior for when multiple <script> tags are used and have the same src attribute? For instance... <script src="../js/foo.js"></script> ... <!-- what happens here? --> <script src="../js/foo.js"></script> The reason I ask...

Input Type=Image "On" without onclick event

I have a form with an input type=image. It used to have a confirm in its onclick that returned true/false allowing/stopping the form submit. I've recently 'upgraded' to a non-modal dialog with a callback handler. Since the callback handler is non-modal, the return value to the input is always false, don't submit... When I submit upon...

Randomize a sequence of div elements with jQuery

Hello all, I'm trying to do my frist steps with jQuery but I have some trouble to understand how to find a list of child elements from a div parent element. I'm used to work with ActionScript 2 and ActionScript 3 so i could mistake some concept, like what is the better way to randomize a sequence of div elements with jQuery! I have this...

JS: How to dynamically insert text into a SPAN?

Without using any JavaScript frameworks, how do I dynamically change the text within a SPAN element. I know how to do this with a DIV, it would be the following: document.getElementById('myDiv').innerHTML = '...' What's the equivalent of this for a SPAN element? ...

jquery Getting rid of dotted outline around buttons

I'm trying to get rid of the dotted outline that appears in FF when you click an input of type button. This outline doesn't appear in Chrome. I've tried: .button { border:none; outline:none; } .button:active { border:none; outline:none; } .button:focus { border:none; outline:none; } None of these work. Anyone ...

Compatability problem on Mac browsers*

Hey everyone, I'm designing a little website ( you can see it here ) but I'm getting conflicts with something going from Mac based web browsers to PC based browsers. It seems to pop up on all Mac browsers and not on PC browsers. I have tested on Safari and Firefox on the Mac and Firefox/IE on PC. The image on the left is from a PC, the...

How to automatically resize popup window or modal dialog for content change

I have an iframe that can appear in a jQuery modal dialog, a popup window, or just as part of a page. The height of the content of this iframe can change as elements appear and disappear, and I need the containing iframe, along with the modal dialog or popup window where applicable, to change height as necessary to be 'just right' for t...

Perl formatting (i.e.sprintf) not retained in html display

I have ran into a bit of problem. Originally, I have the following input of the format: 12345 apple 12 orange I saved the first column as $num and second column as $fruit. I want the output to look like this (see below). I would like for the output to align as if the $num are of all the same length. In reality, the $num will c...

Htmlnode collection and parsing

Hi, I'm trying to extract the text contained in a webpage. So that I'm using a third pary tool Html Agility Pack. In that they mentioned HtmlWeb htmlWeb = new HtmlWeb(); HtmlDocument doc = htmlWeb.Load("http://www.msn.com/"); HtmlNodeCollection links = doc.DocumentNode.SelectNodes("//a[@href]"); foreach (HtmlNode link in links) { Resp...

View webpage in Hebrew language

hi, I have a website with few HTML pages. How can I display them in the Hebrew language? What are the steps that I should follow to ensure it is viewed in different languages for different countries? Thanks ...

Prepend .css file - Firefox vs IE

I found out IE has different behavior vs Firefox when I use this $('head').prepend(''); That basically just to add the theme-2.css on top within HEAD tag (for theme purpose). I do that because I don't want it to load yet because I use the csspreload http://www.filamentgroup.com/lab/update%5Fautomatically%5Fpreload%5Fimages%5Ffrom%5Fcss...

How can I group H1 to H6 in CSS?

Can I apply a CSS style to all headers from H1 to H6? ...

What percentage of followed hyperlinks might have their "onclick" JavaScript ignored?

As far as I know all popular web browsers execute the onclick attribute of an anchor link first, then follow the path specified by the href attribute. The problem here is that the onclick attribute only gets called when clicking with the left mousebutton (without pressing ctrl or shift for a new tab or window) or when pressing enter on ...

link order in css

Whats the correct order of styling the <a> element (link, visited, hover, active). All are confusing by providing different combination like LVHA, LAHV. Can anybody specify the correct ordering? ...

What is the best tool to allow web users to create flowcharts/diagrams?

I'm creating a web application in which teachers need to be able to easily create educational diagrams, flowcharts, basically: boxes and circles with text in them text labels ability to upload and embed graphics easy to make lines with arrows, etc. lots of ready-made icons and clipart would be nice free and opensource would be nice B...

Change cursor type on input type="file"

Simple question... How do I change the cursor type on a file input type? I've tried the following: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html> <head> <style> input[type="file"] { cursor: pointer; } </sty...

box using HTML/CSS but is open at the top right?

I have a div which has style properties as "border-top, left, right, bottom" set. But I do not want the border top to complete the box (which would be a rectangle). I want a small (About 2-3px) opening at the top right (on the length side of the box). How can this be done? I think there is a property in CSS called "border-top-width" ...

Web page finished loading before all images are completed

Hi, After the release of the new web site I've developed I have a strange case with the images on the site. It seems like the page is finished loading before all images are completed. The images is located on another server using samba to share the images. Could this connection be to slow? On my development server this worked out all...

How should page and author information be displayed in the sourcecode of html pages?

I'm creating web pages (html) every day, but I would like the pages to have a comment in the source code. In php you can set something like this /** * this is the info on the page * @param x * @author me */ Is there a similar standard that is used to set comments in html pages? I would like to specify at least these options: inform...