Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - UserID
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UserID

 Post Reply Post Reply Page  12>
Author
true_king View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2007
Location: Hell
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote true_king Quote  Post ReplyReply Direct Link To This Post Topic: UserID
    Posted: 12 May 2008 at 9:36pm
i'm using

function chatter(w,h)
  {
 
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    var lstr = "ChatRoom/chatroom.asp?txtUsername="& strLoggedInUsername &", 'ChatWindow2', 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=700,height=460,top='+wint+',left='+winl"
 
    window.open(lstr)
   
  }

to open a chat window, where strLoggedInUsername is webwiz logedin username but not working.........

anyway, which string use as username in forum?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 8:39am
Try:-

txtUsername=<% = strLoggedInUsername %>",

As the variable you are calling is a server side ASP variable and not available client side
Back to Top
true_king View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2007
Location: Hell
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote true_king Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 11:03am
Ya it working... i'm using aspchatnow to make a chatbox.... i'm using this,

ChatRoom/chatroom.asp?txtUsername=King

but no one in right panel of active userlist..... but if i do it from default.asp(aspchatnow) and enter a name it open a new popup window with same url,

ChatRoom/chatroom.asp?txtUsername=King

but it working how?
Back to Top
true_king View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2007
Location: Hell
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote true_king Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 11:50am
i'm using this,

<form>
<p align="center">
<input type=button
href="#"
value="Open ChatZone"
name="Chatter"
OnClick="chatter(709,481);"
</p>
<SCRIPT LANGUAGE="javascript">
function chatter(w,h)
{
try
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
var username = '<%= strLoggedInUsername%>';
if(username=='Guest')
{
alert("You Must Login In Order To Use This Feature.");
}
else
{
window.open('ChatRoom/ChatRoom.asp?txtUsername='+username, 'ChatWindow2', 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=700,height=460,top='+wint+',left='+winl)}
}
catch(e)
{
alert("Unable To Open Chat Window, Maybe Pop-Ups Are Blocked.");
}
}
</SCRIPT>
</form>

but itz not secure from client any idea?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 12:02pm
The only way to make it truly secure is to pass the username across server side.

You may be able to modify web wiz forums and ASPchatNow to both use session variables to pass across the username.
Back to Top
true_king View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2007
Location: Hell
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote true_king Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 12:57pm
ok if i sending session variable from web wiz forums to aspchatnow..... how aspchatnow got it?

i know asp.net methode,

session.add("")
session.item.add("")

what is it in asp?

btw is session can be hack using javascript injection?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 1:00pm
Sessions are server side so can not be affected by client side javascript as session varaibles are stored on the server and are not passed across to the clients browser.

To set a session is ASP use:-

Session("Username") = strLoggedInUsername

And to read in back in use:-

strLoggedInUsername = Session("Username")
Back to Top
true_king View Drop Down
Groupie
Groupie
Avatar

Joined: 05 November 2007
Location: Hell
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote true_king Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2008 at 1:02pm
also i need to clear session during log off.... how do this in webwiz or when clicking close button of aspchatnow...(let i put code session remove when click onto log out button of aspchatnow, but if user click on close button then?)
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.