html

Python, parse html form

Hello, how i can get input from the html forms. To receive such dictionary: form = [('name' = 'somename', 'type' = 'text', 'value':''},{' name' = 'somename', 'type' = 'submit', 'value': ' submit '). Sorry for my English. ...

Change CSS style using Javascript only

Possible Duplicates: Changing a CSS rule-set from Javascript How do you add CSS with Javascript? .message{ display:inline; } How can I set all tags with the class message to display:inline? without using jQuery ...

Which technology should one use while designing a web app - HTML5 + CSS3 or HTML4 + CSS2 ?

Hello, If I want to work on a web app with 2-3 months of timeframe in mind, which technology should I use? HTML5 + CSS3 or HTML4 + CSS2? Few points I am considering Compatibility of browsers Ease of use (especially with IE) Advantages over html4 Learning curve ...

How to know which jQuery button was clicked in list context

I have a list of stories on a page and each has several jQuery buttons for different actions. When the button is clicked, I need to know what story it is was clicked for. Currently I have each story wrapped in a div with an id of format story_<story_id> and then in the handler I traverse up and parse out the id. <div id="story_1" cl...

Selecting an option by its text

Hi, I'm developing a web page using django and I want to add some javascript to a form using jQuery. Basically I want to select an option in a form depending on an another selection. I need to use option's text and not option's values because option's values are generated dynamically by django. An extract of my code: javascript $...

Background image reflection

So I have a background image(background:url(my_image.jpg) no-repeat;), and I need a reflection for that picture, you can see here, what I mean: http://www.imgmodels.com/. Is there a way to do that, using a JS script or css hacks...? Best Regards, ...

Textarea in chrome only shows one line

Hi I have a form with a text area for comments. The problem is my code below should produce a textbox 3 rows high but when it is displayed in Chrome it only ever appears as one line , Can anyone suggest what I am doing wrong please? <tr> <td >&nbsp;</td> <td ><strong>Approver Comments</strong></td> <td colspan="3" > ...

ASP MVC 2 Dynamic Href By Javascript

Here is the deal: My link: <li><% =Html.ActionLink("Scheme", null, null, null, new { @id = "schemeid" })%></li> JavaScript for changing href: <script> document.getElementById('schemeid').href= "Test/ALL"; </script> Its working in any browser on ASP.NET dev.server on vs2010; but when i host it on iis 7. it fails. and in source ...

How to make <div> fill <td> height

Hey all, I've looked through several posts on StackOverflow, but haven't been able to find an answer to this rather simple question. I have an HTML construct like this: <table> <tr> <td class="thatSetsABackground"> <div class="thatSetsABackgroundWithAnIcon"> <dl> <dt>yada </dt> <dd>yad...

CSS looks bad in Opera and IE; where should I start?

I have just completed my website, and it looks good in FF, Safari and Chrome. Opera looks alright, but not as good as FF. IE looks very bad. Is there any application for checking bad CSS and just fix it? If not, what is the easiest way to cross-browser adjust a website? Below is only one of the many problems I have with appearance... ...

google map dragging like in maps.google.com

Hi all, I just want to add the effect of map momentum by the dragging of map as in maps.google.com has. currently on my map where i stop dragging the map stops there but in maps.google.com if you drag a mouse the map will not stop there it will continue the movement in the same direction for a second or few cordinates (i dont know basic...

Problem loading ASP.NET report in iFrame with Internet Explorer

Hello, I have seen multiple posts and websites regarding this issue, yet none of the solutions / workarounds posted have worked for me. I am trying to load an ASP.NET report into an iFrame. The iFrame will load correctly (across all browsers), but when I run the report, Internet Explorer only will show the following error: "ASP.NET ses...

jQuery thickbox 3.1 and mobile safari

I'm using jquery tb 3.1 and having issues using it on the iphone and ipad...so i'm assuming mobile safari is the issue. what happens is no matter where the user is on the page if they click a hyperlink that opens the thickbox window, you have to scroll up to see it. it's staying aligned at the top and the greyed out TB window doesn't fi...

How do I submit forms with the Enter key without a submit button.

I have jQuery go though all the submit buttons with the class button, and turn them each into an anchor element with the class button. $("input.button").each(function(i) { var anchorButton = $("<a class='"+this.className+"' href='#'>"+this.value+"</a>") anchorButton.click(function(eventObject) { $(this).blur().prev(...

What is a meaningful format to save formatted text in the database?

I have an existing application that has some parts of formatted text-blocks (standard formats such as bold, italic, unordered list, …) saved in the database. Currently these text-blocks are saved in a custom xml format. The editor is created with a WPF-RichtTextBox. Since I have to make the editor more user-friendly and extend the appli...

Prepending "http://" to a URL that doesn't already contain "http://"

I have an input field that saves a URL, I'd like this saved input to recognize when "Http//" is absent from the start of the variable but have no idea where to begin... is it possible to check only a portion of a string? - then have a function that will append if necessary? ...

Identify HTML block elements in jQuery

I have simple one column HTML files (ebooks from Gutenberg Project). I want to identify in the DOM the block elements (like <h1> <p> <div> <table> etc, not <a> <em> <b> etc) and enclose them in <div> tags. Is there any easy way to do it in jQuery? Thanks ...

Preloading images before webpage loads

Hello, it's my 1st question here, so pardon if something is asked wrong :) I want to preload 3 images before webpage is loaded so all of them would appear in the same moment. Right now images are loaded one after another and it looks kinda choppy. One image is defined in css (), other two are plain simple "img" element. I've tried crea...

Resizing a HTML canvas blanks its contents

I have a HTML canvas element which is resized when the user resizes the screen. canvas.height = pageHeight(); canvas.width = pageWidth(); The actual resizing works fine, but it blanks the canvas. I would like to keep the contents. Is there another method of changing the size of a canvas element, or is there a way to store the content...

libxml2 HTML parsing

I'm parsing HTML with libxml2, using XPath to find elements. Once I found the element I'm looking for, how can I get the HTML as a string from that element (keeping in mind that this element will have many child elements). Given a document: <html> <header> <title>Some document</title> </header <body> <p id="...