473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 ..........................


Jul 19 '05 #1
2 7605
ok..thanks..!
"Bob Barrows" <re*******@yahoo.com> wrote in message
news:u7*************@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

Jul 19 '05 #2
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" <re*******@yahoo.com> wrote in message
news:u7*************@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

.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ben | last post by:
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 url without using javascript ? Thanks
2
by: William Gill | last post by:
I am trying to make a simple data editor in Tkinter where each data element has a corresponding Entry widget. I have tried to use the FocusIn/FocusOut events to set a 'hasChanged' flag (if a...
1
by: Matt | last post by:
My problem is when the user click the submit button, it will launch another new window for the request page. I want to confirm we cannot use JavaScript open window functions to open a request page?...
4
by: ...D. | last post by:
OK. I am halfway decent with HTML. Now I want to try javascript for some things that HTML cannot do. I have looked over a tutorial & all. What I want to do is create a button, that when...
29
by: wayne | last post by:
Hey there... I'm having some problems passing url parameters with an open.window command. I'm not terribly familiar with java script but here is the code below. When executed it opens the...
4
by: nuhura01 | last post by:
Hi, I want to create an 'open file button' which will display open file dialog box for users to choose the location of folders to be read. It might be easy for Windows Application, but i want to...
1
by: peerraghu | last post by:
hi i am creating travels project using .net and c# and iam new to java scripts i want to open new window with in the same page after clicking the image i have wreiten code just look at this ...
1
mageswar005
by: mageswar005 | last post by:
Hello, In My Application i have open the PDF file from javascript open.window function.In This scenario i want to control / Hide the PDF Toolbar from open.window function. My Current code is...
1
by: hcoulange | last post by:
I am trying to open a window inside a DIV or a table cell. In the stylesheet I put a #container and a #jx, In my page I have first a div id=container and another DIV call jx the first with position...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.