Results 1 to 2 of 2

Thread: Logon

  1. #1
    Join Date
    Nov 2008


    Can anyone let me know what is wrong with my logon form (ASP.NET/JS), since I would like to submit the form, and, ideally read the user and password from the db?

    So far the hardcoded version does not work either...

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Logon.aspx.cs" Inherits="Logon" %>

    <!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">
    <style type="text/css">
    width: 146px;
    margin-left: 21px;
    width: 147px;
    font-family: Arial, Helvetica, sans-serif;
    width: 41px;
    margin-left: 96px;
    <script language="javascript" type="text/javascript">
    // <![CDATA[

    function setCookie(c_name, value, exdays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value;

    function Submit1_onclick() {
    /* Logon credentials to be submitted and verified by the server control */
    var user = document.getElementById('user').Value;
    var pwd = document.getElementById('pwd1').Value;
    if (user = "1") && (pwd = "1")
    return true;
    else {

    function Submit1_onclick() {


    // ]]>
    <body id="body">
    <form id="form1" runat="server">

    <span class="style1">Aristotle library information system</span><br />
    <asp:Image ID="Image1" runat="server" Height="102px"
    ImageUrl="~/img/Aristotle_Bust_White_Background_Transparent.png" Width="88px" />
    <br />
    <br />
    <input id="user" type="text" onclick="return Text1_onclick()" /><br />
    <input id="pwd1" type="password" /><br />
    Store logon information?<input id="Checkbox1" type="checkbox" /><br />
    <input id="Submit1" type="submit" value="logon"
    onclick="return Submit1_onclick()" onclick="return Submit1_onclick()" /></div>

  2. #2
    Join Date
    Mar 2007
    Ask yourself what does ASP have to do with JavaScript?
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles