xhtml

NSXMLDocumentTidyHTML doesn't tidy some XHTML validation errors

风流意气都作罢 提交于 2020-01-13 06:11:47
问题 I want to grab text from a list of web pages. I've done a bit of experimenting and found that the best way for my needs is via WebKit. Once the source of the page has been grabbed, I want to strip out all the HTML tags, by using the technique in this comment. Here's my code: - (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame { if(frame == [sender mainFrame]) { NSString *content = [[[[sender mainFrame] dataSource] representation] documentSource]; NSXMLDocument

How do I get a richfaces modal window to display without an onclick event?

ε祈祈猫儿з 提交于 2020-01-13 04:43:06
问题 I'm trying to implement a modal window like this to display an error message to the user. I have a page with a form for users to enter their information, then click Submit to add it to a database. If the database returns an error, I want the modal window to pop up with the error message. The only problem is I can't get the modal window to pop up unless there's some kind of onclick event. I tried using the following code: <rich:componentControl for="popup" attachTo="submitButton" rendered="#

Can you stop an <img> tag from loading its image using CSS?

主宰稳场 提交于 2020-01-12 12:53:04
问题 Is there any way to stop an <img> tag loading its image by just using CSS? I would like to avoid using JavaScript. This doesn't seem to work (Firebug still shows the images loading): display: none; visibility: hidden; 回答1: No — CSS only tells browsers what content should look like, it doesn’t specify loading behaviour. The best you could do that involves CSS is to remove the <img> tag from your HTML, and replace it with an element that shows an image via CSS’s background-image property. Then

Can you stop an <img> tag from loading its image using CSS?

早过忘川 提交于 2020-01-12 12:52:34
问题 Is there any way to stop an <img> tag loading its image by just using CSS? I would like to avoid using JavaScript. This doesn't seem to work (Firebug still shows the images loading): display: none; visibility: hidden; 回答1: No — CSS only tells browsers what content should look like, it doesn’t specify loading behaviour. The best you could do that involves CSS is to remove the <img> tag from your HTML, and replace it with an element that shows an image via CSS’s background-image property. Then

JSF2: limiting cc:attribute to a given object type within a List

非 Y 不嫁゛ 提交于 2020-01-12 05:53:33
问题 If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!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" xmlns:cc="http://java.sun.com/jsf

JSF2: limiting cc:attribute to a given object type within a List

假装没事ソ 提交于 2020-01-12 05:53:13
问题 If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!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" xmlns:cc="http://java.sun.com/jsf

JSF2: limiting cc:attribute to a given object type within a List

与世无争的帅哥 提交于 2020-01-12 05:53:05
问题 If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!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" xmlns:cc="http://java.sun.com/jsf

When is it OK to use Javascript and when not?

蓝咒 提交于 2020-01-12 04:06:10
问题 Is it good practice not to use much javascript/jquery? Should we avoid it as much as possible (for good accessibility)? When is it OK to use JavaScript and when is it not in web design and development? In what scenarios and with what conditions? Update: I'm asking regarding public websites. 回答1: I have to respectfully disagree with the posters that say that you shouldn't use JavaScript, or use it sparingly, or have it degrade gracefully. The reason is that the vast majority of people nowadays

PHP: Pass non-form variables between pages?

坚强是说给别人听的谎言 提交于 2020-01-11 12:26:53
问题 I have a page. The user submits the page and sends it to a PHP results page. It works fine. Now, I want the results page to link to another page, and for the elements on that page to depend on what was on the results page. I know how to pass form variables to another page, but I don't know anything about passing non-form variables. From my searching on the web, my best guess is that I should be passing by URL. Is this correct? If so, a possible problem: the page I want the results page to

iframe background image showing fine in Firefox but not in IE

試著忘記壹切 提交于 2020-01-11 08:47:07
问题 Why IE not showing BG mage like firefox in Iframe? I do not have access of iframed page. any CSS or javascript solution 回答1: As well as adding the CSS style background-color:transparent; to the iframe document's body element, you will also need to add the allowtransparency attribute to the iframe element in the containing document. See http://msdn.microsoft.com/en-us/library/ms533072(VS.85).aspx for more information. If you can't modify the iframe's document then you are out of luck. Maybe