html

button vs input type="submit" vs a onclick="document.formname.submit()"

Hi guys, Just trying to implement these buttons at the moment: http://particletree.com/features/rediscovering-the-button-element/ Can't decide which to go for, since here we mostly use IE6. As far as I can tell... button: Lets you submit the form as usual (ie hitting enter on the form), lets you disable it, standards compliant, does...

HTML Printing using Gecko or Webkit engine

Is there a way where I can directly print html file or url without invoking any dialogs in .NET? ...

What gem can I use to generate a HTML file for offline use?

I have to create a report, and in order to do some colouring and tables, I decided on HTML. Is there any gem I could use to do this? I'd like to avoid having to write the tags myself. ...

Bug in Mobile Safari regarding HTML LINK

My native iPhone app displays HTML files using UIWebView. These HTML files are stored locally on the iPhone (they ship with the app). Now I'm also trying to use a central CSS file in the HTML files, using something like: <link href="../../stylesheet.css" rel="stylesheet" type="text/css"> In Safari, this works, the HTML files look OK. I...

Python and BeautifulSoup, not finding 'a'

Hey, Here's a piece of HTML code (from delicious): <h4> <a rel="nofollow" class="taggedlink " href="http://imfy.us/" >Generate Secure Links with Anonymous Referers &amp; Anti-Bot Protection</a> <span class="saverem"> <em class="bookmark-actions"> <strong><a class="inlinesave action" href="/save?url=http%3A%2F%2Fimfy.us%2F&amp;tit...

How do you solve "unstructured" navigation in PHP?

I have a large, PHP-based CMS that manages web pages. All items are organized in a tree structure. When I edit an item, the "back" button usually points to its parent item. So, the usual workflow is navigating through the tree. Now every now and then, the need arises for a workflow that "jumps" to other items without regard for the stru...

c# converting HTML to JPG

I am trying to download image from HTTP URL to my computer via c#. Example picture: http://www.hcs.harvard.edu/csharp/Logo1.png I am using cURL to fletch it. Then I am saving it to computer as picture.jpg, but the file is corrupted. It is not recognized as picture What is the correct way of doing this ? Thanks ...

Firefox 3.5 eating body margin on random sites?

Since a few days, I have noticed on several, not related pages that a few seconds after loading (maybe onload), sometimes (about 1 time in 50), FF 3.5 swallows the left margin of the body tag (I suspect) and the whole content moves to the left. Reloading the page or re-entering the address will not help: The margin stays missing. Going...

Why is the rendering of this CSS such a problem for IE 6?

I am rendering a small menu in the upper right-hand corner of a web site. There will always be a "Banner" graphic across the top of the page (1024x80 pixels) and the menu must render on top of it. In IE 7, IE 8, FireFox and Safari, the menu looks fine. In IE 6, however, the menu does appear sometimes and fails to appear at other times...

is newline (\n) not working for innerHTML in IE?

Hello I am facing the following problem: I have a HTML document where I want to print basic status/debug/etc messages. So, the HTML document contains an empty pre-element whose id is out: <body onload='init () && main();'> <pre id='out'> </pre> </body> </html> The init() function assigns the pre element to a variable: var out_d...

Getting element inner text ONLY when an <img /> tag exists inside using jQuery 's html()

I'm trying to get the html inside several elements like this: <div class="option s12 pointer"><img class="fl mt2" src="http://web.iboomerang.com/icons/fff/magnifier.png" /> Trainings by date</div> Is there a way to strip the tag (like PHP's strip_tags does) and leave only "Trainings by date". Note: I need to avoid using functions li...

Line break through CSS property?

In a chain of list elements (<li>) with display: inline, is there a way to force a line break using a CSS property? Using a <br> within a <li> feels dirty, and outside a <li> is probably forbidden. to clarify: I need them "display: inline" because I may need to center them within the UL I need only some of the elements to...

How do I force the browser to render the tags rather than reveal them to the user on altered div:innerHTML?

I'm allowing the user to select text contained within <div></div> and change it to bolded text. In other words from <div>this is some text</div> to <div>this is <b>some</b> text</div>. All is working except that when I change the div.innerHTML to this is <b>some</b> text, the <b>some</b> tags are shown to the user rather than being rend...

How to add this javascript made table into the page ?

I have this function which gets some variables and adds shadow to them, and the displays them in a table. My Question is, how can I add the table into the DIV, which I have on my page? It's probably really easy, just that Im new to javascript. Thanks! function drpShadow(pic_url, width, height) { var i; var pic_display ...

Site not looking good in Firefox

Hey guys, A site I constructed on wordpress, www.instant-wine-cellar.co.uk, does seem to be working well on Firefox web browser. I was wondering if any one could help me work out why that is (maybe using firebug). The stylesheet is a file called style.css and the reset stylesheet is reset.css. It looks normal in any other web browser. ...

How do I automatically generate "related articles" for my newspaper site?

Can I do it just using html and css? How do I do this with "most viewed articles"? ...

How to execute a hyperlink automatically through php

I had a hyperlink like this http://www.mywebsite.com/sendmessage.php?uid=siva&amp;pwd=mani&amp;phone=newairtel&amp;msg=dg Normally in HTML we put href to that link and the link will open after the user click that link. But I want that link to be executed automatically without user interaction using PHP. How can i get it. Plz help. An...

PHP calculation

I'm trying to output a value from xml this is what I do - <?php echo $responseTemp->Items->Item->CustomerReviews->AverageRating; ?> This outputs 4.5, but when I change it to the code below it displays as 8. Why isn't it displaying as 9? Thanks. <?php echo $responseTemp->Items->Item->CustomerReviews->AverageRating*2; ?> ...

Why is the <center> tag deprecated in HTML?

I am just curious as to why the <center> tag in HTML was deprecated. The <center> was a simple way of quickly center-aligning blocks of text and images by encapsulating the container in a <center> tag, and I really cannot find any simpler way on how to do it now. Anyone know of any simple way on how to center "stuff" (not the margin-le...

DIV width and height wont resize when setting innerHTML ?

When I set an image to the innerHTML of a DIV container, the width and height of the DIV is still not changed. The div has border:solid style and the border is like "outside" the image... So the image is shown fully, but it streches outside the div borders, but still shows anyway. Is this a problem ? Should I use the DOM method instead...