This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218090 - Showing unused show in description code
Summary: Showing unused show in description code
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 217007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-11 04:13 UTC by alaksundar
Modified: 2012-11-28 10:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alaksundar 2012-09-11 04:13:54 UTC
function do_submit() {
                if (!disallowBlank(document.form1.period, 'Pls. select Period.'))
                    return false;
                if (!disallowBlank(document.form1.mon_yr, 'Pls. select Month / Year.'))
                    return false;
                var mon_yr = getInputValue(document.form1.mon_yr), period = getInputValue(document.form1.period);
                $.getJSON('json_txt.php', { mon_yr: mon_yr, period: period}, function(j) {
                    if (j == 'n') {
                        alert('No record found to generate text file.');
                    } else if (j == 'nc') {
                        if (confirm('Not all employee entry completed. Are you sure to generate text file.')) {
                            document.form1.submit();
                        }
                    } else {
                        document.form1.submit();
                    }
                })
                        .error(function() {
                    alert('Some problem arises. Pls. try again.');
                });
                return false;
            }
Comment 1 Vladimir Riha 2012-09-12 07:40:10 UTC
Please, add some explanation not just source code. It easier to understand...

Anyway, if I understand correctly and this is about variables mon_yr and period, it sounds like a duplicate of issue 217007
Comment 2 Petr Pisl 2012-09-12 08:38:03 UTC
Fixed in the web-main:
http://hg.netbeans.org/web-main/rev/069f3d7ca6f8

Thanks for reporting.
Comment 3 Petr Pisl 2012-09-12 08:43:24 UTC
*** Bug 217007 has been marked as a duplicate of this bug. ***
Comment 4 Quality Engineering 2012-09-13 02:15:38 UTC
Integrated into 'main-golden', will be available in build *201209130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/069f3d7ca6f8
User: Petr Pisl <ppisl@netbeans.org>
Log: #218090 - Showing unused show in description code
Comment 5 Vladimir Riha 2012-09-13 08:00:43 UTC
I'm sorry but still not working with the given sample. The problem seems to be with "mon_yr: mon_yr" if you rename the property of anonymous object literal to e.g.

mon_yr_2: mon_yr,

Then it works. Also please note that in "mon_yr: mon_yr," both identifiers are green, while the value should be black. So probably some context issue?


Product Version         = NetBeans IDE Dev (Build 201209130001) (#be39de5441ae)
Operating System        = Linux version 3.2.0-30-generic-pae running on i386
Java; VM; Vendor        = 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01; Oracle Corporation
Comment 6 Petr Pisl 2012-11-28 10:43:33 UTC
Should be ok now. Fixed.