html

Redirecting to another web page after selecting a div class?

Hi, Not to sure how to do this one, I am using the jQTouch framework to develop a web app. I want to know if I can redirect to a different web page such as Google when selecting a div class using an anchored link. The purpose of this is that I want to use the animations built into the jQTouch framework to make the interface coherent. ...

Changing checkbox visibility

I would like the button on my web page to toggle the visibility of my two check-boxes. How do I go about implementing such functionality? <html> <head> <script language=javascript> function validate(chk){ if (chk.style.visibility == 'visible') chk.style.visibility = 'hidden'; else chk.style.visibility = 'visible'; } </scrip...

Single huge .css file vs. multiple smaller specific .css files?

Is there any advantage to having a single monster .css file that contains style elements that will be used on almost every page? I'm thinking that for ease of management, I'd like to pull out different types of CSS into a few files, and include every file in my main <link /> is that bad? I'm thinking this is better positions.css but...

Are there any java libraries for validating user supplied HTML, on the server side?

I have a service which takes the user supplied rich text (can have HTML tags) and saves it into the database. That data gets used by some other application. But sometimes the user supplied data has missing HTML tags and wrong closing tags. I want to validate if the user supplied data is valid HTML or not and depending on that I want to w...

How to prevent dropdown on Android submit form when the first value is selected

I'm building a mobile website. I use regular html for the dropdown like below. If I select the dropdown on Android and click on "Category", it tries to submit the form. But iPhone doesn't do anything which is the desired behavior I want. I found a similar post here, but I'm not building an app. Some websites use links instead of dropdown...

Include one HTML file in another HTML file

How can I include an HTML file in another HTML file. Is there any simple way to do that? Thanks ...

"Post" XML Data like HTML with Hidden Values using ContentType ="txt/html"

Hello people, I want to do the same that works previously on HTML but now via .NET Windows Forms. When I submit this HTML it works : <html> <head> </head> <body> <form name="TestForm" action="http://staging.csatravelprotection.com/ws/policyrequest" method="POST"> <input type="hidden" name="xmlrequeststring" value=" <quoterequest> <...

Are DOM style calls limited by frequency?

I'm trying to resize an html element (flash object) but it doesn't seem to respond more than once per second? Is this a limitation imposed by browsers (both IE7 and FF3 do this)? Or should I be attempting to resize in a different/more efficient way? function setHeightNow(height) { if (document.getElementById) { if (height >...

jQuery handling hover() and unfinished animations on mouseout

Hello, Live Demo with visible code; http://jsfiddle.net/3eEgb/4/ The demo should be fairly self explanatory; I'm finding the length of a sentence inside a wrapper with the overflow hidden, and if it's wider than the wrapper I'm running an animation function that slides it along, revealing the remaining text. However I'm having problem...

Should tables be used to align form elements in HTML or is this looked down upon?

I like to follow standards and use table-less div based layouts. However using tables to align form fields/textareas and submit buttons is so much easier than using anything else. So is it acceptable from a strict standard perspective? I see google, facebook among others use tables in their registration pages. ...

Is it possible to save client state in an iFrame when the page changes?

I wonder if it would be possible to save client state in an iFrame when going from one page to another in a RESTful application. Example: There is a navigation tree on the page and the user has elapsed and collapsed its nodes. When he clicks on a node the entire page changes, but the state of the navigation tree should be the same on t...

what is the best way to convert html to postscript? in java

hello what is the best way ( if there is any ) in java to convert html with css2 support to postscript file ? ...

pre tag- text overflows the box SOLVED but for ie6 (ie7 not tested)

I have applied the following style to the pre element: pre { background-color: #FFFFCC; border: 2px dashed #FF6666; padding-top: 7px; padding-bottom: 8px; padding-left: 10px; float: none; padding-right: 10px; margin: 10px; } The text overflows the box. When I applied the float:right property...

Applying a relative size which includes margins

I have a div whose width is 100%. I know I can use box-sizing (or -moz-box-sizing) set to border-box to get that div's total width, including borders and padding (but not margin) to be that computed 100%. Is there a way to include the margin in that relative size computation as well? Alternately, it would be great if there was a non-Jav...

Alternate method of inserting a .PDF file into HTML page

Currently I'm using an embed tag with the src directed to the location of the .pdf however the embed tag does not allow for z-index manipulation or other div tags to be placed over it. After extensive searching for a fix to allow for embed tag z-index manipulation I have found that it is adobe that will not allow this to happen with the...

Find html element nearest to position (relative or absolute)

Given absolute or relative position (top & left) is there any way to get the nearest html element to these co-ordinates? Or alternately, is there any way to craft a selector (or use some jQuery construct) to enumerate elements and then find which is closes to the provided co-ordinates? Assume that the set of elements is small and finite...

rotate large table ajax

hi everybody, I have a very large table (that overflows the content div) and because it's dynamic it can contain at least 20 columns. Anyway, the problem is that I'm obliged to put this table in a "tight" div. And, the idea is to avoid the overflow and, to display elegantly all the columns so that it can rotate horizontally (a slide fr...

Override browser form-filling and input highlighting with HTML/CSS

I have 2 basic forms -- sign in and sign up, both on the same page. Now, I have no problem with the sign in form auto-filling, but the sign up form auto fills as well, and I don't like it. Also, the form styles get a yellow background which I can't manage to override and I don't want to use inline CSS to do so. What can I do to make the...

HTML to MS Word Template

I am generating a HTML page from a J2EE application that contains Labels to use for printing addresses on envelopes. This just consist of a straight HTML. The user wants to be able to copy and paste from the web page into a MS Word Template (see Letter Template However when copy and pasted all the text is squashed into the 1st labels ...

Minimum Div Size?

Hello, I am creating a website that uses a fluid layout with artificial columns. I have an image at the top with some text to the side. I want the image to have a minimum size of 550px and a maximum size of 75% of the parent div. I tried this: .class{ width: 550px; maxwidth: 75%; } but it did not work. ...