Click here to Skip to main content
15,896,269 members
Home / Discussions / Web Development
   

Web Development

 
Questiondetecting IP address & banning the vistor Pin
DEVILSAN12-May-07 12:00
DEVILSAN12-May-07 12:00 
AnswerRe: detecting IP address & banning the vistor Pin
MatrixCoder12-May-07 12:08
MatrixCoder12-May-07 12:08 
AnswerRe: detecting IP address & banning the vistor Pin
Davide Icardi12-May-07 12:28
Davide Icardi12-May-07 12:28 
JokeRe: detecting IP address & banning the vistor Pin
JimmyRopes13-May-07 9:03
professionalJimmyRopes13-May-07 9:03 
QuestionWeird Post-Back Thing Pin
#realJSOP12-May-07 1:38
professional#realJSOP12-May-07 1:38 
AnswerRe: Weird Post-Back Thing Pin
Hesham Amin13-May-07 9:21
Hesham Amin13-May-07 9:21 
GeneralRe: Weird Post-Back Thing Pin
#realJSOP13-May-07 23:21
professional#realJSOP13-May-07 23:21 
GeneralRe: Weird Post-Back Thing Pin
#realJSOP14-May-07 4:16
professional#realJSOP14-May-07 4:16 
Okay - here's the page cut down to almost bare minimums

<%@ LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="Expires" content="0" />
</head>
<body>

<%
'-------------------------------------------------------------
sub Alert(sMsg)
    Response.Write("<script type='text/javascript' language='javascript'>" _ 
                   & "alert('" & sMsg & "');</script>")
end sub

'-------------------------------------------------------------
function DoSomething(sAction)
    DoSomething = "Something was done for " & sAction & "."
end function

'-------------------------------------------------------------
'-------------------------------------------------------------
Dim myAction:       myAction       = request.QueryString("myAction")
Dim sRoomToProcess: sRoomToProcess = request.QueryString("roomid")
Dim sSomethingDone: sSomethingDone = ""
Dim bNeedRedirect:  bNeedRedirect  = false

Alert myAction & "\n" & sRoomToProcess

select case myAction
    case "moveUp"
        sSomethingDone = DoSomething(myAction)
        bNeedRedirect = true
    case "moveDown"
        sSomethingDone = DoSomething(myAction)
        bNeedRedirect = true
    case "addRoom"
        sSomethingDone = DoSomething(myAction)
        bNeedRedirect = true
    case "deleteRoom"
        sSomethingDone = DoSomething(myAction)
        bNeedRedirect = true
    case "editRoom"
        sSomethingDone = DoSomething(myAction)
    case else
        sSomethingDone = "Nothing was done (no parameters found)."
end select

if bNeedRedirect then
    Response.Redirect("erBoard_roommgr.asp")
end if
%>
<a href="erBoard_roommgr.asp?myAction=addRoom&roomid=Room 1">Add</a><br />
<a href="erBoard_roommgr.asp?myAction=deleteRoom&roomid=Room 2">Delete</a><br />
<a href="erBoard_roommgr.asp?myAction=editRoom&roomid=Room 3">Edit</a><br />
<a href="erBoard_roommgr.asp?myAction=moveUp&roomid=Room 4">Up</a><br />
<a href="erBoard_roommgr.asp?myAction=moveDown&roomid=Room 5">Down</a><br />
<br />
<br />
<p>
<%=sSomethingDone%>
</p>

</body>
</html>


The problem appears to be that it's processing the Response.Redirect line BEFORE it gets the parameters from the querystring. Everything except the "EDIT" link causes a redirect (for purposes of example).

My desire is to actually clear the querystring after retrieving the values to avoid adverse effects caused by the user refreshing the page. I'd have no problem with eliminating the use of Redirect if there's a way to do so.




"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


QuestionHow to launch project in IE (keeps coming up in firefox) Pin
Mundo Cani11-May-07 22:51
Mundo Cani11-May-07 22:51 
AnswerRe: How to launch project in IE (keeps coming up in firefox) Pin
Mundo Cani11-May-07 22:58
Mundo Cani11-May-07 22:58 
GeneralRe: How to launch project in IE (keeps coming up in firefox) Pin
#realJSOP12-May-07 1:24
professional#realJSOP12-May-07 1:24 
GeneralRe: How to launch project in IE (keeps coming up in firefox) Pin
Arun.Immanuel12-May-07 2:32
Arun.Immanuel12-May-07 2:32 
GeneralRe: How to launch project in IE (keeps coming up in firefox) Pin
Mundo Cani12-May-07 7:09
Mundo Cani12-May-07 7:09 
QuestionPHP getType Pin
Socheat.Net11-May-07 19:53
Socheat.Net11-May-07 19:53 
AnswerRe: PHP getType Pin
#realJSOP12-May-07 1:18
professional#realJSOP12-May-07 1:18 
GeneralRe: PHP getType Pin
Socheat.Net13-May-07 15:29
Socheat.Net13-May-07 15:29 
AnswerRe: PHP getType Pin
JimmyRopes15-May-07 3:52
professionalJimmyRopes15-May-07 3:52 
QuestionHow to highlight the row..... Pin
Dotnetkanna11-May-07 9:06
Dotnetkanna11-May-07 9:06 
QuestionCalendar enhancement ? Pin
Cody_2111-May-07 7:37
Cody_2111-May-07 7:37 
QuestionBUTTON OVER IMAGE IN ASP.NET? Pin
hifiger200411-May-07 6:38
hifiger200411-May-07 6:38 
AnswerRe: BUTTON OVER IMAGE IN ASP.NET? Pin
Fred_Smith11-May-07 7:33
Fred_Smith11-May-07 7:33 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
hifiger200411-May-07 8:01
hifiger200411-May-07 8:01 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
Fred_Smith11-May-07 8:25
Fred_Smith11-May-07 8:25 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
hifiger200411-May-07 8:47
hifiger200411-May-07 8:47 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? [modified] Pin
Fred_Smith11-May-07 9:23
Fred_Smith11-May-07 9:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.