html

Changing website favicon dynamically

I have a web application that's branded according to the user that's currently logged in. I'd like to change the favicon of the page to be the logo of the private label, but I'm unable to find any code or any examples of how to do this. Has anybody successfully done this before? I'm picturing having a dozen icons in a folder, and the re...

What is the best way to insert HTML via PHP ?

Hey, Talking from a 'best practice' point of view, what do you think is the best way to insert HTML using PHP. For the moment I use one of the following methods (mostly the latter), but I'm curious to know which you think is best. <?php if($a){ ?> [SOME MARKUP] <?php } else{ ?> [SOME OTHER MARKUP] <?php } ?> Opposed to: <?ph...

How to update HTML "select" box dynamically in IE

I've got an HTML "select" element which I'm updating dynamically with code something like this: var selector = document.getElementById('selectorId'); for (var i = 0; i < data.length; ++i) { var opt = document.createElement('option'); opt.value = data[i].id; opt.text = data[i].name; selector.appendChild(opt); } Works fine i...

Replace Unavailable Images via CSS?

Is it possible to replace the standard broken image via CSS or using another technique? All my images are the same size and my have transparency. I've tried to wrap all images with a div's background: <div class="no_broken"> <img src="http://www.web.com/found.gif"/&gt; </div> <div class="no_broken"> <img src="http://www.web.com/no...

rollover effect using Jquery

Would you please help me in making a rollover effect using jquery, what i want to do is when someone hover over any of the menu items the text slide down and disappear and a picture slides from the top down to the center (e.g. you could see this effect here panda as you can see the picture slide down from the top but the text does not sl...

Modifying the structure of a HTML table with jQuery

Hi all, I have a list of elements (the X in the following examples) displayed either in a row or in a column of an HTML table. In HTML code point of view, I have either (horizontal display): <table id="myTable"> <tr> <td>A</td> <td>B</td> <td>C</td> ... </tr> </table> or (vertical display): <table id="myTable"> ...

HTML to create tournament final four bracket?

Is there a website I can create an HTML final four bracket? Or is there just HTML out there that will create it automatically and I can just fill in the specifics? ...

Good Javascript Combo Box replacement for combo boxes with tons of elements?

I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than <select id="field-component" name="field_component"> <option selected="selected">1</option><option>2</option>... </select> Is there somethin...

Disabled input text color

Hi The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone). In Firefox both border and text have the same color (#880000), but in Safari the text gets a bit lighter (as if it had some transparency applied to it). Can I somehow fix this (remove this transparency in Safa...

how to keep inline items from wrapping?

I've got menu items that look like this <ul> <li>Item1<span class="context-trigger"></span></li> <li>Item2<span class="context-trigger"></span></li> <li>Item3<span class="context-trigger"></span></li> </ul> with CSS that turns the above into a horizontal menu, and JS that turns the [spans] into buttons that bring up contextual m...

How to use only CSS to round my div tag area's corners?

I use div tags to define areas within my web pages. I set all the obvious things like background, size, padding, etc. But it is all very square. How can I use only CSS to round the corners? ...

Why HttpServletRequest.getRemoteAddr() doesn't work in Java servlet ?

I'm developing a web app with java servlet, I hope to get the user ip info by calling request.getRemoteAddr() from inside : processRequest(HttpServletRequest request,HttpServletResponse response) But it returns a wrong ip, since I'm not very knowledgeable about this area, I don't know what it is displaying, maybe a proxy, I got this : ...

<q> element not identified in IE 6.0

I have used this in my HTML: <q> Hai How r u </q> Which shows the text in quotes, like "Hai How r u", for example. This is working fine in FF but not in IE 6.0. Please let me know why this happens, and any solutions you might know of. I don't want to use the quote (") character in my HTML or a separate css file for this. ...

Can you set a page's title via CSS or a Skin in ASP.net 2.0

I am using asp.net 2.0 I know can set the pages title via the code behind. But is it possible to set the page title using Theme, skin or css? I need to display a different title depending on the theme selected. ...

How can I create an editable dropdownlist in HTML ?

I'd like to create a text field with a dropdown list that lets the user to choose some predefined values. The user should be albe to type a new value or to select a predefined one from a dropdown list. I know that I can use two widgets for that but in my app it would be more ergonomnic if it was unified in a one widget. Is there a stand...

Can you find a solution using just css, to make an element centred when it appears on its own, and aligned to the right when it appears with another element?

The problem: We have a page that ordinarily has two elements arranged side-by-side. <div id="container"> <div id="element1">content</div><div id="element2">content</div> </div> But in some conditions only element2 is on the page e.g.: <div id="container"> <div id="element2">content</div> </div> Despite exploring a few angles fo...

Does the onchange event propagate?

I'm using event delegation to listen for events lower in the DOM, but it's not working for an onchange event on a select box. Does the onchange event propagate or bubble up the DOM? Googling has failed in finding a conclusive answer. ...

mysql import csv problem

OK, I have just been reading and trying for the last hour to import a csv file from access into mysql, but I can not get it to do it correctly, no matter what I try. My table is like so: +-----------------+------------- | Field | Type +-----------------+------------- | ARTICLE_NO | varchar(20) | ARTICLE_NAME | varchar...

HTML Formatting in Visual Studio 2008

Is it possible to turn off all HTML formatting in Visual Studio 2008? It just totally messes everything up. For example, I'll add a grid with columns, styles, etc. with them all indented and on separate lines. I'll switch to design view or split view and all the work I just did is on one line! It is so frustrating. I've changed some thi...

Are loops the best way to build a table?

I have to build an HTML table that shows data for users versus pages visited. It seems klunky to use for and/or foreach loops, but I can't think of anything better. I'm using PHP, but I would assume that this is language agnostic. ...