Professional Web Applications Themes

redirect to .. - Dreamweaver AppDev

hi, I have several page where you can edit the record When you modified the record you suppose to go where you came for example you can update the record from the following pages 1> search.asp 2> callsopen.asp when you update the record from the search.asp and you click oke you should redirect to search.asp when you update the record from the callsopen.asp and you click oke you should redirect to callsopen.asp Soworking with servervariables is very new for me <% Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING") Response.Redirect("../search.asp" ) %> this coding is working fine when you update the record from ...

  1. #1

    Default redirect to ..

    hi,

    I have several page where you can edit the record
    When you modified the record you suppose to go where you came

    for example
    you can update the record from the
    following pages

    1> search.asp
    2> callsopen.asp

    when you update the record from the search.asp
    and you click oke you should redirect to search.asp

    when you update the record from the callsopen.asp
    and you click oke you should redirect to callsopen.asp

    Soworking with servervariables is very new for me

    <%
    Request.ServerVariables("URL") & "?" &
    Request.ServerVariables("QUERY_STRING")
    Response.Redirect("../search.asp" )
    %>

    this coding is working fine when you update the record from search.asp
    but how with callsopen.asp

    should you use the IF statement here
    something like

    <%
    if Request.ServerVariables("URL") = " ../callsopen") then
    Request.ServerVariables("QUERY_STRING")
    Response.Redirect("../callsopen.asp" )
    else
    Response.Redirect("../search.asp" )

    end if
    %>

    do I have to something like this??

    please advise
    Kisoen



    rajesh Guest

  2. #2

    Default Re: redirect to ..

    One way you could set the redirect without having to search the querystring
    is pass a variable you set yourself for the referring page.

    Example: something.asp?referrer=search

    <%
    referrer = request.querystring("referrer")
    save = request.querystring("save") = "yes"

    if referrer = "search" then
    retrun_val = "search.asp"
    elseif referrer = "callsopen" then
    return_val = "callsopen.asp"
    end if

    if save then
    cn.execute "your statement here"
    response.redirect(return_val)
    end if
    %>

    HTH,
    bT

    "rajesh" <r.kisoenpersadchello.nl> wrote in message
    news:d5okbg$t4t$1forums.macromedia.com...
    > hi,
    >
    > I have several page where you can edit the record
    > When you modified the record you suppose to go where you came
    >
    > for example
    > you can update the record from the
    > following pages
    >
    > 1> search.asp
    > 2> callsopen.asp
    >
    > when you update the record from the search.asp
    > and you click oke you should redirect to search.asp
    >
    > when you update the record from the callsopen.asp
    > and you click oke you should redirect to callsopen.asp
    >
    > Soworking with servervariables is very new for me
    >
    > <%
    > Request.ServerVariables("URL") & "?" &
    > Request.ServerVariables("QUERY_STRING")
    > Response.Redirect("../search.asp" )
    > %>
    >
    > this coding is working fine when you update the record from search.asp
    > but how with callsopen.asp
    >
    > should you use the IF statement here
    > something like
    >
    > <%
    > if Request.ServerVariables("URL") = " ../callsopen") then
    > Request.ServerVariables("QUERY_STRING")
    > Response.Redirect("../callsopen.asp" )
    > else
    > Response.Redirect("../search.asp" )
    >
    > end if
    > %>
    >
    > do I have to something like this??
    >
    > please advise
    > Kisoen
    >
    >
    >

    Brandon Taylor Guest

  3. #3

    Default Re: redirect to ..

    thx.

    but still have problems if this coding should put is a UPDATE FORM
    show me how does your coding fit to this update form?
    As DW is making there own coding


    ' append the query string to the redirect URL
    If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
    Request.QueryString <> "") Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
    End If
    End If


    please advise how
    gr. kisoen









    "Brandon Taylor" <btbtaylordesign.com> schreef in bericht
    news:d5olod$1mf$1forums.macromedia.com...
    > One way you could set the redirect without having to search the
    querystring
    > is pass a variable you set yourself for the referring page.
    >
    > Example: something.asp?referrer=search
    >
    > <%
    > referrer = request.querystring("referrer")
    > save = request.querystring("save") = "yes"
    >
    > if referrer = "search" then
    > retrun_val = "search.asp"
    > elseif referrer = "callsopen" then
    > return_val = "callsopen.asp"
    > end if
    >
    > if save then
    > cn.execute "your statement here"
    > response.redirect(return_val)
    > end if
    > %>
    >
    > HTH,
    > bT
    >
    > "rajesh" <r.kisoenpersadchello.nl> wrote in message
    > news:d5okbg$t4t$1forums.macromedia.com...
    > > hi,
    > >
    > > I have several page where you can edit the record
    > > When you modified the record you suppose to go where you came
    > >
    > > for example
    > > you can update the record from the
    > > following pages
    > >
    > > 1> search.asp
    > > 2> callsopen.asp
    > >
    > > when you update the record from the search.asp
    > > and you click oke you should redirect to search.asp
    > >
    > > when you update the record from the callsopen.asp
    > > and you click oke you should redirect to callsopen.asp
    > >
    > > Soworking with servervariables is very new for me
    > >
    > > <%
    > > Request.ServerVariables("URL") & "?" &
    > > Request.ServerVariables("QUERY_STRING")
    > > Response.Redirect("../search.asp" )
    > > %>
    > >
    > > this coding is working fine when you update the record from search.asp
    > > but how with callsopen.asp
    > >
    > > should you use the IF statement here
    > > something like
    > >
    > > <%
    > > if Request.ServerVariables("URL") = " ../callsopen") then
    > > Request.ServerVariables("QUERY_STRING")
    > > Response.Redirect("../callsopen.asp" )
    > > else
    > > Response.Redirect("../search.asp" )
    > >
    > > end if
    > > %>
    > >
    > > do I have to something like this??
    > >
    > > please advise
    > > Kisoen
    > >
    > >
    > >
    >
    >

    rajesh Guest

  4. #4

    Default Re: redirect to ..

    Hi, sorry to take so long to get back to you.

    You'll see in the MM code blocks where they execurte whatever SQL statement
    and then do their response.redirect to the value of the MM_editRedirectUrl
    variable. Just replace that variable with your own string and it will
    redirect to whatever page you want and pass whatever values you want.

    Writing your own code is so much more flexible.

    "rajesh" <r.kisoenpersadchello.nl> wrote in message
    news:d5r7bu$t6f$1forums.macromedia.com...
    > thx.
    >
    > but still have problems if this coding should put is a UPDATE FORM
    > show me how does your coding fit to this update form?
    > As DW is making there own coding
    >
    >
    > ' append the query string to the redirect URL
    > If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    > If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
    > Request.QueryString <> "") Then
    > MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    > Else
    > MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    > End If
    > End If
    > End If
    >
    >
    > please advise how
    > gr. kisoen
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > "Brandon Taylor" <btbtaylordesign.com> schreef in bericht
    > news:d5olod$1mf$1forums.macromedia.com...
    >> One way you could set the redirect without having to search the
    > querystring
    >> is pass a variable you set yourself for the referring page.
    >>
    >> Example: something.asp?referrer=search
    >>
    >> <%
    >> referrer = request.querystring("referrer")
    >> save = request.querystring("save") = "yes"
    >>
    >> if referrer = "search" then
    >> retrun_val = "search.asp"
    >> elseif referrer = "callsopen" then
    >> return_val = "callsopen.asp"
    >> end if
    >>
    >> if save then
    >> cn.execute "your statement here"
    >> response.redirect(return_val)
    >> end if
    >> %>
    >>
    >> HTH,
    >> bT
    >>
    >> "rajesh" <r.kisoenpersadchello.nl> wrote in message
    >> news:d5okbg$t4t$1forums.macromedia.com...
    >> > hi,
    >> >
    >> > I have several page where you can edit the record
    >> > When you modified the record you suppose to go where you came
    >> >
    >> > for example
    >> > you can update the record from the
    >> > following pages
    >> >
    >> > 1> search.asp
    >> > 2> callsopen.asp
    >> >
    >> > when you update the record from the search.asp
    >> > and you click oke you should redirect to search.asp
    >> >
    >> > when you update the record from the callsopen.asp
    >> > and you click oke you should redirect to callsopen.asp
    >> >
    >> > Soworking with servervariables is very new for me
    >> >
    >> > <%
    >> > Request.ServerVariables("URL") & "?" &
    >> > Request.ServerVariables("QUERY_STRING")
    >> > Response.Redirect("../search.asp" )
    >> > %>
    >> >
    >> > this coding is working fine when you update the record from search.asp
    >> > but how with callsopen.asp
    >> >
    >> > should you use the IF statement here
    >> > something like
    >> >
    >> > <%
    >> > if Request.ServerVariables("URL") = " ../callsopen") then
    >> > Request.ServerVariables("QUERY_STRING")
    >> > Response.Redirect("../callsopen.asp" )
    >> > else
    >> > Response.Redirect("../search.asp" )
    >> >
    >> > end if
    >> > %>
    >> >
    >> > do I have to something like this??
    >> >
    >> > please advise
    >> > Kisoen
    >> >
    >> >
    >> >
    >>
    >>
    >
    >

    Brandon Taylor Guest

Similar Threads

  1. Redirect from App to App
    By Ender.bg in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: October 9th, 10:27 PM
  2. redirect to guest if first redirect is doesnt work for a user
    By istalcup@hotmail.com in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: March 17th, 03:27 PM
  3. redirect?!?!?
    By bethan81 in forum Dreamweaver AppDev
    Replies: 3
    Last Post: March 11th, 07:08 PM
  4. redirect with cgi.pm
    By Jdavis in forum PERL Beginners
    Replies: 10
    Last Post: January 14th, 05:39 PM
  5. Replies: 1
    Last Post: July 1st, 03:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139