xhtml

Knowing how wide a text line will be in HTML for word wrap and other applications

落花浮王杯 提交于 2019-12-14 03:46:15
问题 Do you know a good cross-browser way of knowing how wide will be a text line so you can break it exactly to fit a fixed width? Suppose you want to break a long text like so it doesn't overflow a fixed width container, but you want the line to break the closest to the border possible, so guessing where to insert ­s isn't a clean solution. I want to investigate, I imagine this could be done having an invisible div then printing the line inside it and checking the div's width, or something like

Generate JSF2 CRUD's - Can I create the bean and xhtml automatically for any entity?

吃可爱长大的小学妹 提交于 2019-12-14 03:33:24
问题 I'm looking for any kind of software which allows me to generate, in an automatically way, the MVC files (a bean and a xhtml view) of any CRUD of any entity using Java Server Faces 2 and Richfaces 4 technologies. I think one solution would be to use the Hibernate Tools plugin for Eclipse, creating an exporter like the Dao code generator but I don't know if it is possible or how can i do that. I search but I didn't find any documentation about it. Do you know which is the best solution for

need to use getElementById many times to change image src

夙愿已清 提交于 2019-12-14 03:18:15
问题 I'm trying to use getElementById in external .js file to change img src so it's easier to change my images from one file instead of having to go through hundreds of files I'm linking images from different dropshipping websites if there is an easier way of doing this I would be grateful if someone could help me thanks it also doesn't work the way I'd like here is my code: JavaScript: document.getElementById("item4").src = "item2.jpg" document.getElementById("item5").src = "item62.jpg" document

jQuery.html() returns invalid IMG [duplicate]

为君一笑 提交于 2019-12-14 00:57:30
问题 This question already has answers here : Closed 9 years ago . Possible Duplicates: Jquery html() and self closing tags Is it expected that jQuery $('span').html() turns XHTML br tag to html syntax? I have a document like this <!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"> <head> <script src="/js/core/jquery.js" type="text/javascript"></script> </head> <body> <div id="content"

illegal self closing node notation for empty nodes - outputting XHTML with PHP DOMDocument

南笙酒味 提交于 2019-12-14 00:46:11
问题 I am processing an XML compliant input of XHTML using XPATH in PHP like this: $xml=new DOMDocument(); $xml->loadXML(utf8_encode($temp)); [...] $temp=utf8_decode($xml->saveXML()); The problem that arises is that nodes that may not be self closing according to the HTML5 specs, e.g. <textarea id="something"></textarea> or a div to leverage by JS <div id="someDiv" class="whaever"></div> come back out as <textarea id="something" /> and <div id="someDiv" class="whaever" /> I currently address this

JavaScript click function not triggering JSF action method immediately on IE

↘锁芯ラ 提交于 2019-12-13 20:17:17
问题 I've recognized that when a click is done via JavaScript it won't trigger the action method immediately on IE, instead the browser wait's until the code has gone through the function where click is made and after that triggers the action method. On Chrome the action method is triggered immediately when the click is done. Here is an example xhtml code: <h:form> <ace:pushButton id="button1" action="#{someBean.someFunction1}" label="Button1" /> </h:form> <h:form> <ace:pushButton id="button2"

How to get my forms' Javascript error function to cancel form submission and insert error message?

﹥>﹥吖頭↗ 提交于 2019-12-13 19:15:50
问题 I have been reading several posts realted to this matter here on Stack Overflow and been reading the W3 Schools tutorials on Javascript and HTML forms. I am creating an XHTML form with required fields for users to submit personal data (Name, Address, Phone). I want the onsubmit attribute to pass each input value as an argument to my external javascript function website_form_error() . <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1

Whats better using HTML/CSS edited by hand or using design programs? and why? [closed]

☆樱花仙子☆ 提交于 2019-12-13 18:42:47
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . For design websites is it better to do it your self by learning HTML/CSS or using web design programs? and why? 回答1: I've bounced back and forth between hand coding and Dreamweaver in my history as a web developer. I originally started out hand coding HTML. This was back in

Use xhtml namespaces in xsd problem

最后都变了- 提交于 2019-12-13 17:36:23
问题 I want to make in my xml file something like that: <myfile> <screen> <img src="a.jpg"/> </screen> </myfile> I try to make this in this way: XML file <?xml version="1.0" encoding="UTF-8"?> <myfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="myfile.xsd"> <screen> <img src="a.jpg"/> </screen> </myfile> XSD file <?xml version="1.0"?> <xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xsd

Capturing HTML Text Input Key press after key has been applied?

耗尽温柔 提交于 2019-12-13 16:22:57
问题 A total newbie question, so please bear with me here ;) When a key press occurs in a HTML text input control, there are two events that seem useful in managing it (onKeyPress and onChanged). onKeyPress fires after the key has been pressed, but before the operation has been applied to the control's text. The later is only fired when focus is removed from the control and edits were made. My question: Is there a way to capture the event, after the key press has been applied to the control but w