If you read the jQuery mailing list , you may be aware that I have updated my plugins for working with select boxes . Summary of changes: addOption replaces any options with the same value (so think of it as an add/replace options plugin selectOptions selected options in addition to what was already selected, but there is now an option for it not to do this There are two new methods: copyOptions which is for copying options between select boxes ajaxAddOption allows you to add options via AJAX (i.e. could be used for create options dynamically from a server script)
iTextSharp is free library for .NET that allows you to create PDF documents. It can be used to dynamically create PDF's which can be streamed to the user. As there is no HTML being sent to the user, a WebHandler (ashx file) is a more appropriate way to generate your PDF than an aspx page. Download itextsharp-3.0.10-dll.zip (latest version as of 08 Feb 2006) and save the dll in the archive to your websites bin directory. Here is a basic sample of creating a PDF (more complex samples may follow in future posts). BasicPDF.ashx <%@ WebHandler Language="C#" Class="MyNamespace.BasicPDF" %> using System; using System.IO; using System.Web; using iTextSharp.text; using iTextSharp.text.pdf; namespace MyNamespace { public class BasicPDF: IHttpHandler { public bool IsReusable { get { return true; } } /// <summary> /// Font used for any hyperlinks added to the PDF /// </summary> private Font LinkFont { get
This code opens a new popup window that contains a timer that counts down, then closes the window when it reaches 0. Will not work if user has a popup blocker blocking the page.
<html>
<head>
<title>Popup Timer</title>
<script language="JavaScript" type="text/JavaScript">
// popup window var
var popup;
// At what number shall the countdown counter start?
CounterStart = 10;
// This function CustomAction() can be modified to do
// whatever you want done every second.
function CustomAction() {
popup.document.timer.timeleft.value = CounterStart;
} // end of function CustomAction()
// end of JavaScript customization
function Decrement() {
CounterStart--;
CustomAction();
if(CounterStart <= 0) { popup.close(); alert('Timer reached 0'); }
else { setTimeout('Decrement()',1000); }
}
function StartTheCounter() {
openPopup(120,100);
setTimeout('Decrement()',1000);
}
f
Comments