html

Without knowing good X/HTML we can't use css properly optimize way.....

Without knowing good X/HTML we can't use css properly optimize way..... How to give some example and argument in favor of this... to web-design student Who are trying to learn css more but doesn't know how to use all HTML tag wise-full to work with CSS better. ...

Count html links in a string and add a list

Hi. I store the content of a website in a string $html. I want to count all html links that link to a file in the .otf format, add a list of these links to the end of $html and remove the original links. An example: <?php $html_input = ' <p> Lorem <a href="font-1.otf">ipsum</a> dolor sit amet, consectetur <a href="http://ww...

altering locale settings of system/browser to test javascript functions

I'm writing a small JavaScript function to generate a date selector for use in various languages. I want to test the JavaScript date functions toUTCString, toLocaleString, toLocaleDateString in english, french, german, italian and spanish. How do I affect the locale settings that are used by the date object. I've tried changing my windo...

How to left-align all table cells but the last one?

I have a table with 1 row and 5 columns. I have fixed the width of those 5 columns to certain known values (150px, 200px etc..). I have also set the left-margin for each one. I want the table to widen and occupy the entire width of its parent. So, I set its width to 100%. When the table is wider than the combined width and margins of th...

Making an svg image object clickable with onclick, avoiding absolute positioning

I have tried to change the images on my site from to svg, changing img tags to embed and object tags(standard procedure, i think). But, implementing the onclick function, which previously was contained in the img tag is proving most difficult. I found onclick had no effect when placed inside the object or embed tag. So, I made a div ex...

HTML File input JS events

Hello, Are there any JavaScript events in type=file input? I.E. I would like to add an extra file input upon selecting file in one of allready created: Diagram:] : file input 1 file input 2 file input 3 user selects some file in input 1 and JS adds new file input file input 1 - somefile.txt file input 2 file input 3 *NEW* file inpu...

Changing the position of a li element with a given class inside an ul ?

Hello people, I have a ul with several li elements, one of them will always have the class "active". How can I make the li.active element to always appear on top of the list? I cant't control the html output that produces this list, so I would have to do this with css (preferably) or javascript/jquery. I guess there is not a way to do ...

Ideas and solutions for validating this form is wanted...

I have a form which I need to validate the easiest and most safe way. This is for a classifieds website! Now, I have several categories which the user may chose from, and then with javascript I display subcategories depending on which category is chosen. The subcategories are actually DIV:s which have their display property set to eithe...

css/html: vertical div-alignment-Problem (added live-demo)

Hi! I have a problem with aligning some divs in this case: <div id="preamble" style="margin-bottom: 100px;">Preamble</div> <div id="container" style="position: relative;"> <div id="content" style="position: relative; margin-top: 50px;"> Content </div> </div> (Of course this is only an example that reproduces the behav...

Check if Variable in array javascript

Short code for checking if a variable also exists inside an array is needed. Im thinking something like this: var category='cars'; if (in_array(category, some_array)){ do stuff! } Is there any such function in js? Thanks ...

start /stop jquery menu

when using jgrowl and if we invoke the following to close all the menus $.jGrowl(data); $.jGrowl('shutdown'); How to start it back. The following gives an error $.jGrowl('startup'); Thanks. ...

Get CSS Div to fill available height

I have a div with 2 elements. <div id="master"> <div id="follower"></div> <div id="decider"></div> <div> 'master' div has the following CSS properties height:auto; width:auto; margin:0; padding:10px; display:block; The 'follower' div has the following CSS properties position:relative; vertical-align:middle; height...

Efficiently representing a large grid in a browser

I need to display and manipulate, in a browser, a grid of up to 10,000 simple cells (say, 100 by 100). These cells are basically just a colored-in rectangle. Manipulations include changing cell colors using Javascript, handling a click on each cell, etc. Using 1 div per cell, and 1 div to wrap groups of cells into a row, I can get down t...

opposite of <noscript>

Hi, Is there a HTML tag that does the opposite of <noscript>? That is, displays some content only if JavaScript is enabled? For example: <ifscript> <h1> Click on the big fancy Javascript widget below</h1> <ifscript> Of course <ifscript> doesn't actually exist. I know I could achieve the same result by adding <h1> to the DOM using...

<marquee> problem in ie8

My <marquee> tag is working perfectly in ie6 and ie7, but in ie8 it only shows first item. How can I fix this? Thanks in advance. ...

How to convert an Html source of a webpage into org.w3c.dom.Document in java?

How to convert an Html source of a webpage into org.w3c.dom.Documentin Java? ...

CSS - Aligning Right with Floats

I'm still pretty green at CSS, having the following CSS / HTML: <input type="reset" value="Clear" style="float: right;" /> <input type="submit" value="Send" style="float: right;" /> Produces the following results: Instead of the desired output: Changing the order of the HTML elements seems to fix the issue but is also counter-in...

Making a file directory and having clickable download links in PHP

Hi. on my website I want to be able to show a list of files, photos to be exact, and then have them individually linked, so that when someone clicks on one, they can download it. i'm trying this: [code] $path = "c:/users/jon/desktop/pictures"; // Open the folder $dir_handle = @opendir($path) or die("Unable to open $path"); ...

ASP.NET 3.5 - Making a field readonly/unmodifiable without "disabling" it

I have a web application with a form that has disabled fields in it. It allows a "Save As" function which basically means the settings can be copied into a new configuration (without being modified) and in the new configuration they can be changed to something else. The problem I am running into with this is that since the fields are dis...

How to write this regexp?

I am validating a field which may NOT be anything but numbers, but may include a space or a minus-sign. This is for validating phone number field! So, these criterias should be met: (might have forgot a criteria, if so remind me) 1- Atleast 5 numbers 2- May contain space 3- Not shorter than 5 characters 4- Not longer than 20 charac...