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 232406 - Expected , but found : in <script> inside HTML/PHP
Summary: Expected , but found : in <script> inside HTML/PHP
Status: CLOSED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-08 20:22 UTC by kaha6uc
Modified: 2013-07-09 11:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
editor screen shot with code (42.81 KB, image/png)
2013-07-08 20:22 UTC, kaha6uc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaha6uc 2013-07-08 20:22:16 UTC
Created attachment 136838 [details]
editor screen shot with code

Product Version: NetBeans IDE 7.3.1 (Build 201306052037)
Java: 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_13-b20
System: Linux version 3.10.0-debian-b9 running on amd64; UTF-8; en_GB (nb)

Hi All,
First I want to say a big "THANK YOU" for Netbeans - it's been my pal for years now.

Here's a curious thing.

I'am using Netbeans 7.3.1 - just downloaded and installed, as I saw the issue on 7.3 and people here said that it should be fixed in latest version. Well, it's not :) It's about a JavaScript code in a HTML/PHP file.

The code is:

<script type="text/javascript"><!--
	$(document).ready(function() {
		$('#calendar').fullCalendar({
			<?=lang_fullcalendar($langauge_selcted); ?>
		  height: 530,
			theme: true,
			firstDay: 1,
			month:<?=(date('n', strtotime($_SESSION['sv_mcheckindate'])) - 1); ?>,
			events: "json-events.php?roomtype_id=<?=$_GET['rtype']?>&capacity_id=<?=$_GET['cid']?>",
			eventDrop:function(event, delta){
				alert(event.title + ' was moved ' + delta + ' days');
			},
			loading:function(bb){
				if(bb) $('#loading').show();
				else $('#loading').hide();
			}
		});
	});
//--></script>

(You'll see the full code in the attachment)

The error is at the line saying "loading:function(bb){" and says

"Expected , but found :"

The second error, accordingly is "Expected eof but found }" - it seems Netbeans gets confused in errors, eh? :)

I tried already changing "loading" to something else for the sake of "reserved words" or something. I tested for non-printable characters. I tried full parentheses encapsulation of the "loading" function. All to no avail.

The code works fine, by the way, in all browsers I've tested.

Thanks!
Comment 1 Vladimir Riha 2013-07-09 06:45:45 UTC
I tried it in Dev build (you can download it from [1]) and it works there. No error is displayed. 

Thank you for reporting.


[1] http://bits.netbeans.org/netbeans/trunk/nightly/latest/


Product Version: NetBeans IDE Dev (Build 201307082300)
Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 2 kaha6uc 2013-07-09 08:36:39 UTC
So it will be fixed in 7.4 :)

Thank you very, very much!
Comment 3 Petr Pisl 2013-07-09 11:25:42 UTC
Yes, it's already fixed in NB 7.4 code.
Comment 4 kaha6uc 2013-07-09 11:36:21 UTC
Thanks a hell. Keep up the good work there!

Best regards,
Closing.