html

Html input control for passwords - not showing no of characters typed or showing spaces instead of dots

Is is possible to use the password element in html input type="password" in a mode whereby one dosn't show the characters types as asterixes/circles but as spaces/nothing so noone would know the length of the password. ...

Rounded corners on a fieldset

Hi, I noticed that the "fieldset" tag renders a rounded corner border on IE (it renders squared on the other browsers). <fieldset> <legend>My legend</legend> </fieldset> BUT if i set a CSS style on the fieldset, the rounded corners disappear!! Anybody know why? How to keep the rounded corners but with another border color?...

Using relative URL in CSS file, what location is it relative to?

When defining something like a background image URL in a CSS file, when using a relative URL, where is it relative to? For example: /stylesheets/base-styles.css: div#header { background-image: url(images/header-background.jpg); } If I include this style-sheet into different documents via <link ... /> will the relative URL in t...

Server-side logging when someone prints a web page

At my work, we're interested in tracking how often people print our web pages. (If a lot of people are doing it, we'll probably put more focus on making the print view nicer.) Obviously if we put a "Print" button on the page, we can log when people click on that, but if users just use the "File" menu and choose "Print," we have no way ...

Getting the final/timed render of a URL.

Hi, I am looking for a way to, give a URL, get the source of a webpage back after the JavaScript has been run on it. For example: I have a webpage with a . On loading the page, some JavaScript populates the div. Viewing the source of the page through a browser will not give the information which is within the div. As far as I know, in...

Using regular expression to trim html

Been trying to solve this for a while now. I need a regex to strip the newlines, tabs and spaces between the html tags demonstrated in the example below: Source: <html> <head> <title> Some title </title> </head> </html> Wanted result: <html><head><title>Some title</title></head></html> The trimming o...

Hide Image Title Tool Tip Popup on Mouse Rollover or Hover

Hello, I'm hoping I can get this question answered here... I have a client who wants to add a PayPal "Add to Cart" button inside a Lightbox window. I was able to achieve this by placing the PayPal code inside the image title tag. Not sure if this was the best way, but it worked. However, here is my problem... Now when you mouse over...

Can HTML comments appear before the DOCTYPE declaration?

I would like to place a comment (<!-- this --> style) at the very top of my HTML, preceding the DOCTYPE declaration. Does the standard allow this? Is it supported by the major browsers? Are there any pitfalls in doing this? ...

Save an html page + change all links to point to the right place

Hi - You probably know that IE has this thing where you can save a web page, and it will automatically download the html file and all he image/css/js files that the html file uses. Now there is one problem with this- the links in the html file are not changed. So if I download the html page of example.com, which has an < a href=/hi.ht...

Checkered table rows and columns?

Is there a way to make the rows and columns in an HTML table checkered between 2 different colors? I made a spread-sheet like list of data and I am thinking it will look better and be easier on the eyes if the rows/columns were checkered between white and off-white colors. Thanks! ...

New line characters get submitted differently

Hi, I was wondering if somebody could shed some light on this browser behaviour: I have a form with a textarea that is submitted to to the server either via XHR (using jQuery, I've also tried with plain XMLHttpRequest just to rule jQuery out and the result is the same) or the "old fashioned" way via form submit. In both cases method="P...

Is it possible to capture search term from Google search?

This may be a stupid question, but is it possible to capture what a user typed into a Google search box, so that this can then be used to generate a dynamic page on the landing page on my Web site? For example, let's say someone searches Google for "hot dog", and my site comes up as one of the search result links. If the user clicks the...

How to construct a web file browser?

Goal: simple browser app, for navigating files on a web server, in a tree view. Background: Building a web site as a learning experience, w/ Apache, mod_python, Python code. (No mod_wsgi yet.) What tools should I learn to write the browser tree? I see JavaScript, Ajax, neither of which I know. Learn them? Grab a JS example from t...

How to prevent Javascript injection attacks within user-generated HTML

I am saving user-submitted HTML (in a database). I must prevent Javascript injection attacks. The most pernicious I have seen is the script in a style="expression(...)". In addition to this, a fair amount of valid user content will include special characters and XML constructs, so I'd like to avoid a white-list approach if possible. (L...

Complications caused by using inline frames

Hi All, What are some complications that can be caused by framing a website? I'm looking to frame a relatively complex website that is based on jspx. So far I've found that Ajax functions don't work and I've heard that this is because of security issues. What other things of this nature might go wrong when framing a website? Thank ...

How do I italicize text in HTML?

I don't understand how to do this! ...

HTML form with two submit buttons and two "target" attributes

Hi I have one html <form> The form has only one action="" However I wish to have 2 different target="" attributes depending on which button you click to submit the form. This is probably some fancy javascript, but I haven't an idea where to begin. Any ideas how I could create two buttons, each submit the same form, but each button gi...

Numbered line code example?

how do you add numbered lines to code examples and also giving a printing and view plain text options like in the code examples in the following link below: http://www.sitepoint.com/blogs/2009/06/02/css-sizing-absolute-position/ ...

How to make XHTML "table" with fluid table rows

Basically i want to be able to make a a grid of boxes, where i can align text at the top middle and bottom of each box, and have the boxes on the same row resize when text in another box on its row pushes it down. If you look at this HTML 4 code, it achieves what i want to be able to do, but id like to be able to achieve this with the X...

How to display an image which is in bytes to jsp page using html tags?

Hi All : I have ByteArrayOutputStream which contains a jpeg image in bytes. My requirement is to display that image in jsp page(to display the image in front end using html tags). How do i do that?. I have refrred BufferedImage class but it confusing for me because i am new to this.. Please help me.. Thanks in advance. ...