xhtml

How do I remove these tags with JavaScript

I'm still learning regex (obviously) and i can't figure it out, and i want to do it the right way rather than doing it the long way. How can I: Find all <p> or </p> and replace with a \n except the first <p> and last </p> in which case replace with nothing, just remove, and for <br>, <br /> and <br/> replace with \n also. With Regex OR...

Styling Readonly fields in using CSS

Hi, I have many forms which has many text input that are read-only. I am doing this since users are not allowed to edit this anymore but they are allowed to view it. My problem is the rendering on different browser. FF is doing fine in rendering this but IE6/IE7/IE8 is not doing any good. It is graying out the field and does not dis...

HTML table - fixed width columns and horizontal scroll

I need to create an HTML table which has fixed column widths, say 200px for each column. If the table exceeds the horizontal width of the browser viewport then there should be horizontal scroll to view the columns which are off-screen. As the table is being dynamically generated from a database there will be an indeterminate number of co...

in RichFaces, While using Email validation i am getting NullPointer Exception?

BeanClass code is: public void validEmail(FacesContext context, UIComponent component, Object value) throws Exception { //Set the email pattern string Pattern p = Pattern.compile(".+@.+\\.[a-z]+"); //Match the given string with the pattern Matcher m = p.ma...

Javascript HTML > XHTML converter

Looking for a HTML converter which will produce valid XHTML code. One important thing is that it will need to insert P tags for paragraphs - something that seems to be missing from most popular ones. I found John Resig's, but it does not insert P tags. http://ejohn.org/blog/pure-javascript-html-parser/ For example, this: Lorem ipsum ...

how to use Session logout in RichFaces?

Please Give me one Example, How to use LogOut in RichFaces!ineed to use this in my application.Requirement is:when i clicked on LogOut in my Screen then it must be logged out from the SessionAnd i need to Redirected to the Login-Page! How can i use this in my .xhtml page? ...

What is the means of terms "Building Block" in javascript?

for example title of this article is "The JavaScript Building Blocks: Data Types, Literals, and Variables" http://www.informit.com/articles/article.aspx?p=169501 What is the means of terms "Building Blocks" in JavaScript? Is it related to box on web-page, CSS box model? ...

What throws Internet Explorer into quirks mode ?

I have created a webpage (http://www.snow4life.yum.pl) that was rendered properly in firefox, chrome etc. Of course dumb IE complicated things, because it enters quirk mode automatically, even though doctype is properly set and site goes through w3 validation (there is one error of missing some char, but file was cleared in hex editor). ...

Charset tag making all pages scripts run twice.

<meta http-equiv="content-type" content="text/html; charset=<?php echo $stigConfig['charset']; ?>" /> How can this line of code make my full page reload twice... ive been looking threw all my site and finaly after 2 days... i narrowed down to taking this line out and my sites no longer runs its header scripts twice. dont i need a cha...

IE6 Not caching my images

Hi, I uploaded my web application already in my Production Tomcat Web Server. I am trying to test it already and it works fine on FF/IE7/IE8 but I am having a problem on display on IE6. I notice in the status bar that IE6 seems to be downloading the images every now and then. Even though I did not click anything, it still downloads the...

How do browser-side javascript template engines render templates?

I found a large number of browser-side JavaScript templates which render a template with data values a string. However, I'm a bit uncertain how this string is supposed to be translated to display elements in the DOM. Obviously, one way is just document.write - but I think that has been long buried since. Another is using element.innerH...

Facebook open graph meta tags & valid html

According to facebook to use their like button and the open graph meta tags you need to place something like this into your html page. <meta property="og:title" content="The Rock"/> <meta property="og:type" content="movie"/> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/&gt; <meta property="og:image" content="ht...

How do I overlay JAVA onto a static image?

I am re-designing a website for a major University, and they use java images on most of their pages. How do I place/inlay a Java slide show onto a static image (ie: background image). (I know it is a weird combination of JAVA, CSS, and XHTML.) ...

Having HTML tables (or divs) wrap around floated elements, using up all remaining space

Hi. I'm trying to achieve a right-hand-floated box, with a variable list of tables or divs (generated via ASP.NET Repeater, but that's not important) to the left. The tables/divs should expand to fill the remaining width. That would be fine: float the box to the right, and set a margin-right on each of the tables or divs. However, I ...

How to start background repeat-y after 46px space?

#data-wrapper { background:url("../images/repeat-bg.png") repeat-y 0 46px transparent;} I want to start repeat-bg.png as a repeat-y but after 46px area from top of #data-wrapper. Is it possible to do like this? ...

Escaping large number of characters for display on XHTML web page via Java.

I have an embedded device which runs Java applications which can among other things serve up XHTML web pages (I could write the pages as something other than XHTML, but I'm aiming for that for now). When a request for a web page handled by my application is received a method is called in my code with all the information on the request i...

How to add a favicon to a xhtml document

I made a windows icon (*.ico) and named it favicon, it is 16 by 16 and with 16 colors... I have included it with the link tag but it does not load right how do I add a favicon to a website in xhtml I tried everything on the web but it still does not work how do I do it ...

jQuery minusing padding when animating left value? Strange.

Hey all, I was working on a slider using an unordered list. Standard structure, example (not the same code I'm using): <div style="overflow: hidden;width: 500px;padding: 20px;position: relative"> <ul style="width: 1000px;position: relative;padding: 0;margin: 0;list-style: none;"> <li style="width: 500px;padding: 0;margin: 0;flo...

Are there any examples of sites that use the role attribute in HTML5/XHTML?

I've been looking at the use of the role attribute for HTML5/XHTML in the W3C: http://www.w3.org/TR/wai-aria/roles and was wondering if there are any sites that use this or examples of how/when to use the role attribute. I understand how it works, but would like to see how other people have used in their sites/projects. Also, am i corr...

Error while trying to use Sax Parser on xhtml file

Hi! I'm trying to parse an xhml file using SAXParser in Java, but gets an exception: "java.net.MalformedURLException: unknown protocol: g" The line made that exception was: SAXBuilder.build(Destination) While Destination is the full path to the xhml file. The beginning of the xhml file is as followed: <?xml version="1.0" enc...