Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sessions in asp page

Status
Not open for further replies.

mtrasp

Programmer
Jun 15, 2009
35
US
Hi i am working on asp application. i did some thing wrong about sessions

<%@ Language="VBScript" %>
<% Option Explicit %>
<% Response.Buffer = True%>
<%
i have one asp page work.asp in that i have code and session like this
if something Then
iscopy=True
else
iscopy=False
End If

If (iscopy = False) then
'retry copy for 5 times
do while(i < 5)
If something Then
iscopy=True
else
something
end if
i=i+1
loop
End If
session("iscopied") = iscopy

%>


in another asp page master.asp
i am using session in javascript like this


if (session("iscopied")==true)
{
do something
}
else
alert("Error ");

please help me my boss told me that i am doing wrong in master.asp page . because i declared session("iscopied") = iscopy in vbscript but i am using that session value in javascript.please tell me how can i solve this one
 
You are doing someting wrong a jscript session is not the same as a vbscript funtion - you can't transfer them back and forth...just like you can't create a session variable in a classic asp page and use it on a .net page...

pick one language or the other and go with it - remember ASP is a technology not a language...



--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Thank you for your reply ,
two pages are from asp application only. my boss told me that
use xmlparser.responsetext to get the value from work.asp


function post(kitnum, kitypeid, releasekitid)
{
// set our global KitNumber var to the value passed to the postkit function.
KitNumber = kitnumber;
if (parseInt(kittypeid) == 1)
{ //Kittype whql
donepost.innerHTML = '<b>something</b>';

window.status = "somehing.";
var xmlParser = new ActiveXObject("Microsoft.XMLHTTP");
xmlParser.open("POST", "/masterchild/work.asp?kitnumber=" + kitnumber, false);
xmlParser.send();
while (xmlParser.readyState != 4)
{
//do nothing
}
var state = xmlParser.responseText;
xmlParser = null;

// get output of workt.asp. Should be pass/fail
'
// If output of work.asp = pass
if (state =="DONE")
{
something
}
else
alert("Error ");

in the above i am adding the code var state = xmlParser.responseText;
but i am getting some errors. actually i am trying to get DOne or fail status from work.asp page so my boss told me that use xmlparser.responsetext. by using this one we can get done status automatically or we need to do something in work.asp please help me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top