Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: button problems....


Message #1 by "johnny seigut" <jpmswiss@y...> on Sat, 23 Nov 2002 19:09:52
Greetings from Switzerland !

No matter how i change the HTML code - i cannot use an image to submit my 
form.

If the html img tag is used - it just doesn't work.
But if the good ol (ugly) submit button is used - no problem.

Appreciate any and all help !


Best regards

___________________

<!-- #include virtual = "inc/navigation.inc" -->
<%@ Language=VBScript %><% if Application("AllowAdds") <> "Yes" then
	Response.Redirect "/default.asp"
end if %><% if isempty(Request.Form("OK")) then
	Session("NumAttempts") = 1
	TheMessage = "F&uuml;r den H&auml;ndlerzugang bitte tragen Sie 
Ihre E-mail Adresse und Passwort ein"
else
	set conn = server.createobject ("adodb.connection")
	Conn.open "WP021E0809"
	set RSLogin = conn.Execute("select CustomerID, Name, aktiviert 
from customers where " _
		& "EmailAddress = '" & Request.Form("EmailAddress") & "' 
and " _
		& "Password = '" & Request.Form("Password") & "'")
	if RSLogin.EOF then
		Session("NumAttempts") = Session("NumAttempts") + 1
		if Application("NumAttempts") = 0 then
			TheMessage = "Log in nicht gefunden, bitte 
versuchen Sie nochmal."
		elseif Session("NumAttempts") > Application("NumAttempts") 
then
			TheMessage = "Log in nicht gefunden. Keine weitere 
Versuche erlaubt."
		else
			TheMessage = "Log in nicht gefunden, bitte 
versuchen Sie nochmal."
		end if
	else
		Session("CustomerID") = RSLogin("CustomerID")
		Session("Name") = RSLogin("Name")
		if Session("Name") = "admin" then
		Response.Redirect "admin.asp"
		end if 
		Response.Redirect "dealer.asp"
	end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<html>

	<head>
		<title>Log In - STAG&nbsp;ICP AG</title>
		<meta http-equiv="content-type" 
content="text/html;charset=iso-8859-1">
		<meta name="author" content="John Moorhouse">
		<meta name="description" content="H&auml;ndlerzone">
		<meta name="keywords" content="Preisliste, Login, 
einloggen, Passwort, H&auml;ndlerzone">
		<link href="../styles.css" rel="stylesheet" media="screen">
	</head>

	<body>
		<table width="754" border="0" cellspacing="4" 
cellpadding="0">
			<tr>
				<td width="150">&nbsp;</td>
				<td>
					<div align="left">
						&nbsp;</div>
				</td>
			</tr>
			<tr>
				<td width="150">&nbsp;</td>
				<td><% response.write TheMessage %></td>
			</tr>
		</table>
		<% if TheMessage <> "Log in nicht gefunden. Keine weitere 
Versuche erlaubt." then
%>
		<form action="login.asp" method="POST" name="LOGIN_OK">
			<table width="754" border="0" cellspacing="4" 
cellpadding="0" height="115">
				<tr>
					<td valign="middle" width="150">
						<div align="right">
							E-mail 
Adresse</div>
					</td>
					<td valign="middle">
						<div align="left">
							<input type="text" 
name="EmailAddress" value="" size="40" maxlength="50"></div>
					</td>
				</tr>
				<tr>
					<td valign="middle" width="150">
						<div align="right">
							Passwort</div>
					</td>
					<td valign="middle">
						<div align="left">
							<input 
type="password" name="Password" value="" size='15"' maxlength="50"></div>
					</td>
				</tr>
				<tr>
					<td valign="middle" width="150">
						<div align="center">
							&nbsp;</div>
					</td>
					<td>
						<div align="left">
							<input 
type="submit" name="OK" value="OK" border="0"></div>
					</td>
				</tr>
			</table>
		</form>
		<% end if %><% if Application("AllowAdds") = "Yes" then %>
		<table width="754" border="0" cellspacing="4" 
cellpadding="0" height="100">
			<tr>
				<td valign="middle" width="150">
					<div align="center">
						&nbsp;</div>
				</td>
				<td colspan="3" valign="middle">Noch nicht 
registriert? <a href="new.asp">Bitte hier klicken</a></td>
			</tr>
			<tr>
				<td valign="middle" width="150">
					<div align="center">
						</div>
				</td>
				<td colspan="3" valign="middle">Password 
vergessen? <a href="passrequest.asp">Bitte hier klicken</a></td>
			</tr>
			<tr>
				<td valign="middle" width="150">&nbsp;</td>
				<td colspan="3" valign="middle">
					<div align="left">
						Passwort &auml;ndern? <a 
href="change_password.asp">Bitte hier klicken </a></div>
				</td>
			</tr>
		</table>
		<% end if
%>
	</body>

</html>


Message #2 by "Ian: Future Proof Web Dev" <lists@f...> on Sat, 23 Nov 2002 19:16:17 -0000
Happy Saturday Switzerland Johnny!

This list is not the place to post html coding questions, however, I believe
that the below may help. Adapt it to your needs.

<html>
<head>
 <title>Untitled</title>
 <script language ="javascript">
 function sendForm(){
 document.prod.action = "../request.asp";
 document.prod.submit();
}
</script>
</head>

<body>
<form action="" method="post" name="prod">
<input type="image" src="yourimagehere.jpg" name="mySubmit"
onClick="javascript:sendForm();">
</form>


</body>
</html>
cheers
----- Original Message -----
From: "johnny seigut" <jpmswiss@y...>
To: "Access ASP" <access_asp@p...>
Sent: Saturday, November 23, 2002 7:09 PM
Subject: [access_asp] button problems....


> Greetings from Switzerland !
>
> No matter how i change the HTML code - i cannot use an image to submit my
> form.
>
> If the html img tag is used - it just doesn't work.
> But if the good ol (ugly) submit button is used - no problem.
>
> Appreciate any and all help !
>
>
> Best regards
>
> ___________________
>
> <!-- #include virtual = "inc/navigation.inc" -->
> <%@ Language=VBScript %><% if Application("AllowAdds") <> "Yes" then
> Response.Redirect "/default.asp"
> end if %><% if isempty(Request.Form("OK")) then
> Session("NumAttempts") = 1
> TheMessage = "F&uuml;r den H&auml;ndlerzugang bitte tragen Sie
> Ihre E-mail Adresse und Passwort ein"
> else
> set conn = server.createobject ("adodb.connection")
> Conn.open "WP021E0809"
> set RSLogin = conn.Execute("select CustomerID, Name, aktiviert
> from customers where " _
> & "EmailAddress = '" & Request.Form("EmailAddress") & "'
> and " _
> & "Password = '" & Request.Form("Password") & "'")
> if RSLogin.EOF then
> Session("NumAttempts") = Session("NumAttempts") + 1
> if Application("NumAttempts") = 0 then
> TheMessage = "Log in nicht gefunden, bitte
> versuchen Sie nochmal."
> elseif Session("NumAttempts") > Application("NumAttempts")
> then
> TheMessage = "Log in nicht gefunden. Keine weitere
> Versuche erlaubt."
> else
> TheMessage = "Log in nicht gefunden, bitte
> versuchen Sie nochmal."
> end if
> else
> Session("CustomerID") = RSLogin("CustomerID")
> Session("Name") = RSLogin("Name")
> if Session("Name") = "admin" then
> Response.Redirect "admin.asp"
> end if
> Response.Redirect "dealer.asp"
> end if
> end if
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
>
> <html>
>
> <head>
> <title>Log In - STAG&nbsp;ICP AG</title>
> <meta http-equiv="content-type"
> content="text/html;charset=iso-8859-1">
> <meta name="author" content="John Moorhouse">
> <meta name="description" content="H&auml;ndlerzone">
> <meta name="keywords" content="Preisliste, Login,
> einloggen, Passwort, H&auml;ndlerzone">
> <link href="../styles.css" rel="stylesheet" media="screen">
> </head>
>
> <body>
> <table width="754" border="0" cellspacing="4"
> cellpadding="0">
> <tr>
> <td width="150">&nbsp;</td>
> <td>
> <div align="left">
> &nbsp;</div>
> </td>
> </tr>
> <tr>
> <td width="150">&nbsp;</td>
> <td><% response.write TheMessage %></td>
> </tr>
> </table>
> <% if TheMessage <> "Log in nicht gefunden. Keine weitere
> Versuche erlaubt." then
> %>
> <form action="login.asp" method="POST" name="LOGIN_OK">
> <table width="754" border="0" cellspacing="4"
> cellpadding="0" height="115">
> <tr>
> <td valign="middle" width="150">
> <div align="right">
> E-mail
> Adresse</div>
> </td>
> <td valign="middle">
> <div align="left">
> <input type="text"
> name="EmailAddress" value="" size="40" maxlength="50"></div>
> </td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="right">
> Passwort</div>
> </td>
> <td valign="middle">
> <div align="left">
> <input
> type="password" name="Password" value="" size='15"' maxlength="50"></div>
> </td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> &nbsp;</div>
> </td>
> <td>
> <div align="left">
> <input
> type="submit" name="OK" value="OK" border="0"></div>
> </td>
> </tr>
> </table>
> </form>
> <% end if %><% if Application("AllowAdds") = "Yes" then %>
> <table width="754" border="0" cellspacing="4"
> cellpadding="0" height="100">
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> &nbsp;</div>
> </td>
> <td colspan="3" valign="middle">Noch nicht
> registriert? <a href="new.asp">Bitte hier klicken</a></td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> </div>
> </td>
> <td colspan="3" valign="middle">Password
> vergessen? <a href="passrequest.asp">Bitte hier klicken</a></td>
> </tr>
> <tr>
> <td valign="middle" width="150">&nbsp;</td>
> <td colspan="3" valign="middle">
> <div align="left">
> Passwort &auml;ndern? <a
> href="change_password.asp">Bitte hier klicken </a></div>
> </td>
> </tr>
> </table>
> <% end if
> %>
> </body>
>
> </html>
>
>
>

Message #3 by "Zee Computer Consulting" <zee@t...> on Sun, 24 Nov 2002 15:20:51 -0800
You might trry the newer construct:

    <button type='submit'>
    <img src='yourgraphic.gif' border=0 width="200" height="124"
    align="left" hspace="10" vspace="5">
    </button>

Anything between the opening <button> and closing </button> tags will be
rendered as the button face. Check out this link for more info on HTML tags:

    http://p2p.wrox.com/content/html4db/

-- Zee


.
----- Original Message -----
From: "johnny seigut" <jpmswiss@y...>
To: "Access ASP" <access_asp@p...>
Sent: Saturday, November 23, 2002 7:09 PM
Subject: [access_asp] button problems....


> Greetings from Switzerland !
>
> No matter how i change the HTML code - i cannot use an image to submit my
> form.
>
> If the html img tag is used - it just doesn't work.
> But if the good ol (ugly) submit button is used - no problem.
>
> Appreciate any and all help !
>
>
> Best regards
>
> ___________________
>
> <!-- #include virtual = "inc/navigation.inc" -->
> <%@ Language=VBScript %><% if Application("AllowAdds") <> "Yes" then
> Response.Redirect "/default.asp"
> end if %><% if isempty(Request.Form("OK")) then
> Session("NumAttempts") = 1
> TheMessage = "F&uuml;r den H&auml;ndlerzugang bitte tragen Sie
> Ihre E-mail Adresse und Passwort ein"
> else
> set conn = server.createobject ("adodb.connection")
> Conn.open "WP021E0809"
> set RSLogin = conn.Execute("select CustomerID, Name, aktiviert
> from customers where " _
> & "EmailAddress = '" & Request.Form("EmailAddress") & "'
> and " _
> & "Password = '" & Request.Form("Password") & "'")
> if RSLogin.EOF then
> Session("NumAttempts") = Session("NumAttempts") + 1
> if Application("NumAttempts") = 0 then
> TheMessage = "Log in nicht gefunden, bitte
> versuchen Sie nochmal."
> elseif Session("NumAttempts") > Application("NumAttempts")
> then
> TheMessage = "Log in nicht gefunden. Keine weitere
> Versuche erlaubt."
> else
> TheMessage = "Log in nicht gefunden, bitte
> versuchen Sie nochmal."
> end if
> else
> Session("CustomerID") = RSLogin("CustomerID")
> Session("Name") = RSLogin("Name")
> if Session("Name") = "admin" then
> Response.Redirect "admin.asp"
> end if
> Response.Redirect "dealer.asp"
> end if
> end if
> %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
>
> <html>
>
> <head>
> <title>Log In - STAG&nbsp;ICP AG</title>
> <meta http-equiv="content-type"
> content="text/html;charset=iso-8859-1">
> <meta name="author" content="John Moorhouse">
> <meta name="description" content="H&auml;ndlerzone">
> <meta name="keywords" content="Preisliste, Login,
> einloggen, Passwort, H&auml;ndlerzone">
> <link href="../styles.css" rel="stylesheet" media="screen">
> </head>
>
> <body>
> <table width="754" border="0" cellspacing="4"
> cellpadding="0">
> <tr>
> <td width="150">&nbsp;</td>
> <td>
> <div align="left">
> &nbsp;</div>
> </td>
> </tr>
> <tr>
> <td width="150">&nbsp;</td>
> <td><% response.write TheMessage %></td>
> </tr>
> </table>
> <% if TheMessage <> "Log in nicht gefunden. Keine weitere
> Versuche erlaubt." then
> %>
> <form action="login.asp" method="POST" name="LOGIN_OK">
> <table width="754" border="0" cellspacing="4"
> cellpadding="0" height="115">
> <tr>
> <td valign="middle" width="150">
> <div align="right">
> E-mail
> Adresse</div>
> </td>
> <td valign="middle">
> <div align="left">
> <input type="text"
> name="EmailAddress" value="" size="40" maxlength="50"></div>
> </td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="right">
> Passwort</div>
> </td>
> <td valign="middle">
> <div align="left">
> <input
> type="password" name="Password" value="" size='15"' maxlength="50"></div>
> </td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> &nbsp;</div>
> </td>
> <td>
> <div align="left">
> <input
> type="submit" name="OK" value="OK" border="0"></div>
> </td>
> </tr>
> </table>
> </form>
> <% end if %><% if Application("AllowAdds") = "Yes" then %>
> <table width="754" border="0" cellspacing="4"
> cellpadding="0" height="100">
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> &nbsp;</div>
> </td>
> <td colspan="3" valign="middle">Noch nicht
> registriert? <a href="new.asp">Bitte hier klicken</a></td>
> </tr>
> <tr>
> <td valign="middle" width="150">
> <div align="center">
> </div>
> </td>
> <td colspan="3" valign="middle">Password
> vergessen? <a href="passrequest.asp">Bitte hier klicken</a></td>
> </tr>
> <tr>
> <td valign="middle" width="150">&nbsp;</td>
> <td colspan="3" valign="middle">
> <div align="left">
> Passwort &auml;ndern? <a
> href="change_password.asp">Bitte hier klicken </a></div>
> </td>
> </tr>
> </table>
> <% end if
> %>
> </body>
>
> </html>
>
>
>



  Return to Index