html

Automatically adding width and height attributes to <img> tags with a PHP function

What I want is a function I can run on user input that will intelligently find and add the width and height attributes to any <img> tag in a blob of HTML so as to avoid page-reflowing issues while images load. I am writing the posting script for a PHP forum, where a user's input is sanitised and generally made nicer before writing it to...

jQuery: Get clicked anchor from within unordered list

I have this markup (simplified): <ul class="targets"> <li><a href="javascript:void(0);" class="info">A</a></li> <li><a href="javascript:void(0);" class="info">B</a></li> <li><a href="javascript:void(0);" class="info">C</a></li> </ul> And this script (simplified): $('.targets').click(function(e) { alert(e.target); // a...

aspose convert html to xps

Converting html-page to image or xps without lost css style. var document = new Document(input, LoadFormat.Html, null); document.Save(output, SaveFormat.Xps); Do you have any idea? May be anything library? ...

any one using Dreamweaver cs3! plx help

i have a menu bar in which i have tags women, men, designer etc etc.. i want such that if my mouse cursor moves onto women or it moves onto men, then a drop down appears.. how to do this using Adobe Dreamweaver cs3.. ...

Value Javascript Input

Hello, how can i transfer the Value from Input 1 in 2 and add some letters? <script type="text/javascript"> function doit(){ document.getElementById('input2').value=document.getElementById('input1').value; } </script> Input1: 2342 Input2: pcid2342d Can some one help me? ...

The best scripting language for web audio / sound

Good day, I'm looking to start learning a scripting language for web audio and sound development. It needs to be able to handle simultaneous audio events, eg; to trigger a sound when another is playing (I'm not sure if and how this is possible, but have witnessed this kind of presentation: http://www.projectiva.co.uk/ (can this kind of...

Pre-populate external website form

Hi, I have a donation form which users fill out and I would like to then send the user to the charities own website with their information already filled in. Is this possible? thanks ...

need to hide/slide div once link is clicked

I display the div by clicking the link, but now I want to hide it when it is clicked again. This is what I have currently: $(document).ready(function() { $('#our-future-intro-slide').click(function() { //$(".our-future-intro").delay(2400).slideDown(3600); $(".our-future-intro").slideDown(200); }); }); So each ti...

Is there a way to programmatically add items to <UL> element?

I have a ASP.NET 2.0 app with an existing <UL>. I want to programmatically add items to it. I've already added the ID and runat="server" attributes. ...

Submitted character encoding -- _charset_ hidden field

For our web app, we have multiple HTML pages containing text areas. All of our pages are rendered with an ISO-8859-1 charset. When the page is accessed through IE6 on a Windows machine and special characters such as a "smart quote" are copied in to the text area, some of our pages submit the page using the Windows 1252 character encodi...

Python - render HTML content to GIF image

How can I render HTML content to GIF image? I found how to render it to PDF using reportlab, but no luck with GIF. I want something like xhtml2pdf.com but final result should be not in pdf, but in image. ...

How do i get rich controls in PHP?

Hello, How do i get rich controls like tree, calendar etc in PHP? PHP by default doesn't include any such controls. I am planning to use either CakePHP or Zend framework as i heard from my friends that these two are really nice frameworks. Do these frameworks include support for tree and such controls? I actually come from Asp.Net and J...

JavaScript: opacity works in opera but not IE

Hi guys, I have used the following script for images and it appears to work fine; yet in Internet Explorer, the text is not fading out as it should. Any ideas? <td colspan="5" ID='links'> <ul id="navlist"> <li id="active"><a href="#" id="a" onmouseover="over(this)" onmouseout="out()">Apie įmonę</a>|</li> <li><a href="#" ID="b...

How can I get --webkit-tap-highlight-color to highlight an entire DIV?

I'm struggling to get iPhone OS4 to produce the default tap highlight on a DIV, in a UIWebView (ie embedded in an application, not in Safari). The markup is: <a href="..."> <div class="item"> <div class="imgWrapper"> <img...> </div> <div class="Title"> Title text </div> </div> </a> I'm aiming for a display that looks like th...

From tabindex include <selects>

Is it possible to tab to a <select> element? I am creating a rather intensive form that would greatly benefit from being able to tab through everything not just the text fields. <input type="text" name="date" value="00/00/0000" tabindex="1" /> <select name="hour" tabindex="2"> <option value="1">01</option> <!-- Blah more --> </s...

aligning 3 <div> containers?

HI i have 3 containers and i want to align them with one being on the left of the screen, one in the middle and one in the right. with equal space left in between the containers. whats the best way to do this? thanks ...

Can I use JavaScript to send HTML to a new tab/window and have the CSS loaded?

I have some JavaScript in a page that makes a call to a server and gets some HTML that I want to display in a new browser tab or window. I can use window.document.write(myHTML) to put the HTML in the new container but the HTML contains some CSS and JavaScript includes and these do not get included by the new window. Is there any way to g...

-ms-filter with javascript

How do I implement the -ms-filter in javascript? I tried the following which does not work: document.getElementById(ba[i]).style.sFilter = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=' + value*10 + ')'; Another question. If I want to change the font color of an element I used the following (which worked in everything exce...

Run a javascript file on a set of html documents

I have a set of html documents on local disk to process. I need to load each document file as document object and run a piece of javascript code over it and store the result in a separate file. I would prefer to this from python though I'm open to any other suggestions too. I tried to do this through extensions in chrome and firefox b...

What is the proper, standard way to handle CSS floats

I have always thought that the correct way to handle CSS floats was to use either a clear div, :after pseudo class, or overflow: auto on the parent. As I understand it clear is designed to clear floats and expand the parent element back to normal. That is it's purpose, yes? Today I found heard of an alternate method of handling the floa...