473,624 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_win dow"
in form tag so right now both the buttons open to a new window of word file:
<form action="word_cr eate.asp" target="new_win dow">

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>Cr eate 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_cr eate.asp" target="new_win dow">
<%
Dim strSelectValues
Dim strSelectedText 1
Dim strSelectedText 2
DIM RSA
DIM QUERY1

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

strSelectedText 1 = Split(strSelect Values, ";")(0)
strSelectedText 2 = Split(strSelect Values, ";")(1)
'FOR DEBUG ONLY
'Response.Write "one-->" & strSelectedText 1 & "<--<hr>"
'Response.Write "two-->" & strSelectedText 2 & "<--<hr>"

Set RSA = Server.CreateOb ject("ADODB.Rec ordset")
QUERY1 = "select story_original from student_content where student_id =
'"&strSelectedT ext2&"' and story_id = '"&strSelectedT ext1&"'"
rsa.open query1, "dsn=school "
response.write "mm"
%>

<tr>
<td><font color="#000080" size="3"><b>Nam e:</b></font> </td>
<td><input type="text" name="Name" size="50" maxlength="100" ></td>
</tr>
<tr>
<td><font color="#000080" size="3"><b>Ema il:</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_ori ginal").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 7625
ok..thanks..!
"Bob Barrows" <re*******@yaho o.com> wrote in message
news:u7******** *****@TK2MSFTNG P09.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*******@yaho o.com> wrote in message
news:u7******* ******@TK2MSFTN GP09.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
13234
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
4323
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 record has not changed, the db doesn’t need updating). This seems to work fine except that when the user finishes and clicks a ‘done’ button or the close window button (in the root widget) no FocusOut event is triggered. I can trigger a FocusOut...
1
3339
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? The following page2.asp won't output the value entered in page1.asp. However, if we do <form action="page2.asp" method="get" target="_blank">, then it will open a new window for the request page, instead of using the same window as page1.asp....
4
2201
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 pressed, closes the window it is in, and launches a URL. The window the button is in is actually just a sub-page of the main website page, launched with target="blank", but I just do not want to close the window as I said, I want to launch a website...
29
4994
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 window properly but does not pass the parameter. (this is part of a coldfusion template) <a href="##"
4
1693
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 do it from web application. Can someone provide me any examples of code or suggestions to solve it? Thank you.
1
1690
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 <script language=javascript> function open_win(url_add) { window.open(url_add,'','width=800,height=650' }
1
7362
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 given below function poponload(strs) { var path="d:/files/hello.pdf"; testwindow= window.open (""+path+"", "mywindow","location=0,status=0,scrollbars=1,toolbar=no,resizable=yes,width=500,height=500"); testwindow.moveTo(0,0);
1
2451
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 relative the second with position absolute so the second is placed under the container. I want to put my javascript open.window using top left height width according to the user's screen measurements. I use percentage so it is relative easy to...
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.