Feed on
Posts
Comments

Archive for the ‘HTML’ Category

<html>
<head>
<script type=”text/javascript”>
var shiftOn = false;
var ctrlOn = false;
var altOn = false;
var focusedValue = “0″;
function validateNumeric(obj)
{
if (obj.value.length == 0)
{
obj.value = focusedValue;
return false;
}
[...]

Read Full Post »

<html>
<head>
<title>Demo</title>
<script type=”text/javascript”>
function textChanged(elm)
{
alert(elm.value);
}
onload = function()
{
var elm = document.getElementById(”mytextbox”);
elm.onchange = new Function(’textChanged(this)’);
[...]

Read Full Post »

<input type=”text” id=”mytb” />
To select: document.getElementById(”mytb”).select()
To unselect: document.getElementById(”mytb”).value = document.getElementById(”mytb”).value;
Just the value to itself. That’s all!

Read Full Post »

<html><head>
<script type=”text/javascript”>
img2=new Image();img2.src=“landscape3.gif”;
function changeImage(){
document.getElementById(‘myImage’).src=img2.src;}
</script></head><body>
<p>
When you mouse over the image, a new image will appear.</p>
<img id=”myImage” onmouseover=”changeImage()” border=”0″ width=”160″ height=”120″
src=”landscape2.jpg”>
<p>
The new image appears instantly, because your browser has already loaded the image.</p></body></html>

Read Full Post »

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title>Untitled Page</title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:ListBox ID=”LBSource” SelectionMode=”Multiple” runat=”server”>
  <asp:ListItem Text=”Item1″ Value=”vItem1″></asp:ListItem>
  <asp:ListItem Text=”Item2″ Value=”vItem2″></asp:ListItem>
  <asp:ListItem Text=”Item3″ Value=”vItem3″></asp:ListItem>
  <asp:ListItem Text=”Item4″ Value=”vItem4″></asp:ListItem>
  <asp:ListItem Text=”Item5″ Value=”vItem5″></asp:ListItem>
</asp:ListBox>
<input type=”button” value=”Add” onclick=”moveItems(’<%= LBSource.ClientID %>‘, ‘<%= LBDestination.ClientID %>‘)” />
<input type=”button” value=”Remove” onclick=”moveItems(’<%= LBDestination.ClientID %>‘, ‘<%= LBSource.ClientID %>‘)” />
<asp:ListBox [...]

Read Full Post »

I found this fantastic tool developed by Microsoft that lets you manipulate HTML right in the browser. You can change CSS, Table sizes, allignements, disable JavaScript…You name it!
Download here

Read Full Post »