•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 397,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,541 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 13127 | Replies: 3
![]() |
•
•
Join Date: May 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello everyone, I have an ASP chat inside an IFRAME. The ASP file is hosted on a different domain than the main website.
When the user logs on by entering their name, the chat stores a cookie so the user can start posting messages. However since the cookie is stored using the main domain (not the iframe), the chat doesn't recognise it anymore and keeps asking to log on.
How can I get it to recognise the cookie, or to store it with the correct domain?
Your help is appreciated
Here is the coding used by the chat to recognise the cookie:
When the user logs on by entering their name, the chat stores a cookie so the user can start posting messages. However since the cookie is stored using the main domain (not the iframe), the chat doesn't recognise it anymore and keeps asking to log on.
How can I get it to recognise the cookie, or to store it with the correct domain?
Your help is appreciated
Here is the coding used by the chat to recognise the cookie:
•
•
•
•
<%
'/// Get Nick Name
nick=request("nick")
xlaSBnick=request.cookies("xlaSBnick")"
if nick<>"" then
response.cookies("xlaSBnick")=nick
xlaSBnick=nick
end if
if xlaSBnick="" then
formproperties="action=bottomframe.asp onsubmit='return validatenick();'"
else
formproperties="action=receiveframe.asp target=xlaSBreceive onsubmit='return shout();'"
end if
%>
•
•
Join Date: Sep 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Hello everyone, I have an ASP chat inside an IFRAME. The ASP file is hosted on a different domain than the main website.
When the user logs on by entering their name, the chat stores a cookie so the user can start posting messages. However since the cookie is stored using the main domain (not the iframe), the chat doesn't recognise it anymore and keeps asking to log on.
How can I get it to recognise the cookie, or to store it with the correct domain?
Your help is appreciated
Here is the coding used by the chat to recognise the cookie:
I'm having this same problem... I got around it temporarily by setting each user's browser to trust the domain. I hope there's a better solution though.
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Rep Power: 1
Solved Threads: 1
You can not using cookies. You should use javascript to send the information to the iframe
you can set the domain on a cookie as follows
and even a path of the cookie on that domain to make sure it can only be read by the path on that domain and not another
Response.Cookies("CookieName").Domain = "www.mydomain.com"and even a path of the cookie on that domain to make sure it can only be read by the path on that domain and not another
Response.Cookies("CookieName").Path = "/maindir/subdir/path" When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
- Dynamicallu Resizeing IFRAME based on content (JavaScript / DHTML / AJAX)
- how do i escape from an iframe? (HTML and CSS)
- SQL slow in Domain Control (MS SQL)
- Domain same name as website.. problems (Windows NT / 2000 / XP / 2003)
- XP hungs task bar hungs on joining a domain (Windows NT / 2000 / XP / 2003)
- Dynamic iframe height ? (HTML and CSS)
- problem:on click button pagr refresh again (VB.NET)
- ...Not sure where the problem lies... (Web Browsers)
Other Threads in the ASP Forum
- Previous Thread: How to run asp files on linux server using apache
- Next Thread: ASP electronic exam project, problem when update data base


Linear Mode