html

Best way to decode unknown unicoding encoding in Python 2.5

Have I got that all the right way round? Anyway, I am parsing a lot of html, but I don't always know what encoding it's meant to be (a surprising number lie about it). The code below easily shows what I've been doing so far, but I'm sure there's a better way. Your suggestions would be much appreciated. import logging import codecs from ...

Prevent Text Input expanding in IE

Hi, I am having a problem with an input field in IE. The code is for a portlet and widths need to be dynamic as the user can place the portlet on any of the three columns in the page which all have different widths. As always it works fine in FF but not in IE. In order to make the width dyanaic I have set width="100%". Data to popul...

html fieldset allows children to expand indefinitely

I want to put a scrollable box inside of a fieldset, but I've run into a quirk and I can't figure out my way around it. When you put your scrollable div inside of a fieldset, the fieldset expands instead of making the scrollable element scroll. Here's a test case. The following expands indefinitely (boo): <div style="width: 300px; over...

why cant I pass this variable to the javascript function?

I have a variable inside my php file, which I want to pass to a javascript function whenever the user clicks a link on my php page. here is the php in brief: $delete_img=$image_id.'_'.$newfilename; $display_image.="<td><img src='../temp_images/$newfilename'>"; if ($i==$extra_pic){ $display_image.="<br><a href='#' onclick='window.paren...

Getting the full url for an image in webpage

I would like to get the full url of an image in a web page. The image is used as a background image. I was using Firebug's inspect feature. In the CSS view, it shows url(/images/myimage.gif) for the background-image element. Is there a way to display the full url? ...

IE7 contentEditable word wrapping

I have the following code: <html> <style type="text/css"> DIV { display:inline; border: solid red 1px; } .editable { background:yellow; } </style> <div class="editable" contentEditable="true"> This is test text. This is test text.This is test text.This is test text.This is test text.Thihis is test text.This is test text.</d...

div closing syntax in ie8

I've just discovered that using <div /> instead of <div></div> completely destroys my page in IE8. Even though I only had the empty tag syntax in one single place, half the page didn't even render. Is this a bug in IE8 or is this correct standards implementation? I'm astounded if this is correct behaviour and Microsoft have deliberately...

Parsing "multipart/form-data" in .NET/C#

Hi all, Got a .NET/C# question... I need to parse some input post data thats in a "multipart/form-data" format to extract the passed username and password. Anyone know how to do this without writing my own parsing code? Note the input post data looks something like this: ---------1075d313df8d4e1d Content-Disposition: form-data; nam...

DHTML popup window

I am trying to make a DHTML window on my website and I can actually get it to popup for me. The problem I am having with it is when it pops up it moves the text around on the page. I have seen examples of DHTML popups where this doesn't occur for instance here: http://dhtmlpopups.webarticles.org/basics.php or here: http://www.php-devel...

How to insert custom html tag using YUI Editor

I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected text with 'strong' / 'bold' tags. Does anyone have any examples they could point to to make this work? ...

ampersand not passing through url

On my site www.gibberize.com if you type in the word "and" in the top textarea, the character "&" will appear in the second textarea. The problem is that the "tweet it" link will then append the second textarea's text to a url and proceed to the link, but because it is an ampersand it will break the text. Any solutions? ...

CSS: 2 DIVs, one takes a fixed size, other one fills up the remaining space

I have 2 DIVs, one containing a map, this one is above the other one. It should take all space available, except for the footer, which is 25px high. Currently I give the map 95% of the height, and the footer 25px. Problem is when the windows gets really big, the footer becomes enormousness, and when the windows becomes really small, scr...

Images aren't in correct places.

Problem Sorted. Thanks. ...

why is the value of textbox (this value is retrieved from the sessions using php) in html shown in IE

Okay the code is, code in first.php <?PHP session_start(); include("script.php"); ?> <form action="script.php" method=POST> <input type="text" value="<?PHP if(isset($_SESSION['info']['firstname'])){echo $_SESSION['info']['firstname']; }?>" name="firstname"> </form> i have saved the file in php and the "script.php" page has all the c...

Need Help With Java Code...HTML Parser Cannot Be a Resolved Type

Hi, I have this java source code which one of my friend gave me and unfortunately he is away from the country to fix my issue.This code,scrapes the data from the websites and fills the database it self. But previously due to some layout changes in the website,it is not functioning properly.So i am giving a try to recompile it using ecl...

Tricking IIS 6.0 html web site into thinking it's at the root

I have no idea how to search for this one and perhaps Serverfault would be better but I'll start here. I have a HTML web site running at the root of one of my webservers. It runs fine and dandy. I needed to make a test environment for it and where I can't run it in the root of the websever. I have to make a directory on the test server....

form submit button moves cutting image

Hi I have a submit button and am styling it using the following css: .subm { background-color:Transparent; background-image:url(Images/Button_Send.png); background-repeat:no-repeat; width:82px; height:30px; display:block; border:none; outline:none; overflow:visible;} .subm:hover { background-color:Transparent; backgrou...

You need to select at least one radio button / checkbox

What would be the JavaScript code to check if the user has selected at least one radio button, knowing that the radio buttons all have the same "name" attribute? Same question for checkboxes. I do not use any fancy javascript frameworks such as JQuery and others ... ...

How to use our custom font on our website

How to use a stylish font on my website that works on all browsers ...

Form Input File type and Database Value

Hi , Not sure if that was the best Title in the world but I hope this part gives you a clearer understanding of what my question is. Basically I need to send a File using a Form to the folder "uploads" from page 1 I then go to page 2 I then need to then send the same file to the database from page 2 Is there a way on page 2 to def...