html

How do I get CGI.pm to output HTML5 instead of XHTML 1.0?

I'm having some trouble getting CGI.pm to output to HTML5 instead of XHTML 1.0 or HTML 4.01. When I try "HTML5" or "HTML 5" as the -dtd argument in start_html() I get a document in HTML 4. I've also tried importing :HTML5, but that doesn't seem to work either. Any advice? ...

HTML submit form using a CAPCHA image or a security question which one is more secure?

I've seen developers use various methods to prevent spam on a basic html contact form Method 1 is where the developer uses a Captcha image and Method 2 where only a Question is asked eg. Are you Human? with a radio button. Which one is the better one to use and why? ...

Where can I find other free web UI interfaces?

I'd like to know where I can get more web UI interfaces like the ones at: http://www.webguitemplates.com/ ...

"Remember" last three MySql queries; Cookie, passed variable or other method?

I have a classified website, with pretty sophisticated searching, and I am about to implement a function where the last three queries is displayed for the user, so that the user can go back easier through the queries. This because for each query the user has to provide a lot of input. I have four questions for you: I wonder, how can I...

HTML button to NOT submit form

Hello, I have a form. Outside that form, I have a button. A simple button, like this: <button>My Button</button> Nevertheless, when I click it, it submits the form. Here's the code: <form id="myform"> <input /> </form> <button>My Button</button> All this button should do is some JavaScript. But even when it looks just like in ...

Is there an XmlWriter that writes a colorful HTML-formatted output for displaying XML in a webpage?

I've got a bit of XML I want to display on my ASP.NET website as-is (for debugging purposes), and it would be nice if it was colored. This should be easy to achieve with the right kind of XmlWriter, but I don't have the time to make one myself. Is there an existing (free) component that can do this? ...

How to convert from HTML to UTF-8 in java

Hi, I have an ASCII String, with HTML entities, like: &agrave; &uml; &ccedil; I need this String to be without those entities and convert them into UTF-8 chars. Is there any easy way, in java to do that? Where: Clazz.method("a&agrave;","UTF-8") returns "aà" or something like that? ...

How to pass url parameters onto a iframe?

Lets say I have the following webpage www.fake.com/sample.html I could pass some parameters to that webpage, like so www.fake.com/sample.html?count=10&format=gold this page has an iframe in it, I would like to pass any parameters that the main page gets to the enclosed iframe. If the main page is called like so www.fake.com/sample...

HTML Input on change of value

Hello, I have an input tag. This tag does not have the autocomplete feature turned off, thus, one does not necessarily need to release a key to change the value of this field and focus anotehr one. My question is: how can I detect ANY value changes of this particular field, like e. g. <input onvaluechange="//do following..." /> The ...

How to detect time on a playing Flash video

Hi I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second. I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based v...

Auto fit iframe

I have a difficulty on design a web page layout. This is my layout structure. <style> #left { float:left; width:600px; min-height:400px; } #right { float:right; width:200px; min-height:400px; } </style> <body> <center> <div id="page"> <div id="left"> <iframe /> </div> <div id="right">right panel</div> <div id="footer">foote...

In which order are CSS styles applied?

I have the following HTML. <ul> <li> <a>asdas</a> </li> </ul> In my CSS stylesheet I have general settings for the a tag, and several hundered lines later settings for ul li a. Like this: a:link { color: red; } ... ul li a { color:blue; } Firebug tells me, that first the color:blue is loaded, and afterwards overriden by c...

how to make the footer div start after all other divs have finished

UPDATE: look at the demo here: http://amit-verma.com/template_test/ i am having a slight problem with the alignment of the footer div. i have a header at the top. div = maincontent { two divs for content, side by side. another 2 divs side by side below the content div. } //just to represent. i know this is not html ;) now i wan...

How to code a 'Next in Results' within search results in PHP

Right, bit of a head scratcher, although I've got a feeling there's an obvious answer and I'm just not seeing the wood for the trees. Baiscally, using Solr as a search engine for my site, bringing back 15 results per page. When you click on a result, you get a detail page, that has a "Next in Results" link on it, which obviously forward...

What is the best way to display comments in ASP.NET ?

I'm developing a social network using Microsoft Technologies. I want to make a Wall similar to the one in Facebbok. What is the best way to do it and display comments ? Repeaters ? I'm using classic ASP.NET not MVC ...

Dynamically generated form field loses value when new field is added

Hello! I am generating a dynamic fieldset with javascript. For adding fields, I use the following function (this function actually adds more than one field) //add test function addTest() { var location = document.getElementById('addTestLocation'); var num = document.getElementById('addTestCount'); var newnum = (document.ge...

Embed XPS in HTML

Hi, how can an XPS document be embedded into HTML? The solution has to work in Internet Explorer 8, only. I know that IE can display XPS directly, but I need more control of the way the pages are displayed. Probably this can be solved with an object tag, but I couldn't find any resources. Edit: I need to control the zoom factor and sc...

How to anchor with <option> tag in HTML?

I'm trying to anchor a div with an option tag but it doesn't work, what´s wrong with my code? Here´s the anchor snippet <select> <option value="#b1">1 test</option> </select> <br /> <br /> <br /> <br /> <br /> <br /> <div id="b1">Testing!</div> ...

Selecting specified text in an HTML formatted JEditorPane

I am displaying text in a Java JEditorPane using HTML to fomrat the text. I am also designing a search function that finds text in the JEditorPane selects the text and then scrolls to it. My problem is creating an algorithim that will actually specify the beginning and ending position for the selection. If I simply retrieve the t...

Integrate variable data with div tag in asp.net

Hi all, I have this code: <div id="container" style="width: 800px; height:300px; margin: 0 auto;overflow:hidden;"></div> I need to replace 800px and 300px from database value; I tried both of the below. But still i am not getting the answer. Method 1: <div id="container" style="width:'<% Response.Write(width);%>'px; height:'<% Re...