Please find the below code :
my %folderMapFinal; #print $q->header; #print "Content-type: text/plain\n\n"; print "Content-type: text/html\n\n"; foreach my $folderMap (sort keys %folderhash) { %folderMapFinal =$folderMap; printf "%-8s %s\n\n", $folderMap, $folderhash{$folderMap}; } $q->div( { -class => "text" }, "Folder Name* : ", #my $defaultVal ='0', $q->popup_menu( -name=>'foldernameval', -id=> 'folder_name_id', -onChange => 'getReportName()', -type=>'dropdown', #-values=> \%folderhash, -values=> \%folderMapFinal, #-default=>$defaultVal, -default=>['0'], ), $q->hidden( -name => ('folder_name', -id=> 'h_folder_name_id', -va +lue => '' )), #$q->a( { -href => "signoff.cgi?rm=view_report&fId=3", -onClick => + 'setFolderNameId()', -title => "Populate Report Name" }, "Populate +Report Name" ), ),$q->end_div, $q->br, $q->br, $q->div( { -class => "text" }, "Report Name* : ", $q->popup_menu( -name=>'reportnameval', -id=> 'report_name_id', -onchange => 'setReportId()', -type=>'dropdown', -values=> \%reportHash, -default=>['0'], ), $q->hidden( -name => ('report_name', -id=> 'h_report_name_id', -va +lue => '' )), #$q->a( { -href => " ", -onClick => 'setFolderNameIdInURL()', -ti +tle => "Populate Report Name" }, " Click here to Populate Report Name +" ), ),$q->end_div,

In reply to Re^5: how to make dependent drop down in perl script (missing header) by Anonymous Monk
in thread how to make dependent drop down in perl script by Anonymous Monk

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.