want to open a new window on button click!-jscript or javasript

Ask a Question related to ASP, Design and Development.

  1. #1

    Default want to open a new window on button click!-jscript or javasript

    Hi all...

    I am able to select a student's story and open it in a word doc. the
    teacher then corrects the story, highlight in colors the comments,
    strikethrough. In fact all the privileges I wanted as an editor can be
    achieved. This word doc gets opened in a new window ... the best part

    now I have 2 buttons on a page. One which would open a separate window to a
    word doc and another I want it to open in another asp page. since I have
    given -> target="new_window"
    in form tag so right now both the buttons open to a new window of word file:
    <form action="word_create.asp" target="new_window">

    how can I make the other button open another window. do I have to use
    on_click() event and use jscript? vbscript works only 4 IE so I have to use
    jscript...

    I don't want to use JavaScript.... as I have to run the website on a machine
    which is MS based (or is this irrelevant?)

    can anyone help me how to use the on_click event to open another window?
    here is my code..
    <html>
    <head><title>Create a word document</title></head>
    <body>
    <center>
    <font color="#800080" size="4"><b>
    Create a word document</b></font>
    </center>
    <p>
    <center>
    </p>
    <table>
    <form action="word_create.asp" target="new_window">
    <%
    Dim strSelectValues
    Dim strSelectedText1
    Dim strSelectedText2
    DIM RSA
    DIM QUERY1

    strSelectValues = Trim(Request.form("RR"))
    'FOR DEBUG ONLY
    'Response.Write "ds-->" & strSelectValues & "<--<hr>"

    strSelectedText1 = Split(strSelectValues, ";")(0)
    strSelectedText2 = Split(strSelectValues, ";")(1)
    'FOR DEBUG ONLY
    'Response.Write "one-->" & strSelectedText1 & "<--<hr>"
    'Response.Write "two-->" & strSelectedText2 & "<--<hr>"

    Set RSA = Server.CreateObject("ADODB.Recordset")
    QUERY1 = "select story_original from student_content where student_id =
    '"&strSelectedText2&"' and story_id = '"&strSelectedText1&"'"
    rsa.open query1, "dsn=school"
    response.write "mm"
    %>

    <tr>
    <td><font color="#000080" size="3"><b>Name:</b></font> </td>
    <td><input type="text" name="Name" size="50" maxlength="100"></td>
    </tr>
    <tr>
    <td><font color="#000080" size="3"><b>Email:</b></font> </td>
    <td><input type="text" name="Email" size="50" maxlength="100"></td>
    </tr>
    <tr><td>
    <font color="#000080" size="3"><b>
    Comments:</b></font> </td><td>
    <textarea cols="50" rows="10" name="comments"
    ><%=RSA.Fields.item("story_original").value %></textarea></td>
    </tr>
    </table>
    </center>
    <p align="center">
    <input type="submit" value="Check Story">
    <input type="submit" value="Grade Student">
    </form><p align="left"> </p>
    </body>
    </html>

    thanks all ..........................




    monika Guest

  2. Similar Questions and Discussions

    1. Open window on button click
      Hi there, in a form, here's what I want to do : <input type=button onclick= (???) is it possible to open a pop-up window with a specified...
    2. Click thumbnails, open in new window
      I apologize, because I know this has probably been asked before but I still need a bit of a push. :( I'm making an e-portfolio in Director MX. It...
    3. Server control button click: open pop up browser window
      Checkout ... ShowModalDialog in the javascript reference. It works quite will if you want to use client side javascript. "Alvin Bruney"...
    4. Button click on Web Dialog opens its copy in new window
      I have an aspx page which I open using the following code fragment below. The modal web dialog has 2 buttons and whenever I click any of them, a new...
    5. Close a window after button click
      The user clicks a buuton and the server does some processing. If successful I want to close the window. Any suggestions? Steve
  3. #2

    Default Re: want to open a new window on button click!-jscript or javasript

    ok..thanks..!
    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:u7BPPOvcDHA.736@TK2MSFTNGP09.phx.gbl...
    > You're asking in the wrong place. This is an ASP newsgroup, which means it
    > is intended for questions concerning server-side code running under ASP.
    >
    > You are asking how to do something with client-side code. You should
    direct
    > your question to one of the dhtml or scripting newsgroups, preferably one
    > with "jscript" in its title.
    >
    > Bob Barrows
    >
    >

    monika Guest

  4. #3

    Default Re: want to open a new window on button click!-jscript or javasript

    Normally of you gave the target-parameter the
    value "_blank", the script will always open a
    new window.

    Best Regards,

    Karim Dahdah




    >-----Original Message-----
    >ok..thanks..!
    >"Bob Barrows" <reb_01501@yahoo.com> wrote in message
    >news:u7BPPOvcDHA.736@TK2MSFTNGP09.phx.gbl...
    >> You're asking in the wrong place. This is an ASP
    newsgroup, which means it
    >> is intended for questions concerning server-side code
    running under ASP.
    >>
    >> You are asking how to do something with client-side
    code. You should
    >direct
    >> your question to one of the dhtml or scripting
    newsgroups, preferably one
    >> with "jscript" in its title.
    >>
    >> Bob Barrows
    >>
    >>
    >
    >
    >.
    >
    karim dahdah Guest

Posting Permissions

  • You may not post new threads
  • You may 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