This is simple javascript calculator <html> <head> <title>Calculator</title> <script language=”javascript”> var inputstring=” ” function updatestring(value) { inputstring += value; document.calculator.input.value=inputstring; } </script> <style type=”text/css”> #tb-lo { /*background: url(Calc-bg.png); */ height: 222px; width: 198px; padding: 2px 2px 2px 2px; background-image: url(Calc-bg.png); background-repeat: no-repeat; } #td-key { text-align: center; } </style> </head> <body> <form name=”calculator”> <table id=”tb-lo”> […]
Archive for 2011
Calculating total from recordset using “select case”
Here is code in classic asp Here is example on how to calculate recordset total using “select case” statement. I have calculated essay and resume scholarship values based on records from two essay and resume tables, and queried results based on applicant-student registration ID or name. Then I calculated “total score” of each student using […]
OnClientClick
OnClientClick properties to close pop-up window and redirect visitor back to parent page when using jQuery. <asp:Button ID=”InsertCancelButton” runat=”server” Text=”Cancel” PostBackUrl=”~/ManageAccounts.aspx” OnClientClick=”window.document.forms[0].target=’_parent’;” /> Code behind – Login.aspx.vb Partial Class Login Inherits System.Web.UI.Page Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click ‘/ define vars Dim usn As TextBox Dim pwd As TextBox […]