Solved

Please convert this to JSP

Posted on 2003-12-08
10
286 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

With more and more people tethered to the internet, advertisers can reach you in new and creative ways. Push notifications on your smartphone, customized advertisements based on your previous searches, and email inboxes filled with promotional pitch…
Note: This is the third blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   We’ve been talki…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 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

22 Experts available now in Live!

Get 1:1 Help Now