Solved

Please convert this to JSP

Posted on 2003-12-08
10
291 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
Industry Leaders: 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Why do some people recommend buying business VoIP from an ISP? What are the benefits to my company? What are the costs?
This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

622 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