| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1957 人关注过本帖
标题:框架页面注册后的跳转问题
只看楼主 加入收藏
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
你把TOP里的文件和regpro.asp发上来就可以了,注册页面就你刚才发的那个不要动

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-08-23 17:30
demon301686
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2007-4-3
收藏
得分:0 

<!--#include file="conn.asp"-->
<html>
<head>
<title>XXXXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="5; url=right.htm">
<SCRIPT language=JavaScript>
<!--
function RegFrom_onsubmit() {
if(document.Regfrom.idtext.value=="")
{
alert("请填写[会员帐号],然后再[提交申请].")
document.Regfrom.idtext.focus()
return false
}
else if(document.Regfrom.pwdtext.value=="")
{
alert("请填写[密码],然后再[提交申请].")
document.Regfrom.pwdtext.focus()
return false
}
else if(document.Regfrom.pwdtext2.value=="")
{
alert("请填写[密码确定],然后再[提交申请].")
document.Regfrom.pwdtext2.focus()
return false
}
else if(document.Regfrom.pwdtext.value!=document.Regfrom.pwdtext2.value)
{
alert("两次填写的密码不一致,请确定密码正确.")
document.Regfrom.pwdtext2.focus()
return false
}
else if(document.Regfrom.wttext.value=="")
{
alert("请填写[电子邮件],然后再[提交申请].")
document.Regfrom.wttext.focus()
return false
}
}
-->
</SCRIPT>

<style type="text/css">
<!--
body,td,th {
font-family: Tahoma;
font-size: 12px;
color: #333333;
}
.MainFront {
font-family: Tahoma;
font-size: 12px;
color: #000000;
}
.RedFront {
font-family: Tahoma;
font-size: 12px;
color: #FF0000;
}
.STYLE3 {font-size: 16px}
.STYLE4 {font-size: 14px}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="500" height="250" border="0" align="left" cellspacing="0">
<tr>
<td align="center"><p>

<table width="384" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
if request.Form("idtext")<>"" then
set myrec=server.CreateObject("ADODB.Recordset")
set rs=server.CreateObject("ADODB.Recordset")
myrec.open "Users",conn,3,3
sql="select * from users where name='"&request.Form("idtext")&"'"
rs.open sql,conn,1,1
if not rs.eof then
conn.close
set rs=nothing
set myrec=nothing
set conn=nothing
%>
<td width="113"><p><span class="STYLE4">很遗憾 你的帐号已被人注册</span></p>
<p><a href="rep.htm">请从新注册</a>
<%else%>
</p>
<td width="205"><p><span class="STYLE4">恭喜你 你的帐号注册成功.<br>请在上方登陆您的帐号</span></p>
<p>
<%
myrec.addnew
myrec("name")=request.Form("idtext")
myrec("word")=request.Form("pwdtext")
myrec("key1")=request.Form("wttext")
myrec.update
conn.close
set rs=nothing
set myrec=nothing
set conn=nothing
end if
else
response.Redirect("right.htm")
end if
%>


</p></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<p>
</td>
</tr>
</table>
</body>
</html>

2007-08-23 17:31
demon301686
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2007-4-3
收藏
得分:0 

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/fttp.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("name"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="topy.asp"
MM_redirectLoginFailed="topf.html"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_fttp_STRING
MM_rsUser.Source = "SELECT name, word"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM users WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND word='" & Replace(Request.Form("psd"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>国际商业信息交流网(暂定)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="css/ys1682.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<style type="text/css">
<!--
.STYLE2 {font-size: 5px}
.MainFront {
font-family: Tahoma;
font-size: 10px;
color: #000000;
}
-->
</style>


</HEAD>

<BODY>
<form action="<%=MM_LoginAction%>" method="POST" name="login" id="login">
<img src="未标题-7副本.jpg" >
<DIV id=topnav>
&nbsp;&nbsp;&nbsp;<a>用户名</a>
<input name="name" type="text" class="MainFront" size="13" maxlength="20">
<a >密码</a>
<input name="psd" type="password" class="MainFront" size="13" maxlength="20">



<INPUT class=stbtm type=submit value=登录 name=submit>

&nbsp;<a href="rep.htm" target="mainFrame"/><img src="images/3721.gif" border="0" align="top" ></a>

</DIV>
</form>
</body>

</html>

2007-08-23 17:33
demon301686
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2007-4-3
收藏
得分:0 
你有电子邮件没???给我个   我发到你邮箱你吧```这里地方太小了
2007-08-23 17:36
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 
注册成功后跳转到首页页面,首页是right.htm 吗?不是,就改成首页地址

然后登陆页面,TOP里的是登陆页面吗?你怎么发了两次登陆代码都是这样的,看不清楚

[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-08-23 17:38
demon301686
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2007-4-3
收藏
得分:0 
    我打开一个页面里面加一段JAVA的代码它能控制其他框架的跳转  这个代码应该怎么写啊???
2007-08-23 17:43
demon301686
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2007-4-3
收藏
得分:0 
回复:(hmhz)注册成功后跳转到首页页面,首页是righ...

<%@
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>国际商业信息交流网(暂定)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="css/ys1682.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<style type="text/css">
<!--
.STYLE2 {font-size: 5px}
.MainFront {
font-family: Tahoma;
font-size: 10px;
color: #000000;
}
-->
</style>


</HEAD>

<BODY>
<form action="<%=MM_LoginAction%>" method="POST" name="login" id="login">
<img src="未标题-7副本.jpg" >
<DIV id=topnav>
&nbsp;&nbsp;&nbsp;<a>用户名</a>
<input name="name" type="text" class="MainFront" size="13" maxlength="20">
<a >密码</a>
<input name="psd" type="password" class="MainFront" size="13" maxlength="20">



<INPUT onclick="goUrl()" class=stbtm type=submit value=登录 name=submit >
<script>
function goUrl
{
window.parent.mainFrame.location.href="right.htm";
}
</script>


&nbsp;<a href="rep.htm" target="mainFrame"/><img src="images/3721.gif" border="0" align="top" ></a>

</DIV>
</form>
</body>

</html>

2007-08-23 17:46
快速回复:框架页面注册后的跳转问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015421 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved