Response.Redirect when using frames

Results 1 to 4 of 4

Thread: Response.Redirect when using frames

  1. #1
    endymion Guest

    Default Response.Redirect when using frames

    I have a web page that uses two frames in a split-screen configuration .. top and bottom frames. In the bottom frame I have a Delete Button (submit-type) among others, that when pressed will delete a record from the DB using a stored procedure. Upon button press, the form is submitted to itself and the function below is processed. Since the delete button was pressed, the code gets executed.<BR><BR>Snippet of ASP code looks like this ...<BR>&#060;%<BR>Response.Buffer = True;<BR>/* server-side recordset */<BR>var delete_mod_sp = new Command("delete_mod_sp","zzz","zzz","zzz","DELETE_ MOD",false,0,0,"ID_IN","-1");<BR>delete_mod_sp_BeforeOpen();<BR>delete_mod_ sp_Server();<BR>...<BR>function delete_mod_sp_Server() {<BR> if (String(Request("Delete_Button")) != "undefined") {<BR> delete_mod_sp.Execute();<BR> Response.Clear();<BR> Response.Redirect( "Home.asp" );<BR> Response.End;<BR> }<BR> }<BR>%&#062;<BR>Is it possible to use (Response.Redirect url) to redirect the user from say the bottom frame to the full-window home page? Currently, all I&#039ve been able to do is redirect the Home page into the bottom frame, not the entire window. If not, does anybody know how else to accomplish this?<BR>

  2. #2
    michal m Guest

    Default RE: Response.Redirect when using frames

    hi endymion ,<BR>I don&#039t know how to redirect in asp from the bottom frame to the parent frame. However, you could set the TARGET attribute of your form to the parent frame. If this is the same form you use for other things and you don&#039t _always_ need to submit to the parent frame you could use javascript to modify the target only when the user clicks the delete button.<BR>Hope this helps,<BR>Michal M

  3. #3
    endymion Guest

    Default RE: Response.Redirect when using frames

    I love this site ... answers, answers, answers.<BR><BR>Your suggestion worked like a charm, all I did was change the form target when the delete button is clicked .. when the form gets submitted to itself, it&#039s new target is "_top" and then when the Response.Redirect code processes, Viola!<BR><BR>Here&#039s the additional code ...<BR><BR>&#060;FORM NAME="Form1" METHOD="Post" ACTION="Home.asp" TARGET="_self"&#062;<BR>...<BR>&#060;INPUT TYPE=Submit ID="DBStyleDeleteButton" NAME="Delete_Button" value="Delete MOD Record" onClick="; return _Delete_Button__onClick()" Class="GCPRButton" tabIndex="0"&#062;<BR><BR>Thanks - ENDYMION<BR>

  4. #4
    Join Date
    Dec 1969

    Default cool :) (nm)

    no message

Posting Permissions

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