html

How to highlight input text field upon clicking it in Safari?

I would like the value of the input text box to be highlighted when it gains focus, either by clicking it or tabbing to it. <html> <body> <script> function focusTest(el) { el.select(); } </script> <input type="text" value="one" OnFocus="focusTest(this); return false;" /> <br/> <input type="text" value="two" OnFocus="focusTest(this)...

Writing CC (The Creative Commons logo) in HTML

Hello, How do I write the CC logo in HTML, is there something like &copy; which gives ? CC stands for Creative Commons. Thanks. ...

Customize how Outlook desktop alerts will appear for my email recipients

Is there any way to force Outlook to display HTML in the desktop alert instead of text for a multi-part message? Is there any way to customize what text will appear? Or is it always the first 2 lines of the email? ...

Software that clicks e-mail links on page?

We are experiencing a strange bug on our website which we think is related to the software installed on user's computers. We have an e-mail link on a lot of pages, which is created using Javascript (so spambots won't get it). It seems the link is "clicked" automatically on some user's machines. Some users then discard the window by clic...

Site for mobile phone display

Hi friends, Here i need to create a site that should support all Internet accessible mobiles. May i use javascript, in Some forum they told that javascript doesn't work's in mobile phones. Suggest me clear, In mobile phone javascript work or not ? Thanks ...

Is there any way to specify a suggested filename when using data: URI?

If for example you follow the link: data:application/octet-stream;base64,SGVsbG8= The browser will prompt you to download a file consisting of the data held as base64 in the link itself. Is there any way of suggesting a default file-name for the browser to use? If not, is there a javascript solution? I'm referring to HTML hyperlinks...

Centering a div block without the width

Hi, I have a problem when I try to center the div block "products" because I don't know in advance the div width. Anybody have a solution? Update: The problem I have is I don't know how many products I'll display, I can have 1, 2 or 3 products, I can center them if it was a fixed number as I'd know the width of the parent div, I just d...

How would you prefer <script> elements handled?

Imagine the following. Html is parsed into a dom tree Dom Nodes become available programmatically Dom Nodes may-or-may-not be augmented programmatically Augmented nodes are reserialised to html. I have primarily a question on how one would want the "script" tag to behave. my $tree = someparser( $source ); .... print $somenode->...

CSS Table Styling

I need to style a table to have rounded corners, and look like the screenshot: I'm just looking at how best to go about it: Normally when I style a div to have rounded corners, I use 2 divs with empty comments at the top and bottom, and apply sizing & background image CSS to them. The table, however, has internal borders, so I'd ha...

Show 'ghosted' example text in a field, and then clear it onblur

I'm trying to duplicate the effect used in the Firefox search box where, if the search field does not have focus ( the user has not clicked inside of it ), it just says Google in gray text. Then, when the user clicks in the box, the text is removed and they can fill in their search term. I want to use this to provide example field data ...

Converting Plain Text to Clickable link or Link to PlainText in asp.net

Hi, I need your advice with converting plain text to an URL. The scenario will be this: The user will select some entry and then click a "convert to link" button. The entry text the user selected will convert to (link: selected_text). I do it with JavaScript. And after that, when he clicks the Save button to save all his entry, I don'...

Style html text input size to match its contents

I've asked a few other questions here about this system, so I'll try to avoid repeating a lot of detail. The short version is that I have many html pages, each with a form that accepts input, but never saves the input anywhere- they are only ever printed out for mailing. A previously developer who had never heard of @media print did th...

CSS cleaner

I've taken over looking after a fairly complex site developed by another company, and frankly it's a mess. One of my problems is that there seems to have been no discipline when writing the html so that although they have used css extensively, there are half a dozen css files and a cursory analysis reveals that there is a significant nu...

Find html label associated with a given input

Let's say I have an html form. Each input/select/textarea will have a corresponding <label> with the for attribute set to the id of it's companion. Given an input element in javascript --via an onkeyup event, for example--, what's the best way to find it's associated label? ...

Decomposing HTML to link text and target

Given an HTML link like <a href="urltxt" class="someclass" close="true">texttxt</a> how can I isolate the url and the text? Updates I'm using Beautiful Soup, and am unable to figure out how to do that. I did soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(url)) links = soup.findAll('a') for link in links: print "link co...

Parse HTML via XPath

In .Net, I found this great library, HtmlAgilityPack that allows you to easily parse non-well-formed HTML using XPath. I've used this for a couple years in my .Net sites, but I've had to settle for more painful libraries for my Python, Ruby and other projects. Is anyone aware of similar libraries for other languages? ...

how to force php to use utf-8 charset

errr im not sure if my question's title is clear enough but i'll try my best to explain i really am not sure about how php executes the function mysql_query in terms of retrieval and storageof strings, does it recognize any character set encodings used in the table? and does my browser by default overrides any character encodings sent th...

Can I print html files (with images, css) from the command-line?

I want to print styled html pages with their images from a script. Can anyone suggest an open-source solution? I'm using linux (Ubuntu 8.04) but would be also be interested in solutions for other operating systems. ...

abcPDF 7 converting HTML to PDF but only getting the first page converted

I'm currently using abcPDF 7 to convert HTML to PDF. This is done via an ASPX page where I override the Render method. Doc theDoc = new Doc(); theDoc.SetInfo(0, "License", m_License ); theDoc.HtmlOptions.Paged = true; theDoc.HtmlOptions.Timeout = 1000000; string callUrl = "http:// my app page"; theDoc.AddImageUrl(callUrl); Response.Cle...

How do you convert Html to plain text?

I have snippets of Html stored in a table - not entire pages, no tags or the like, just basic formatting. I would like to be able to display that Html as text only - no formatting - on a given page (actually just the first 30 - 50 characters but that's the easy bit). How do I place the "text" within that Html into a string as straight...