in reply to Re^4: Perl CGI redirect
in thread Perl CGI redirect

Thanks for the response. However this adds the client to the end of the URL instead of adding it to place listed as XXXX. I tried to specift $ta, however it fails with the below error my $URL = "http://a.com:8080/bms/healthMonitor.do?method=redirect&operation=BackupHistorySearch&subOperation=GetReport&clientName=XXXX&fromDateStr=$FM&toDateStr=$TM"; Wed Apr 17 15:43:03 2013 n.cgi: Global symbol "$ta" requires explicit package name at ./n.cgi line 42. Wed Apr 17 15:43:03 2013 n.cgi: Execution of ./n.cgi aborted due to compilation errors.

Replies are listed 'Best First'.
Re^6: Perl CGI redirect
by poj (Abbot) on Apr 17, 2013 at 20:31 UTC
    The parameter order should not normally matter but if it does just revise the javascript as follows
    my $JSCRIPT=<<EOF; function clickme(){ var URL = 'http://a.com:8080/bms/healthMonitor.do?method=redirect' + '&operation=BackupHistorySearch' + '&subOperation=GetReport' + '&clientName=' + document.getElementById("ta").value + '&fromDateStr=$FM&toDateStr=$TM' // comment out if or remove when working OK if (confirm(URL)==true) { window.open(URL) }; } EOF
    poj