Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Logout as a link ?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 24 February 2004 :  15:25:12  Show Profile
How do I modify the code, so I get a link instead of a button for logging out like this:

Logged in as: wii (logout)

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  15:39:17  Show Profile  Visit D3mon's Homepage
AFAIK, the only way to do this would be by using a javascript 'onclick' with a standard text <a> link, like:

<a href=""#"" onclick="formname.submit; return false;">Logout</a>

...but my Javascript is not the best!


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 24 February 2004 :  15:47:33  Show Profile
Neither is mine, the form name must be frmLogout, so I have this:

<a href=""#"" onclick="frmLogout.submit; return false;">Logout</a>

Not enough though, because it doesn´t work, and what about the username ?
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  15:50:30  Show Profile  Visit D3mon's Homepage
Oh I missed that bit,

Logged in as: <%= strDBNTusername %> should handle that.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  15:55:47  Show Profile  Visit D3mon's Homepage
quote:
Originally posted by wii

Neither is mine, the form name must be frmLogout...



Unless its custom code you wrote yourself, I'd check that to make sure. Snitz has some kinda wired form names in places.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 24 February 2004 :  15:59:06  Show Profile
Nope, took it from a standard inc_header.asp
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  16:04:09  Show Profile  Visit D3mon's Homepage
Need input from someone with a bit more Javascript knowledge
[update] try brackets after the .submit part like ...submit();...


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"

Edited by - D3mon on 24 February 2004 16:06:17
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  16:07:29  Show Profile  Visit D3mon's Homepage
I googled and found this:
<a href="javascript:document.myform.submit();">Submit</a>


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 24 February 2004 :  16:11:22  Show Profile
Got it !!! The code looks like this, shows what you see at my first post:

Logged in as: <%= strDBNTusername %> <a href="javascript:document.frmLogout.submit();">(logout)</a>

Thanks D3mon
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 24 February 2004 :  16:12:24  Show Profile  Visit D3mon's Homepage
Excellent, my Javascript just got a little better too!


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 24 February 2004 :  16:40:15  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I just made a link to "logout.asp" =)

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 24 February 2004 :  23:03:09  Show Profile  Visit dayve's Homepage
Leep in mind that if you ever need to perform an onSubmit in your form, this method of submitting a form with a link will not trigger it. I bring this up because I recently discovered this when I was using a validation script and using a url submit link. I ha to create a separate function to validate and submit when the link was clicked. I know this has nothing to do with Snitz, but just wanted to point this caveat out.

Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 25 February 2004 :  01:37:02  Show Profile
thanks dayve, in this case, there are no problems, tested with lots of users now, even on macs and old netscape versions - no problems...
Go to Top of Page

ping
Starting Member

31 Posts

Posted - 12 March 2004 :  14:27:01  Show Profile
Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">" else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"

oh~select anyone(red) to like this :<a href="javascript:document.frmLogout.submit();">(logout)</a>???
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 04 June 2004 :  02:18:16  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
I made a logout.asp and then put a link in the header.

http://www.gotlandrace.com/temp/logout.txt

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 04 June 2004 :  02:40:47  Show Profile
I just use this:

Logged in as: <%= strDBNTusername %> <a href="javascript:document.frmLogout.submit();">(logout)</a>

Works fine !
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07