I have something similar to the following:
<div onclick="divClickEvent();">
<img onmousedown="imgOnDownEvent();" />
</div>
The problem is that if you mouse down on the img, the div click fires on mouse up. I tried to override the div onclick by adding an onclick="return false;" to the img element, but the div onclick is still fir...
Hi,
I have created 3 select boxes containing days, months and year. What I really would like is to check after the user has selected a date, if the date is over a year from the current date a message is displayed or so.
Im a little stumped on what to do. Any gidance would be great.
Thanks
...
Hi guys!
A man wants me to redesign a site run in PHP (VideoCMS). But when I asked him to send me the source he has given me *.tpl files instead of *.php. There is some code inside them:
{include file='header.tpl' p="article"}
<br />
<table width="886" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top...
The following is my simple html/css structure:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>de titel</title>
<style type="text/css">
* {
color: #FFFFFF;
margin: 0;
padding: 0;
}
html, body {
heigh...
I'd like to replace a multiple select box like:
<select multiple="multiple" name="options">
<option value="option1">option1</option>
<option value="option2">option2</option>
...
</select>
with an arbitrary number of simple select boxes:
<select name="options1">
<option value="option1">option1</option>
<option value="o...
Hi,
I am using XMLwriter to create HTML which works well, but now I need to place image tag but I am not able to do that - it still reports I cannot use ' ' in the element name. Please advice hwo to solve that, thanks!
EDIT: Basically, how to create in XML document this:
<img src="path" />
...
I am looking for a way to improve the workflow in a PHP based CMS. There is a lot of switching between the editor mode and the preview mode of the page. The editor mode is huge to load, and so I would like to open the preview mode in a different window.
I don't want to use new windows or an iframe within the current window to keep the w...
_mysql_exceptions.Warning: Incorrect string value: '\xE7\xB9\x81\xE9\xAB\x94...' for column 'html' at row 1
def getSource(theurl, moved = 0):
if moved == 1:
theurl = urllib2.urlopen(theurl).geturl()
urlReq = urllib2.Request(theurl)
urlReq.add_header('User-Agent',random.choice(agents))
urlResponse = urllib2.urlop...
According to this answer: http://stackoverflow.com/questions/1020892/python-urllib2-read-to-unicode
I have to get the content-type in order to change to unicode.
However, some websites don't have a "charset".
For example, the ['content-type'] for this page is "text/html". http://bit.ly/6IcCtf/
I can't convert it to unicode.
encodi...
This is in continuation of the question:
http://stackoverflow.com/questions/1801960/innerhtml-working-in-ff-but-not-in-ie
The above problem is resolved [ thanx to pygorex1 ] . But i would like to know why the following code snippet is not working.
if (window.addEventListener){
window.addEventListener('load', addDateFormatIn...
I wonder if there is any open source web base WYSIWYG editor in ASP.net, which allows drag and drop html controls in the web browser and alows us to design web forms?
Regards,
Nitin Sawant
...
I am looking for a simple commandline script/program to automatically "inline" all external css and javascript references for a html file. I basically want to create a single self-contained html file suitable for sending via E-Mail. An additional bonus would be if it could also inline images as data: UIRs, but that part is not so importa...
I am using the Xerces implementation within JDK6 to perform XPath queries on an HTML 4.0 transitional document. With the following code:
XPath newXPath = XPathFactory.newInstance().newXPath();
XPathExpression xpathExpr = newXPath.compile(expression);
Object xPathResult = xpathExpr.evaluate(inputSource, XPathConstants.NODESET);
Where...
I have an error panel that is subbed in to a page if an error goes wrong to gracefully handle and display errors. Currently, I am just appending the error messages to a string and pushing that to a label. If you have multiple errors, this gets messy. Therefore, I'd like to push each error to a list item in a bulleted, unordered list.
...
How do you add an event listener or handler to widgets in GWT 1.7?
I know there are some questions alreayd about this on SO but it seems they are outdated.
For example (ignoring the fact that there is a :hover in CSS) how do I add a Hover listener to a FlexTable for example?
...
Is there a way to VIEW the HTML source code that GWT produces? Currently I just give my flex table the DIV id and that DIV is all HTML I can see in ViewSource.
Is there a way to structure my table in HTML (say using div's and lists) and than create a something like FlexTable around that?
...
I've got a load of checkboxes that are by default checked. My users will probably uncheck a few of the checkboxes (if any) and leave the rest of them checked. Is there any way to get the checkboxes that are NOT checked in a form post, rather than the ones that are checked?
...
I need to supply a keyword like "blue metal kettle" (with/without quotes) and get only the number of results found for this search. If I search without quotes right now, I get:
Results 1 - 10 of about 1,040,000 for blue metal kettle. (0.19 seconds)
Here '1,040,000' is the number I want. Is there any API function to do this, or I must...
I have a weird, annoying problem. I have a css/ folder and index.html at the root. I load css files in the header as follows:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
...
I'm using an e-commerce system which allows you to have several variations for each product - (for instance: large, medium, small t-shirts). However, we are having complaints from customers who add a t-shirt and ignore the variation. As a result, a lot of big people are getting small t-shirts (the default). To solve this, I'd like to for...