在JavaScript中存储会话的JavaScript函数 [英] store session in asp in javascript function

查看:95
本文介绍了在JavaScript中存储会话的JavaScript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

如何在经典ASP中的java脚本函数中存储会话....我的脚本是



< script language =   JavaScript> 
function SubmitPtEditor()
{
document .getElementById(< span class =code-string>' sessionhidden)。value = document.getElementById(editPtLastName')。value
// session('last')= document.getElementById(editPtLastName);
alert( document .getElementById( sessionhidden) .value);
document .getElementById( Form1)。submit();
popupWindow = window .open( ../ dashboard / test.asp popUpWindow
}
< / 脚本 >



//session('last\")=document.getElementById(\"editPtLastName);不工作。

我想用这个请回复有什么问题





谢谢&问候

Srishti Gupta

解决方案

ASP无法理解用户输入的内容。因此,如果您想将 document.getElementById(editPtLastName)存储到会话中,您应该在提交表单后执行此操作。

例如,你的表单的动作是PtProcess.asp,所以在你的PtProcess.asp文件中,你可以这样编码:

 Session(last)= Request( editPtLastName)


Hello
How to store session in java script function in Classic ASP....My script is

<script language="JavaScript">
function SubmitPtEditor()
{
document.getElementById('sessionhidden").value=document.getElementById("editPtLastName').value
//session('last")=document.getElementById("editPtLastName");
alert(document.getElementById("sessionhidden").value);
document.getElementById("Form1").submit();
popupWindow = window.open("../dashboard/test.asp","popUpWindow")
}
</Script>


//session('last")=document.getElementById("editPtLastName"); is not working.
I want to use this please reply what is the problem


Thanks & Regards
Srishti Gupta

解决方案

ASP cannot understand what the user are typing. So if you want to store document.getElementById("editPtLastName") into session, you should do it after the form is submitted.
For example, your form's action is "PtProcess.asp", so in your PtProcess.asp file, you could code like this:

Session("last") = Request("editPtLastName")


这篇关于在JavaScript中存储会话的JavaScript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆