My perl file :
$q->div( { -class => "text" }, "Folder Name : ", #my $defaultVal ='0'; $q->popup_menu( -name=>'foldernameval', -id=> 'folder_name_id', -onchange => 'getReportName()', -type=>'dropdown', -values=> \%folderhash, #-default=>$defaultVal, -default=>['0'], ), $q->hidden( -name => ('folder_name', -id=> 'h_folder_name_id', -va +lue => '' )), #q->a( { -href => "javascript:void(0)", -onClick => 'setFolderName +Id()', -title => "Populate Report Name" }, "Populate Report Name" ), #$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 => 'getReportName()', -type=>'dropdown', -values=> \%reportHash, -default=>['0'], ), $q->hidden( -name => ('report_name', -id=> 'h_report_name_id', -va +lue => '' )), #$q->a( { -href => "signoff.cgi?rm=view_report&fId=\'$fId\'", -onC +lick => 'setFolderNameId()', -title => "Populate Report Name" }, "Po +pulate Report Name" ), $q->a( { -href => "signoff.cgi?rm=view_report&flag=1&fId='$fId'", +-onClick => 'setFolderNameId()', -title => "Populate Report Name" }, + "Populate Report Name" ), #$q->a( { -href => "signoff.cgi?rm=view_report&fId=$fId", -title +=> "Populate Report Name" }, "Populate Report Name" ), ),$q->end_div, $q->br, $q->br,
my Java script method :
function getReportName(){ var folder_name_id = document.getElementById('folder_name_id') +.value; alert('FOLDER NAME :'+folder_name_id); #document.getElementById('h_folder_name_id').value=folder_name +_id; perlExecute(folderId); } function perlExecute(url){ alert('PERLEXECUTE METHOD GET CALLED AND FOLDER NAME ID :'+url); function perlExecute(url){ $.ajax({ url: '/signOffPageOnDev/js/reportList.pm', type: 'get', data: { 'id' : '1234' } }); }; };
Issue , from above Ajax method , my perl file is not getting invoked. this is biggest issue

2023-03-11 Athanasius added code tags.


In reply to Re^3: how to make dependent drop down in perl script 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.