Re: Click in page directly send to server? (General questions)
Dirk,
Here is an example of using one checkbox which triggers Post (thru JavaScript) and checks it if unchecked (and vice-versa):
[code]Dim response As String
If req = /page.htm Then
If user.Request.Posted.Count > 0 Then
If user.Request.Posted.Exists( C1 ) Then
response = response & <html><body>
response = response & <form name= check1 method= POST action= page.htm >
response = response & <p><input type= checkbox name= C1 onclick= mySubmit(); CHECKED></p>
response = response & </form></body>
response = response & <script type= text/javascript language= javascript >
response = response & function mySubmit()
response = response & {
response = response & document.forms(0).submit();
response = response & }
response = response & </script></html>
End If
Else
response = response & <html><body>
response = response & <form name= check1 method= POST action= page.htm >
response = response & <p><input type= checkbox name= C1 onclick= mySubmit(); ></p>
response = response & </form></body>
response = response & <script type= text/javascript language= javascript >
response = response & function mySubmit()
response = response & {
response = response & document.forms(0).submit();
response = response & }
response = response & </script></html>
End If
End If
user.response.Body = response
user.response.StatusCode = OK
user.response.Send[/code]
As for Authentication, you can simply set Authentication property to authRequired, and AuthenticationType to Basic, and server will require your users to log in. Once provided, UserAuthenticate event is raised, and you can allow or deny user access.
Hope this helps.
Regards,
Damba
Complete thread:
- Click in page directly send to server? - dirk, 2009-11-19, 10:30
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 11:35
- Re: Click in page directly send to server? - dirk, 2009-11-19, 11:46
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 12:25
- Re: Click in page directly send to server? - dirk, 2009-11-19, 12:40
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 13:39
- Re: Click in page directly send to server? - dirk, 2009-11-19, 13:50
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 13:54
- Re: Click in page directly send to server? - dirk, 2009-11-19, 13:50
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 13:39
- Re: Click in page directly send to server? - dirk, 2009-11-19, 12:40
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 12:25
- Re: Click in page directly send to server? - dirk, 2009-11-19, 11:46
- Re: Click in page directly send to server? - wodDamir, 2009-11-19, 11:35