Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Response.Redirect and alert

Posted on 2000-04-25
3
Medium Priority
?
512 Views
Last Modified: 2012-08-13
Hello.
can i redirect & alert?



function Andmebaas_Server() {
if (String(Session("State")) != "undefined" && String( Session("offset")) != "undefined")
{
    Andmebaas.State = Session("State")
    Andmebaas.MoveFirst()
    Andmebaas.RestoreState()
   
    for (var i = 0; i < Session("offset"); i++)
    {
        if (!Andmebaas.IsBOF())
        {
            Andmebaas.MovePrevious()
        }
    }
   
    Session("State") = "undefined"
    Session("offset") = "undefined"
}
if (String(Request("Image1")) != "undefined")
{
    Response.Redirect(escape("online.asp") + "?Andmebaas_Action=" + Server.URLEncode(Andmebaas.FilterString) + "&" + "Andmebaas_Position=" + "PAR:" + Server.URLEncode(Andmebaas.GetParams()))
}
if (String(Request("Image2")) != "undefined")
{
    Response.Redirect(escape("online.asp") + "?Andmebaas_Action=" + Server.URLEncode(Andmebaas.FilterString) + "&" + "Andmebaas_Position=" + "PAR:" + Server.URLEncode(Andmebaas.GetParams()))
}
if (String(Request("Image3")) != "undefined")
{
    Response.Redirect(escape("online.asp") + "?Andmebaas_Action=" + Server.URLEncode(Andmebaas.FilterString) + "&" + "Andmebaas_Position=" + "PAR:" + Server.URLEncode(Andmebaas.GetParams()))
}
if (Andmebaas.IsBOF() && Andmebaas.IsEOF())
{
    Response.Redirect(escape("new.asp")
    alert("test");
}
0
Comment
Question by:nox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 150 total points
ID: 2749502
the alert box happerns on the client side. the response redirect on the server.

a way around this is not to redirect but write out a javascript alert box and then follow this with an include.. i.e.,

%>
<SCRIPT>
     alert("help !")
<SCRIPT>
<!--#inlcude file="script.asp"-->
<%

OR pass your script a paramter which notifies it to pop an alert on load i.e..

Response.Redirect("Script.asp?alert=help")

them in your script.asp

do something like this

IF(Request("alert") <> "")THEN
%>
    <SCRIPT>
     alert(<%=Request("alert")%>);
    </SCRIPT>
<%
END IF

either will appear the same

Hope This Helps
0
 
LVL 4

Expert Comment

by:jkunal
ID: 2750079
No you cannot response.redirect and alert at the same time cause, redirect is at the server end, while alert at the client.

what you can do is

<script language=javascript>
alert("hi");
document.location.href='go.asp';
</script>
0
 

Author Comment

by:nox
ID: 2751957
Thanx! Few modifications and it worked
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question