Jump to content

.net-Programmers-Help


Recommended Posts

Posted

This is classic asp code

Please check the below code.

The back button should work same as browser back button.

This is the code which i used but may not work:

'Added below Javascript to history.back code

Page.ClientScript.RegisterStartupScript(Me.GetType(), "Script", "javascript:history.go(-1);", True)


But has to write something in case statement of back button click event...

Right now its redirecting to default.asp only.

The highlighted code for Back Button has to be modified.


===============================================================
<%@ Language=VBScript %>

<%

Option Explicit

Response.Buffer = True

Response.Expires = 0

%>

<!-- #INCLUDE file="../includes/ToolShed.asp" -->

<!-- #INCLUDE file="../includes/MessageBoard.asp" -->

<%

'====================================================================

' Name: Splash.asp

' Description: Intro to site, link to security

'====================================================================

' Created By: CCG

'====================================================================

'Modifications: Date,initials,description. In descending order

'

'====================================================================

'page nav

Select Case lCase(Request.Form("ButtonAction"))

Case "back"

'Commented below redirect code

'Response.Redirect "../Default.asp"

'Added below Javascript to history.back code

Page.ClientScript.RegisterStartupScript(Me.GetType(), "Script", "javascript:history.go(-1);", True)

Case "continue"

Response.Redirect "ProgramSelect.asp"

Case Else

Call DspMainContent()

End Select

Response.End

'-----------------------------------------------------------------

'-----------------------------------------------------------------

'------ Page Element Display Subs --------------------------------

'-----------------------------------------------------------------

'-----------------------------------------------------------------

Sub DspMainContent()

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title><%= Application("AppTitle") %></title>

<meta name="Child Nutrition Program Entry" http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" type="text/css" href="../styles/master.css" media="screen, print" />

<script language='JavaScript' type='text/javascript'>

function MasterPage_onLoad() {

document.getElementById('leftcol-splash').style.height=

document.getElementById('rightcol-splash').style.height=

document.getElementById('midcol-splash').offsetHeight+"px";

//loginform.UserName.focus();

}

function ButtonClicked(thisButton){

//get the stand in button object

var fakeButton ;

fakeButton = document.getElementById("ButtonAction");

fakeButton.value = thisButton;

//alert(thisButton+" button has been clicked");

document.form1.submit();

}

</script>

</head>

<body onload="MasterPage_onLoad();">

<div id="maincontent">

<div id="header-login"></div>

<div id='leftcol-splash'>&nbsp;</div>

<div id='midcol-splash'>

<!-- RIGHT COLUMN OF LOGIN PAGE CONTENT -->

<div id="loginRightContainer">

<!-- Message Board -->

<div id="newsbox">

<%

Call LoadHeader()

Call LoadBody()

Call DspBoard()

%>

</div>

<div id="Disabled_Login" style="<%=ShowHideObject(Session("DisableLogin"))%>; text-align: center; color:Red; margin-top:5px; ;">

<b>Login has been disabled</b>

</div>

</div> <!-- close of <div id='loginRightContainer'> -->

<form id='form1' name='form1' action='SingleSignOnLanding.asp' method='post' style='display: inline'>

<%

Response.Write _

"<div class='buttonContainer' id='buttonContainer'>" & vbcrlf

Call tsid_ButtonObject ("BackButton", "< Back", 99, " title=""Click to return to the Previous Screen without changing any information."" onClick=ButtonClicked(""Back"");", "button")

If Not Session("DisableLogin") Then

'Call tsid_ButtonObject ("ContinueButton", "Continue", 99, " class='primaryActionButton' title=""Click to Continue"" onClick=ButtonClicked(""Continue""); ", "button")

Response.Write "<input type=""button"" name=""ContinueButton"" id=""ContinueButton"" value=""Continue"" tabindex=""99"" style=""font-weight: bold; color: White; background-color: Green; margin-top: 25px;"" title=""Click to Continue"" onClick=ButtonClicked(""Continue""); />" & vbcrlf

End If

Call tsid_HiddenData("ButtonAction","")

Response.Write _

"</div>" & vbcrlf

%>

</form> <!-- close of <form id='form1' ...> -->

<div id='midcol-nslplogo'>

<div align="left" class="logo"><img src="../images/cnpexpress-logo-sm-gray.gif" alt="Logo" /></div>

<div align="center" class="copyright">Copyright &copy; <%=Year(Now())%> Colyar Consulting Group</div>

</div>

</div> <!-- close of <div id='midcol-nslp'> -->

<div id='rightcol-splash'>&nbsp;</div>

<div id="footer-login">

&nbsp;

</div>

</div>

</body>

</html>

<%

End Sub

'----------------------------------------------------------

Function ShowHideObject(ShowObject)

If ShowObject Then

ShowHideObject = ""

Else

ShowHideObject = "Display: none;"

End If

End Function

'----------------------------------------------------------

Posted

fakebutton tesesi fakebob ani petu work ayidhi ...fake must come with bob lekpaothe compile kadhu code ...:o

Posted

fakebutton tesesi fakebob ani petu work ayidhi ...fake must come with bob lekpaothe compile kadhu code ... :o

brahmanandamgif.gif?1392235157

Posted


fakebutton tesesi fakebob ani petu work ayidhi ...fake must come with bob lekpaothe compile kadhu code ... :o

brahmanandamgif.gif?1392235157
adhi basic kada ...:o
×
×
  • Create New...