html

how to implement javascript "star" function of Google search result page?

Hello everyone, When in Google search result, in each entry of search result, there is a "star" nearby, and end user could click the star to indicate whether the result is good or not. I believe this function is implemented in Javascript. My question is, I want to implement a similar function in my own web application. Which is there i...

Simple question: Do I need to specify width, height of "image" when preloading images?

I have this code: if (document.images) { preload_image = new Image(25,25); preload_image.src="http://mydomain.com/image.gif"; } First of all, will this work in all major browsers? Secondly, do I need to specify the width and height like in the code? Lastly, will this preload my images and cache them? Thanks ...

Android: How to use the Html.TagHandler?

Dear people, I am trying to build an android application for a message board. To display formatted html for the post contents I have chosen the TextView and the Html.fromHtml() method. That, unfortunately, covers only a few html tags. The unknown tags are handled by a class that implements TagHandler and has to be generated by myself. ...

How to remove all child nodes from parent using FBJS

So, I need to remove all the child divs from a parent div using FBJS. I basically want to end up with an empty container div. Here is the code that I am using right now. var events_next = document.getElementById('events-next'); for(var i=0; i < events_next.getChildNodes().length; i++) { events_next.removeChild(events_next.getFirstChil...

Date not showing on consecutive posts on Wordpress

Hi everyone, I have a news section that shows posts only with a category of "news". The code is shown below. The problem is, only the first news post gets a date above it. All the posts following the most recent "news post" don't have dates. Anyone have any idea why this is happening? Thanks! Amit <div id="news"> <?php ...

HTML Formatting in the Automated Mail Content

StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); String rowFormat = "%8s %8s %8s %8s%n"; pw.printf(rowFormat, "Col A", "Col B", "Col C", "Col XY"); pw.printf(rowFormat, "A", "19", "Car", "55"); pw.printf(rowFormat, "X", "21", "Train C", "-4"); pw.printf(rowFormat, "B", "-9", "Bike", "0"); String message = sw.t...

Sprite Sheets for Web Development

I'm currently working on a new site. I'm just a few pages deep and they all use <img>s. I was thinking about it and decided to look into using a sprite sheet for all of the button images and such and then just using CSS to render the appropriate images. I wanted to see what everyone thought about this. Is it worth the effort? How does it...

Javascript + CSS Input style variations

Hi guys This is my first question on stackoverflow, I have found this site very useful in the past and although I do not have a specific question I would like anyone's input. I love Prototype JS and use it to design my own components frequently, my problem is presenting data to users so they can make a selection, i know all the obvious...

Streaming Audio on my website

I am interested in streaming audio on my website, but I have no clue where to begin. There are two types of streaming I hope to achieve. The first would be streaming a playlist of songs stored on the server and the second would be live audio streaming. Can anybody recomend any good sites or plugins to use? ...

Active scripting is enabled on ie but my javascript is not showing up

I have a site created using .net and the ajaxcontroltoolkit. When some users log on they do not see the controls on the page. I can duplicate this if I disable active scripting in ie. The problem is that the users I have spoken with have active scripting enabled. I have had them navigate to a site that tests javascript and it passes. Has...

Hyperlink a particular section in a html page

Is there any possibility of me hyperlinking a specific part in a html page. Suppose i have a big image, When i click on the left side i would like to hyperlink it to a partcular image and when i click in the middle to another and on the right. I want to do this without cropping the image into 3 parts. any idea how this can be done ? ...

Placing Place Holder for Image

I have an image icon in an HTML page that should show right to a label only when some condition is true. If the condition is false, it should not show, but it should still take up the same space. I'm sure most of you have done something like this and I got a couple of solutions. Put the img tag as usual but add to its style attribute ...

unable to remove border when i have an iframe within an iframe for IE

i have an iframe nested inside another iframe, and for both iframes i have these attributes: frameBorder="0" marginWidth="0" marginHeight="0" scrolling="no" Ive also tried: style="border: 0px; margin: 0px; padding: 0px;" It seems that no matter what I try, the border of the inner iframe keeps showing, as well as the padding withi...

Submitting the value of a disabled input field

I want to disable an input field, but when I submit the form it should still pass the value. Use case: I am trying to get latitude and longitude from Google Maps and wanna display it, but I don't want the user to edit it. Is this possible? ...

How to display the content of a tab when a button is clicked

I have a page, home.php. On the page, I have CSS tabs tab1 and tab2. The tabs are on the same page not different pages. I want the content of tab2 to display whenever I click the submit button in the content of tab2, not take me back to tab1. How can I use JavaScript to implement this behavior? <html> <head> <title>home</title> </head> ...

transparent background with 1px borders?

Is it possible to have a div tag that has 1px black borders and a transparent background, so only the borders are showing? is this possible? Any examples? A really appreciate it. Erik ...

html tag in php variables

given a php variable $a="<b>hello</b>"; echo $a; //prints <b>hello<b> But I want it to print hello in bold with the formatting. Please tell me what I should do... ...

place background image outside of a <table> <td> <tr> borders in embedded html mail

Hi, Looking through some html email examples, I noticed is all about tables. I wanted an image inside of one of the rows of the main table to look like half of the image is outside the table and the other half inside. I can't get the solution to do that. Any helps would be appreciated, really appreciated Here's is what I like. The o...

Cleaning and stripping of strings/HTML - Python

Hi folks, I have a set of questions, of which I do not have an answer to. 1) Stripping lists of string input: 'item1, item2, \t\t\t item3, \n\n\n \t, item4, , , item5, ' output: ['item1', 'item2', 'item3', 'item4', 'item5'] Anything more efficient than doing the following? [x.strip() for x in l.split(',') if x.strip()] 2) Clea...

Free (preferably) PHP RTF to HTML converter?

Hi, I am writing a converter for an old db app which contains a large amount of user entered RTF text. Ideally, the RAW RTF should be converted to HTML for display in a browser. I have tried rtfparseclass from PHP Classes, which works ok, but seems to be thrown off but some of the embedded font definitions. For example, raw RTF like {\...