html

Using Markdown, how do I center an image and its caption?

I want to end up with: Hello there! <image> This is an image Hi! Where the image and the text This is an image are centered on the page. How do I accomplish this with Markdown? Edit: Note that I'm looking to horizontally center the image and text on the page. ...

Image in Button: Strange space

First the result in Firefox 4 Beta 8: The former element shown is a button with an img the latter is a div with an img. As you can see in the former case there is some strange space between the border of the img and the border of the button. I wonder how I can remove it. Here the CSS file: * { margin: 0; padding: 0; } butto...

How to get Plain Text from HTML editor in ASP.NET AJAX Control Toolkit?

How to get Plain Text from HTML editor in ASP.NET AJAX Control Toolkit? Editor1.Content gives HTML text like This is <span style=\"font-weight: bold\">BOLD</span> text while i want plain text only This is BOLD text ...

iframe dynamic height width change based on inner content

Hi, I have iframe with content like below, <iframe frameborder="no" src="http:localhost/com" id="iframe"> <div style="height:850px;width:700px;">div text </div> </iframe> This shows the iframe with hori. and vertical scroll but not the height on inner content of 850px. how can i change the iframe height dynamiclly base...

Problems of IE when using Jquery

I am acessing the sibling of a checkbox using parentNode.nextElementSibling.value;It will returns value and works fine in Firefox.But in IE it is saying Object is null and saying Microsoft JScript runtime error: 'parentNode.nextElementSibling.value' is null or not an object My function is as follows function chkEnergy() { ...

Centering a ul with floated li

I have <div id="container"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </div> With the following CSS: #container li { float:left; height:33px; line-height:30px; text-align:center; width:auto; } #container{ width:600px; } However I am having difficulty in horizontally centering the ul inside #container. It appears ...

HTML formatter/tidy/beautifier for JavaScript

Is there any HTML formatter/tidy/beautifier out there written in JavaScript? I have made a content editor (CMS) which has both WYSIWYG and source code views. The problem the code written by the WYSIWYG editor is normally a single line. So I would like a JavaScript that could format this into a more readable form on demand. ...

How to load CSS using jquery

Hi , I have loaded a css file on server so I am having a URL with me. How can i load it in my perl code using JQuery ? So currently I am hardcoding the css in my mason page which is missing from the page something like this JQ.onReady('show', function(){ JQ.addStyles({styles: ["\n\n.ap_classic { border-top:1px solid #ccc;border-le...

ASP.NET Html table performance on rendering

Hi guys, i need to create an html report where i've to put a table into. This table is composed by 265 rows and a variable column number (between 1 and 150+). Problems start when i try to render a report with 20+ columns: data fetching from db is fast, but rendering the result in the html table is very slow! I create the report in the ...

How to get the object which fired the event in jquery?

In javascript, we have event.srcElement that gives us the element on which some event is occured. Is there any way by which we can get this object in jQuery. Also, function myFun(){ alert ( $(this) ); // what do this object represent? Is it what i need ? } ...

Javascript event propagation with image map

Hi, I'm making an image map of the world map where moving the mouse over different parts of the world should highlight that part of the world. I do this by loading images of the different regions into an (initially) empty 'div' and positioning them on top of the world map with css and absolute positioning. It works well except that th...

Problem with floating CSS containers with variable width

Hi, I have 3 floating containers of unknown width. The surrounding container has a fixed width. ------------- | X | X | X | ------------- Inside the third container there are again floating elements: --------------------------- | X | X | X [ O | O | O ] | --------------------------- What happens when these elements execeed the wid...

Iterate over the options in a HTML select with jQuery

Hi, I got this example from a blog, but every time I do this: $(':input[name=' + inputName + ']').each(function(i, selected) { alert($(selected).text()); }); I got all an alert with all the options together :( I have to search by the input name always, the inputs have no id. Which is the right way to do it? Kind regards. ...

WYSIWYG Editor without IFRAME

is there any WYSIWYG HTML Editor which works without IFRAME ? ...

Remove repetition in <select><cfoutput><option>

I have an drop down in an Update form ‘id=”tak_id”’ being populated from an query”takType”. The drop down box has three options “sms, chat, tweet” with three different values”001,002,003”. The SELECTED value in the field is being repeated twice.How can I make the SELECTED value appear only once? The code is below <cfselect name="t...

How to create Html lock on part of page using JS? (may be Jquery)

I want a part of my HTML page to be visiable to users with enabeld JavaScript only after clicking on to some button, while users with no JS support will seeit always. So I mean we have a normal page with header and body but with no footer unteel some button is clicked. (while wievers that use no JS modes will see footer always.) ...

Firebug source and Mozilla Source difference

I have PHP generated HTML. Firebug shows me this source: <div class="module-header"><div class="module-header2"><div class="module-header3"><h3 class="module-title" style="visibility: visible;"><span>Մարդկային</span> ռեսուրսներ</h3></div></div></div> Mozilla Source shows me another HTML for that part. <div class="module-header"><di...

WPF Save WebBrowser HTML

Does anyone (please) know how to do this? I thought that there would be an easy way to achieve this but can't find anything about saving the contents of WebBrowser HTML. ...

Export HTML files from a SQLite 3 database (Ruby on Rails app)

Hi all, I'm new to Ruby on Rails, looking at using it for an app that I need to create. The story is: I'm using rails generate scaffold Page url:string parent:string content:text to create a Page scaffold. So we can then input a URL (hello-there.htm), a parent (my-folder) and lots of text, images, etc for the page into a web form, and ...

Bind "up" element in jQuery? it's possible?

Example: $(X).bind('click', function() { alert( 'Two' ); }); $(X).bind('click', function() { alert( 'Three' ); }); $(X).bind('click', function() { alert( 'Four' ); }); $(X).bind('click', function() { alert( 'Five' ); }); **$(X).bindUp('click', function() { alert( 'One' ); });** When the user click X the output should be: alert( 'One...