CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Login/Logout Trouble

Print topic Send  topic

Author Message
JRB

Posts: 10
Posted: 04/27/2004, 7:56 AM

I finally found a post that solved my problem with the login form showing default user values (clear the connection and data source options for the form). :-/

To finish it up I added a Logout button in the header. Great idea but it does absolutely nothing. No redirect, no log out, nothing. I click it and can still access all of the data. This is really getting frustrating! :-@


_________________
\\


View profile  Send private message
peterr


Posts: 5971
Posted: 04/27/2004, 12:56 PM

Hmm, what is "Logout button", or rather how was it supposed to work?
It probably should clear the session variables, or at least redirect the users to the login page. I usually see this done with the Logout link though. You just need to send the users to the Logout page and use the URL parameter called "Logout" (it can be set to anything).
But please explain how you implemented the button and then I can try to figure out how to finalize this functionality.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
JRB

Posts: 10
Posted: 04/27/2004, 1:04 PM

I added a button to the header.

Named it button_logout.

I set the button's OnClick property to Logout.

Set the return page to default.asp (the home page).

Set Page Redirects to True.




_________________
\\


View profile  Send private message
peterr


Posts: 5971
Posted: 04/27/2004, 2:04 PM

I'm suspecting that the button doesn't do anything per se, therefore the "On Click" is never executed. Keep in mind that you are restricted by HTML standards and can do only as much as HTML allows. Therefore for example HTML doesn't utilize buttons, except if they are placed within a form and are used to submit the form. There may be some other uses for buttons but I can't think of good examples right now.
The point is that even if CCS allows adding a button somewhere it doesn't mean that it will work. In terms of Logout, I think that most Websites implement this as a Link, although sometimes it could be an image link that looks like a graphical button. Therefore I'm just not recommending using standard buttons for this, unless this is important for you.
If you settle for a link then you can see an example at http://examples.codecharge.com/EmployeeDirectory/AdminMenu.php (in our standard Employee Directory solution). The link should point to any page (for example Login or Default) and in that page's "After Initialize" event you can use the "Logout" action. The link should include a parameter that the action will then use to logout the user.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Jim M.
Posted: 06/10/2004, 4:01 PM

I too want a Logout feature. I understand everything in this topic, although I am still familiarizing myself with CodeCharge.

Is there a specific example anywhere from which I can cut and paste some code to implement Logout?
peterr


Posts: 5971
Posted: 06/10/2004, 4:18 PM

Jim,

To implement Logout feature:
1. Add the "Logout" Action ( http://docs.codecharge.com/studio/html/Actions/Server/Logout.html ) to the "After Initialize" event of any page.
Now you can already test your logout functionality by opening that page in your browser but adding "?Logout=yes" at the end of the URL. For example try http://forums.codecharge.com/index.php?Logout=yes

2. Of course users will not type such URLs manually, therefore you just need to add a link to any of your pages to the above URL. For example go to the HTML mode of any page and add such HTML code:
<a href=http://forums.codecharge.com/index.php?Logout=yes>Logout</a>
You can do the same using the standard CCS Link control. For example add the Link to any of your pages, then in the "Href Source" property specify:
Link Type: Page
Destination: (name of the page where you added the logout action in #1)
Link Parameter Type: Expression
Link Parameter Source: "Yes"
Link Parameter Name: Logout
You can find an example of such link at http://examples.codecharge.com/EmployeeDirectory/AdminM...&type=notLogged (which is one of examples included in CCS)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
LV
Posted: 06/11/2004, 5:36 AM

Bravo Peter,

This is exactly what newbie like myself like to see in this forum, a detailed instruction on how to do thing in CCS. Keep it up, I think you should add a new section that list "HOW TO DO THING" such as the sample above. I am sure new users will ask for it again :-D
JRB

Posts: 10
Posted: 06/11/2004, 7:27 AM

I couldn't agree more!
_________________
\\


View profile  Send private message
peterr


Posts: 5971
Posted: 06/11/2004, 10:09 AM

Thanks. Boy, now I may have to do this more often :-)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
jim7567g

Posts: 38
Posted: 12/21/2004, 5:08 PM

I have this function working but in my case I would like more security for a password change page. With this example a user could leave his terminal and another user could type the url for the password change page without the "?Logout=yes" command and still enter the page.

How can I force a logged in user to re-log without the back door loop hole?

Thanks
_________________
Jim
View profile  Send private message
peterr


Posts: 5971
Posted: 12/21/2004, 6:47 PM

You can ask for the current password like this forum does: http://forums.codecharge.com/change_password.php
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
jim7567g

Posts: 38
Posted: 12/22/2004, 11:13 AM

Yes, this is what I want to do. Can the current password field be checked against the database prior to the update without using custom code or events?
_________________
Jim
View profile  Send private message
peterr


Posts: 5971
Posted: 12/22/2004, 11:33 PM

Probably not in this case.

Could you please create a new discussion thread if you like to discuss this topic with others.
Thank you.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
wayne186

Posts: 30
Posted: 12/29/2004, 12:05 AM

Hi - I am trying to do a logout link and I have followed your instructions.. when the link is selected I am sent to the page as placed in the link (index.php) but I can still just select the back button in the browser and I can continue to navigate around the site as normal. So it appears that the login session has not been cleared? I have placed an image of the parameters I have set so you can see if I have made a serious but simple cockup.

View profile  Send private message
peterr


Posts: 5971
Posted: 12/29/2004, 1:19 AM

The login session is always cleared during logout, but the browser's cache may not be cleared. Please see http://forums.codecharge.com/posts.php?post_id=53252
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.