Book a Demo

Author Topic: InputBox function for Jscript ?  (Read 3944 times)

M3SYSTEMS

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
InputBox function for Jscript ?
« on: November 13, 2012, 09:58:03 pm »
Hi all,

I use a EA Jscript to generate RTF documents.
I would like to add to this script an "inputbox" (as the VB InputBox function) for opening an user dialog box aiming at setting a list of parameters.
Does anyone have a JScript example?
Thanks!

OG

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: InputBox function for Jscript ?
« Reply #1 on: November 14, 2012, 01:03:13 am »
I've seen this question (and the answer) come by a couple of times in the past.

Try searching the forum using the top left search button. (and mind the options)

Geert

M3SYSTEMS

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: InputBox function for Jscript ?
« Reply #2 on: November 14, 2012, 01:39:34 am »
YES!  :)

I found the solution by using the search window & options.

Thanks a lot for your advice.

OG

///////////////////////////////
function InputBox(varname,title) {
     var vb = new ActiveXObject('ScriptControl');
     vb.Language = 'VBScript';
     return vb.eval("InputBox(\"" + varname + "\", \"" + title + "\")");
}