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

M

monika

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: said:
<%=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 ..........................
 
K

karim dahdah

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

Best Regards,

Karim Dahdah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top