Its not a terminal server. But it has Perl Script on it. "perl -v" on cmd brings up this:

This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 631 provided by ActiveState Tool Corp. http://www.ActiveState.com Built 17:16:22 Jan 2 2002

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page.

I have gone through the Client-side PerlScript example:

<html> <head> <title>PerlScript Hello World!</title> </head> <body bgcolor="#ffffff"> <h2>PerlScript Hello world!</h2> <script language="PerlScript"> $window->document->write('Hello world!'); </script> </body> </html>

This works with the below meta tag in the <head> section

<html> <head> <meta http-equiv="X-UA-Compatible" content="IE=8" /> <title>PerlScript Hello World!</title> </head> <body bgcolor="#ffffff"> <h2>PerlScript Hello world!</h2> <script language="PerlScript"> $window->document->write('Hello world!'); </script> </body> </html>

The above code works fine but I am asked not to use meta tag work around. And even after using meta tag, my original code is not working.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>demo of dropdown list using xml element data in PerlScript</ti +tle> </head> <body> <SELECT id="STATE" style="WIDTH: 100px; "> <option value="" selected></option> <SCRIPT language="PerlScript"> use strict; use warnings; use feature 'say'; use XML::XPath; my $xp = XML::XPath->new(filename => 'State.xml'); my $querysshh = '/States/State'; $nodeset = $xp->find($querysshh); foreach $mynode ($nodeset->get_nodelist) { my $statenames = $myNode->getAttribute('Name'); print $statenames; $window->document->write("<option value='".$staten +ames."'>".$statenames."</option>"); } </SCRIPT> </SELECT> </body> </html>

We use IE9 & IE11. So used the below code in the <script> tag

HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlScript\1.0 REG_DWORD: EnabledZones = 0x0010 (default)

Still it did not work. Can you help me to understand the problem with my code better and how to make it work? Thanks!


In reply to Re^4: Perl Script to populate Dropdown box from XML Attributes by vikrammohan
in thread Perl Script to populate Dropdown box from XML Attributes by vikrammohan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.