Solved

Please convert this to JSP

Posted on 2003-12-08
10
285 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
  • 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
 

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now