xhtml

jQuery Background Canvas transparency

梦想与她 提交于 2020-01-05 04:31:38
问题 I'm using the jQuery Background Canvas plugin and have created a DIV with rounded corners and a gradient effect. However, I'm unable to get the transparency to work. What am I doing wrong? Here's the JavaScript: $(document).ready(function() { $(".Test").backgroundCanvas(); $(".Test").makeElementTransparent("#CECFCE"); $(".Test").backgroundCanvas(true, "#CECFCE"); }); function DrawBackground() { $(".Test").backgroundCanvasPaint(TestBackgroundPaintFkt); } // Draw the background on load and

Why is my script failing w3c validation?

允我心安 提交于 2020-01-04 14:15:17
问题 I have this piece of code: <script language="javascript" type="text/jscript"> document.write("<img src='http://dm.leadgenesys.com/jpgp.lgt?en=P.........TP_Q=&ur=' + escape(document.referrer) + '' border='0' alt='no alt' />"); </script> and... when I try to validate it, I'm given this error: document type does not allow element "img" here …rer) + '" border="0" alt="no alt" />'); The element named above was found in a context where it is not allowed. This could mean that you have incorrectly

docx4j replace variable with html

﹥>﹥吖頭↗ 提交于 2020-01-04 14:08:37
问题 i got this sample code to replace variables with text and it works perfect. WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File("c:/template.docx")); VariablePrepare.prepare(wordMLPackage); MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart(); HashMap<String, String> mappings = new HashMap<String, String>(); mappings.put("firstname", "Name"); //${firstname} mappings.put("lastname", "Name"); //${lastname} documentPart.variableReplace(mappings);

Greasemonkey: XPath returns no results for .xhtml page

谁说胖子不能爱 提交于 2020-01-04 09:25:20
问题 When running on an xhtml page, xpath doesn't seem to return any results. var result = document.evaluate( "//a/img", document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); For example returns an empty result set. What's the problem here, and how do I fix it? 回答1: xhtml elements are not in null namespace, so you have to pass a namespace resolver to the method: function resolver(prefix) { return prefix === 'x' ? 'http://www.w3.org/1999/xhtml' : null; } var result = document

Where is this blank space coming from?

一世执手 提交于 2020-01-04 07:53:14
问题 I have a webpage that contains a picture inside a table cell. But, in the table cell there is also an additional 5px on the bottom. I simplified the code to the max: <!DOCTYPE html> <html> <head> <title>Random page</title> </head> <body> <table> <tr> <td style="border: 1px solid black"> <img style="border: 1px solid red" src="picture.png" /> </td> </tr> </table> </body> </html> The result, in Firefox 25 and Internet Explorer 10: As you can notice there is blank space in the bottom. I know

HTML, XHTML validation error - can't resolve

…衆ロ難τιáo~ 提交于 2020-01-04 05:53:52
问题 I have been trying to validate my web page for the last two hours, I only have one error remaining before it is successfully validated but I keep on getting the character decoding problem, I cannot get round it..... The whole document is fine except it says... Sorry, I am unable to validate this document because on line 77 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check

In JavaScript, how can serializer part of the DOM to XHTML?

亡梦爱人 提交于 2020-01-03 13:58:17
问题 I would like to serialize part of the DOM to XHTML (valid XML). Let's assume I have just one element inside <body> , and that this is the element I want to serialize: <div> <hr> <img src="/foo.png"> </div> With this, document.innerHTML gives me almost what I want, except it returns HTML, not XHTML (i.e. the <hr> and <img> won't be properly closed). Since innerHTML doesn't do the trick, how can I serialize part of the DOM to XHTML? 回答1: I am not sure if using another language (on top of the

In JavaScript, how can serializer part of the DOM to XHTML?

送分小仙女□ 提交于 2020-01-03 13:58:03
问题 I would like to serialize part of the DOM to XHTML (valid XML). Let's assume I have just one element inside <body> , and that this is the element I want to serialize: <div> <hr> <img src="/foo.png"> </div> With this, document.innerHTML gives me almost what I want, except it returns HTML, not XHTML (i.e. the <hr> and <img> won't be properly closed). Since innerHTML doesn't do the trick, how can I serialize part of the DOM to XHTML? 回答1: I am not sure if using another language (on top of the

What to replace <span> in <form> with? "In XHTML 1.1 the tag <form> cannot contain tag <span>

折月煮酒 提交于 2020-01-03 12:25:29
问题 I am a beginner in html. I am using a login module from yootools: What to replace <span> in with? I have XHTML 1.1 strict doctype (changing transitional fixes it) and I get error: "In XHTML 1.1 the tag <form> cannot contain tag <span> This is user/pass box lined up next to each other on the same line. What can I replace these spans with so it doesnt complain? Thanks! Maria Edit: Cleaned up to this now. So I just need to find a way to replace <span class="username"> with something. <li class=

How are cells of a table impacted by declaring an event in a col element?

扶醉桌前 提交于 2020-01-03 10:18:13
问题 When an event, such as onclick, is declared in a col element for an HTML table does that event impact the cells referenced by the col element? Is the event ignored? Does something else happen? 回答1: Great question. The spec says: <!ATTLIST COL -- column groups and properties -- %attrs; -- %coreattrs, %i18n, %events --- where %events says: <!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked--