Response.Write()

  1. #1

    Response.Write()

    Hi, so this is my problem
    I have a ext:buttom .. and when the buttom is clicked .. I want to open a new window with a page .. but I didnt success .. "Status Code: 200 Status Text:BADRESPONSE: Unexpected token <" , it only works if I use "Response.Redirect" but I need open a nw window, I tried with asp:buttom and it works .. I dont know why ? .. so
    Hopefully you can help me cause I really dont know what is wrong


    <ext:Button ID="Button1" runat="server" Text="Submit">
               <DirectEvents>
                <Click OnEvent="show">
                    
                </Click>
               </DirectEvents>
            </ext:Button>
     protected void show(object sender, DirectEventArgs e) 
        {
            
            //Response.Redirect("http://www.google.com/");
            Response.Write("<script>window.open('http://www.google.com/','_blank');</script>");
            Response.End();
        }
  2. #2
    Hi @rookie,

    The Response should not be commonly used within a DirectEvent.

    Please use:
    X.Js.Call("window.open", "url", "target");
  3. #3

    how to open the window with full screen?

    Quote Originally Posted by Daniil View Post
    Hi @rookie,

    The Response should not be commonly used within a DirectEvent.

    Please use:
    X.Js.Call("window.open", "url", "target");
    The window dose not open with full screen directly. how to open the window with full screen?
  4. #4
    Here you can read about all the options of window.open().
    http://www.w3schools.com/jsref/met_win_open.asp

    Hope you will find a required option.

Similar Threads

  1. Replies: 0
    Last Post: Aug 05, 2012, 10:46 AM
  2. [CLOSED] directEvent and Response.Write issue
    By digitek in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 29, 2011, 9:10 AM
  3. Response.write is not working in ajax event.
    By Nagaraju in forum 1.x Help
    Replies: 1
    Last Post: Oct 17, 2011, 7:06 AM
  4. Response.Write & Bind
    By Dominik in forum 1.x Help
    Replies: 0
    Last Post: Jul 22, 2010, 12:44 PM
  5. Replies: 2
    Last Post: Feb 14, 2009, 2:50 AM

Posting Permissions