xhtml

Get tag's and values from Jscript where pageScroll happen in UIWebView

强颜欢笑 提交于 2019-12-04 19:44:43
In my app the XHTML file is loaded in the web view when web view is allocated. if whatever file is loaded have 5000 lines of text in 200 Tag then only 10 Tag's value will see on first page ans when swipe on the screen the new page come and at that time other 10 or 12 Tag's value will come. My question is how to get only that scrollable part of html from java script ? i use below line to scroll the page NSString* goTo =[NSString stringWithFormat:@"pageScroll(%f)", pageOffset]; [webView stringByEvaluatingJavaScriptFromString:goTo]; i used to get whole html with this line of code of java script

CSS text replace with image, need hyperlink

ぃ、小莉子 提交于 2019-12-04 19:43:16
I am using the text-indent technique to replace my <h1/> tag with my website's image as so: <h1 title="Homepage">My logo</h1> CSS: #header h1 { float: left; background: transparent url('../images/logo.png'); width: 214px; height: 64px; text-indent: -9999px; } The only problem is that I want to still have the new image act as a hyperlink. I tried doing: <h1 title="Homepage"><a href="#">My logo</a></h1> But since it is being indented, the link is too. I wanted to know if anyone had any suggestions on how to do this and still be valid XHTML. EDIT I'd rather do it in a way that is accessible to

How can a JSF/ICEfaces component's parameters be updated immediately?

南笙酒味 提交于 2019-12-04 18:22:50
I have an ICEfaces web app which contains a component with a property linked to a backing bean variable. In theory, variable value is programmatically modified, and the component sees the change and updates its appearance/properties accordingly. However, it seems that the change in variable isn't "noticed" by the component until the end of the JSF cycle (which, from my basic understanding, is the render response phase ). The problem is, I have a long file-copy operation to perform, and I would like the the inputText component to show a periodic status update. However, since the component is

In HTML which way round should <a/> and <h1/> be nested?

跟風遠走 提交于 2019-12-04 17:28:01
问题 Is there a more correct order for nesting a <a> and <h1> elements in HTML? e.g.: <a href="www.example.com"><h1>Example!</h1></a> or <h1><a href="www.example.com">Example!</a></h1> 回答1: In HTML 4.01 and XHTML 1.1 and older: An h1 may contain an a An a may not contain an h1 So <h1><a>…</a></h1> In the HTML 5 draft: An h1 may contain an a An a may contain an h1 (but only if the a is somewhere an h1 is allowed — see the comments on this answer) So either, but browser support may vary (such is

Issue parsing a xhtml page using Python

时光毁灭记忆、已成空白 提交于 2019-12-04 17:21:17
Hello i am trying to parse a page in xhtml with python but i receive this error: **xml.parsers.expat.ExpatError: unbound prefix: line 6, column 0** [Fri Mar 25 09:58:21 2011] [error] [client 127.0.0.1] mod_wsgi (pid=9156): Exception occurred processing WSGI script '/home/hidura/webapps/karinapp/Suite/Gate.py'. [Fri Mar 25 09:58:21 2011] [error] [client 127.0.0.1] Traceback (most recent call last): [Fri Mar 25 09:58:21 2011] [error] [client 127.0.0.1] File "/home/hidura/webapps/karinapp/Suite/Gate.py", line 32, in application [Fri Mar 25 09:58:21 2011] [error] [client 127.0.0.1] response =

Javascript that automatically sets font-size on element so that text doesn't overflow? (autofit)

☆樱花仙子☆ 提交于 2019-12-04 17:19:57
You know what I mean? Like let's say we have: <div style="width:100px;font-size:10px">Some Text</div> But then we could also possibly have a much longer text string in that div, in that case I would want that div to have font-size:7px or whatever, so that the whole string fits without overflowing. I'm sure there's already something like this written, I wouldn't want to reinvent this. Preferably a jQuery plugin? Any suggestions would be appreciated! Thanks Based on an answer proposed in Nick's question: $(function() { $(".shrinkByWidth").each(function() { var targetWidth = $(this).parent('

Getting Selected Row Data from Datatable in JSF

纵然是瞬间 提交于 2019-12-04 17:02:33
So, I have tried to implement the methods from Anthony/BalusC in this question: How to get selected row index in JSF datatable? but to no avail. I also went through @BalusC's "Using datatables" article (which is wonderful as always) but that was written for JSF1.2 and the 2.0 article doesn't really address getting the selected row data. When a user clicks the "Add to my favorites" button, the selected row is not getting passed to the backing bean, the navigation case is not being followed, and the current page is refreshed. Any ideas what I'm doing wrong here? Here is my backing bean:

JSF (and PrimeFaces) How to pass parameter to a method in ManagedBean

无人久伴 提交于 2019-12-04 16:50:25
I have an Employee object I am showing in inputtext. For example, the firstname of the employee is shown in an inputtext. When the value of this firstname changes it calls a method. Before this is done I want to call a method which saves the ID of the employee in the managedbean so I know which employee needs to be changed. How do I do this, I got this so far: <h:outputText value="First name:"/> <p:inplace id="firstname" editor="true"> <p:ajax event="save" onsuccess="#{employeeController.saveName()}"/> <p:inputText id="firstName" value="#{emp.firstName}" required="true" label="text"

Is XHTML compliance pointless?

十年热恋 提交于 2019-12-04 16:41:48
问题 I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg. order=2). I could work around this but it's a pain, and I'm starting to lose my principals of making sure everything is valid. Really, is there any point to working around something like this? I got the HTMLValidator plugin for firefox, and looking

Place background image 1em from the right?

给你一囗甜甜゛ 提交于 2019-12-04 16:22:44
问题 As far as I can tell, it is not possible to place a CSS background image 1em from the right border of any block, neither is it possible to place a image 1em from the bottom. The following code places the background image 1em from the left and 2em from the top. <div class="foo" style="background: url('bar.png') no-repeat 1em 2em"> Some text here </div> Is there any way in CSS to specify that the background image should be "this far from the right edge" if the size of the box is dynamic and