Solved

Please convert this to JSP

Posted on 2003-12-08
10
290 Views
Last Modified: 2010-04-01
Hi All,

Could someone please convert the following VBScript/ASP code to JavaScript/JSP:
<%

...

<script language=vbscript>
Sub SendToWord
      dim Obj , tObj , st2
      set tObj = createobject("Word.Application")
      tObj.Visible = True
      Set Obj = tObj.WordBasic
      st2 = document.all.item("wordtext").innerTEXT
      Obj.FileNew
      Obj.appmaximize 1
      'obj.centerpara
      obj.fontsize 8
      obj.font  "Courier New"
      obj.insert st2
      obj.font "Courier New"
End Sub
</script>


<script language=vbscript>
            call SendToWord()
</script>

...

%>

TIA
DoughBoy
0
Comment
Question by:DoughBoy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 14

Expert Comment

by:kennethxu
ID: 9900221
This is going to be a project :-)
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9900239
hold on, a closer look seems this is client side vbscript. jsp is server side programming. you cannot convert this kid of vbscript to jsp. but you can still use it in jsp page, isn't it? what's your problem?
0
 

Author Comment

by:DoughBoy
ID: 9901699
well, my goal is to have a jsp page open MS Word and send some text to it.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DoughBoy
ID: 9901712
Maybe Microsoft really does have better tools and languages than the others?
(ASP)
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9901747
>> well, my goal is to have a jsp page open MS Word and send some text to it.
this is client side thing, it is nothing to do with jsp. your vbscript should continue to work as long as you convert rest of asp to the jsp.
0
 

Author Comment

by:DoughBoy
ID: 9904695
Can VBScript be rendered from a Linux Server?
How would the code look if it was converted to JavaScript?
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 100 total points
ID: 9905140
vbscript and javascript are all client side language. the server is not going to render anything, it simple send then to browser as is.

the diff is only IE support vbscript, no other browser does. in terms of the converting vbscript to javascrip, you'll have much better luck in javascript forum.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9905208
there is another alternative, you can create a word doc at server side and send the word doc to client using poi:
http://jakarta.apache.org/poi/hwpf/
0
 

Author Comment

by:DoughBoy
ID: 9913754
thanks for your help.
Merry Christmas
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9913791
thanks for the A grade and Merry Christmas to you too.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jersey maven project error 7 152
org.apache.jasper.JasperException: using jstl in jsp embedded jetty 13 749
servlet example 17 73
login form jsp example 2 73
Invest in your employees with these five simple steps to improve employee engagement and retention.
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question