html

Problem loading remote html source code using JDOM

I am trying to use JDOM to load the source code of a remote HTML file (a Blogger's profile). I have this code: public Document getDoc(URL url) throws JDOMException, IOException{ SAXBuilder saxBuilder = new SAXBuilder(); saxBuilder.setFeature("http://xml.org/sax/features/validation", false); saxBuilder.setFeature("http://apac...

Not encoding already encoded items with htmlentities

I have a string that looks something like this: Bürstner    When I use htmlentities() on it, I set the double encode param to false, but it still ends up re-encoding the   into   I'm using this to encode: $out = htmlentities($string,ENT_NOQUOTES, 0); Am I somehow misunderstanding how this works? The desire...

Tabbed Navigation Using a List

What is the best way to adjust the li elements to fill the entire width of the div the tab bar will be located in? ...

convert PSD to website

Hi there' I'm learning web dev and I am already stucked at some point.. How do I convert a PSD template to a html/css website ? I've cropped all part of the image and saved them in .gif separately, but then ? Do I have to manually place them in a dreamweaver empty template ? I thought there was an automated way to do so.. Also, I'v...

Is there an HTTP header to instruct the browser what host to use for relative href and src attributes?

I am retrieving a page from another host and then initializing the FORM with data from a DB, before sending it on to the end user; but I need to make the URLs in hrefs and srcs absolute so my browsers load them from the right place. Can I set a HTTP header to cause this to happen without modifying the HTML? ...

Multiple rows have multiple submit buttons, should I make a form for each button?

I am listing about 20 rows, each row represents an Order. Each row needs to have 3 buttons, each button click will perform a different action. I have 3 actions to handle each button post request, I am just unsure how to setup the Html forms for each button. <tr> <td> <form method="post" action="/orders/do1"><input type=button ... /></...

Please help me fix this Jquery function and figure out a fallback in case Javascript is disabled.

This code is supposed to get the id from a clicked anchor tag in the middle of a ul with the id 'links' and then use that id for other purposes across the page, however the alerts have shown me that I keep getting 'undefined' as if the element has no id. I double check my source code and they do indeed have ids, so I'm not sure what the...

Escape url on a html tag

Hi there. I'm doing this: <a href="http%3A%2F%2Flocalhost%3A8080%2Fnews.xhtml%3Fid%3D32%26lang%3Den" target="_blank" /> and when this is rendered, the link points to: http://localhost:8080/news.xhtml?id=32&amp;lang=en I need that this link points to the url encoded and not to the one decoded. Does anyone knows how to escape it? Upd...

Easy way to upload files to S3 via HTTP Form

I have written a tiny web appication in python that allows me to browse my S3 buckets. The web appication runs inside the Google App Engine. Now, I want to create a html form for this web appication that allows me to upload a file into the bucket. These information are already inside the form: AWSAccessKeyId and the name of the bucket...

Prepending form name, subform name to id of zend dojo form

I am using Zend Form and Dojo. I have a whole bunch of ids that are identical. If you look at the following code you can see my current look : <dt id="addElement-label">&nbsp;</dt><dd id="addElement-element"> <button name="createEventForm[categoryDetail][addElement]" id="createEventForm-categoryDetail-addElement" type="button">addElem...

Why firefox shows <object> and internet explorer shows <iframe> ?

Why if i use <object> in place for <iframe>, but IE shows <iframe> in rendered source. ...

nested html FORM is inaccessible - multiple forms problem

Here is the scenario, I have 3 html forms on a page and they look like form1() form2(form3()) a dummy program to test out the 3 forms __ <script language="javascript" type="text/javascript"> function submitthisform(no){ document.forms[no].submit; } </script> <form action="http://cnn.com" name="1"> <input type=submit value="c...

Regex of non breaking space in php

input: $string = "a b c d e"; i have a string in php and I need to replace the string with the non-break space code output: "a \xc2\xa0b c \xc2\xa0d \xc2\xa0\xc2\xa0e" single space and the first space is not allowed to replace with \xc2\xa0 when two space appear " ", the output is " \xc2\xa0", first space is kept and the se...

How to write xhtml and css printer friendly? How to save printer ink with print css?

I'm not talking about just to mke print css or media=print Questions: I am talking what other things we should do in XHTMl and screen css and print css (other than disply:none in print css) we should care to get good print from website pages. And do we need any special care for images, background images in css, flash, silverlight, ifr...

How to make div height increase to include floated image

This is the problem. I have an div which includes a few paragraphs of text in it and then an image which is floated right. The image floats right as it should but the containing div does not expand vertically to accommodate for the image. I know that I can manually set the height of the div but this becomes problematic because I would...

Scrollbar at dropdown list

Hello, Currently I was trying the jquery,css dropdown which is from here. http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx I added so many list. But scrollbar doesn't come out and list is too long. Here is the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3....

login form for admin using html

How to create a login form in html without using php. I'm doing this for an administrator account so that the admin information cannot be found on a database. Any idea on how to do it? ...

Static message above the page in html

Hi, I have a web page with lengthy contents. I just want to put some message at the bottom of the browser window and this message should always be visible even if you scroll down the page. can you guys tell me how to go that with simple css, html, jquery or in PHP thanks ...

jQuery/AJAX: each, if, post, .html: Runs but randomly deletes data

I've got a PHP page, with FedEx & UPS tracking numbers in a MySQL database echoing into ID's of DIVs with the class "trackingnumber". My JS each's through those divs and grabs the ID to then post to a PHP page that polls Fedex/UPS and echos the result from them. That works great, except for one thing. It randomly deletes the data after i...

How do you append rows to a table using jQuery?

Hi I was trying to add a row to a table using jQuery, but it is not working. What might be the reason? And, can i put in some value to the newly added row..? Here is the code: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $('a').click(function() { $('#myTable').childs('tr').app...