html

Changing display property dynamically

I want to change the style:display property (none or block) of my div (displaydiv) according to the value of a global variable (disp). I want to check the value of this variable on page load and set the styel: display according to the value disp. i set the value of disp as "none" in javascript. i want to change the value within HTML TA...

Copy cell value from table to textbox

I have the following table. I want to copy Id value on the seleced row to the text box. If I click on link "Select" in the first row the text box value will 0001. If the table needs modification to get result better and faster, please leave your suggestion. <div> <input id="selectedId" type="text" /> </div> <table cellspa...

Resize large image to fill defined space without stretching

Hi, I'm attempting to make a 2x2 grid with each cell 300x300px. Each cell has an image, which fades in and out, reloaded using AJAX ( jQuery to be precise) - creating a 4 image gallery over ajax. All images are simply dumped into a folder, so there is no defined height or width of them. Is there any way by which I can have the fill th...

Should images have a "name" attribute?

I notice Dreamweaver creates a name attribute automatically with the same value as id, which I wouldn't have thought to do. I read this question asking the difference between name and id attributes in HTML, but what about where it applies to images? ...

.htaccess redirect

Hi all, Just wondering if someone can help me with the following issue. I want to redirect my site to a subdomain, whishc simply displays a maintenace page, allowing me to work on the main site. So I have the following code for my .htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.d...

How to create a textarea with jQuery and/or javascript ?

I need to create a textarea with jquery and/or javascript. I am using this code ( click here for preview ) but backspace, enter, simbols and lowercase doesn't work. Why ?: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; <meta charset=utf-8 /> <title>TEST</title>...

How do I create a simple HTML table with hyperlinks from a hash in Perl?

I have a Perl hash of "people" like this: my $data = { 124535 => { NAME => "abe", AGE => 100, SEX => "m", HOMEPAGE => qw (http://abe.knaan.old) }, 54478 => { NAME => "joe", AGE => 18, SEX => "m", HOMEPAGE => qw (http://slappy.joe.com)...

proper indenting for ordered lists in html

I cannot get an ordered list to show proper indenting. The numbers are all aligned to the right. So the browser (Chrome) shows a space before the single digit numbers and only aligns the double digit numbers correctly to the left. How can I output a nice ordered list where the numbers are all aligned to the left and the list items all s...

Add rounded corners to a rectangle raster image

What is the best way to make something like a mask with rounded corners for an image using CSS/JS/HTML? So, I need to add rounded corners to a rectangle image. I thought about adding 4 graphic elements like this one above the image at its corners to hide some little parts of the image. Here red color is, for example, for using on the re...

Parsing Random Web Pages

Hi, I need to parse a bunch of random pages and add them to a DB. I am thinking of using regular expressions but I was wondering if there are any 'special' techniques (other than looking for content between known text/tags). The content is more(not always) like: Some Title Text related to Title I guess I don't need to extract complet...

HTML\CSS: change cell background for hover state with CSS

look at this jsFIDDLE sample i want to change the cell background color for hover state with CSS.. it can be attained through JavaScript but i want to do it with CSS... plus i want the whole cell to act as a link how to do it ...

BATV; What is it and how is it configured?

I have tested my email server on allaboutspam.com to see why the emails are beeing considered spam by hotmail and gmail servers. The results was amongst other faults, the BATV. This is the complete result from allaboutspam.com on my BATV: BATV is a mechanism wherein an outgoing Email server adds a tag to the Envelope From address of a...

append.html jquery is not working the same as the existing html?

i have a situation where im apending html to load more posts(pagination), and each post has a reply link, the appened html is not functioning properly: the jquery post: $(function() { //More Button $('.more').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html('<img src="moreajax.gif" />'); $.ajax({ typ...

Make a background image static?

So, I'm trying to make the background image static, and have the foreground content move over it. Having some issues, what am I doing wrong? Here is my current code. body { color: #000; margin: 10px 0px 10px 0px; background-color: #ffffff; background-image:url('http://userlogos.org/files/backgrounds/Mafia_Penguin/Map1280x800.jpg'); bac...

Can a user language change form values in html?

Hi there, My application has a form with 2 submit buttons: <input name="rating" class="Show" type="submit" value="Show answer"> <input name="rating" class="Skip" type="submit" value="Skip"> However I noticed some errors in GAE logs: ValueError: invalid literal for int() with base 10: 'Voir la r\xe9ponse' ValueError: invalid literal...

Where to submit own html, css, javascript tutorials?

I am planing to start writing tutorials on html, css and javascript. This year has been full of extremely interesting experience in this areas, so I wish to start on. Therefore, I wish to know the best places to submit my tutorials before publishing them elsewhere. I found just one very nice place: http://net.tutsplus.com/about/write-a-...

Writing PDF using PHP (PDFLib)

Hi! I'm currently writing a code to output a pdf file in PHP using PDFlib from http://www.pdflib.com/. The problem is all html tag is also written in the output file. How can be able to cancel out all those tags? Here is my sample code. $postVariable = $_POST; $contentData = ""; foreach($postVariable as $ke...

Autofit a div inside another

I have a header and a content div inside a container div. I want the header's height to be fixed and the content div to occupy the rest of the container div. The easy solution is to set the height of the content div as (container-header) pixels. Is there an alternate way of doing it ? div.container { height: 300px; width: 100%;} div.con...

What is the correct way to save hidden data on a table?

I use the jTemplates plugin to load data on my tables. Because there are some properties I do not display yet I want available for later use, I save them in hidden fields and then grab them by their CSS's class name and jQuery's siblings method. Is this a correct way of doing such operation, or would this be considered terrible code? <...

Replace html array notation var with loop value jQuery

I'm trying to replace the [2] in the name values of the hidden fields with a new value within a loop. The 2 could be any number and so I won't necessarily know it when I'm looping. What would be the best course of action in replacing it? <input type="hidden" class="pid" name="t[2][p][149][id]" value="ID"> <input type="hidden" class="pan...