jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList unreachable code when set a DropDown

This topic contains 4 replies, has 3 voices, and was last updated by  tkuhn 9 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • unreachable code when set a DropDown #76038

    philler
    Participant

    Hi,
    I’m trying to use this library create a simple form for input some data in a database.
    I need a dropdownList for select a category but when I set this object the JS console return me this message.

    SyntaxError: unreachable code after return statement

    I don’t think had any mistake, is exactly write the code of the tutorial.

    var source = [
    			"1 Squadra",
    			"Under 18",
    			"Under 16"
    		];   
    $("#team").jqxDropDownList({ source: source, selectedIndex: 1, width: '200', height: '25'});
    

    It say the error is in jqxlistbox.js, where is my mistake?

    unreachable code when set a DropDown #76055

    Peter Stoev
    Keymaster

    Hi philler,

    Based on your code: http://jsfiddle.net/3r68anLr/. I don’t see anything in the console.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    unreachable code when set a DropDown #78325

    tkuhn
    Participant

    Hi there.

    Same Error for me.
    @Peter Stoev strange, that you can not see the Warings. The Console is full of it.
    It shows 4 Warnings:
    unreachable code after return statement jqx-all.js:7:628102
    unreachable code after return statement jqx-all.js:7:774619
    unreachable code after return statement jqx-all.js:7:1955569
    unreachable code after return statement jqx-all.js:7:2855435

    unreachable code when set a DropDown #78329

    Peter Stoev
    Keymaster

    Hi tkuhn,

    Warnings are not errors and they don’t affect the code’s execution or how the widget works. In addition, they will be shown only when you use certain validation tools in your debugger and will not be present in execution.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    unreachable code when set a DropDown #78348

    tkuhn
    Participant

    I know, but warningsd are warnings because it is not ok. Even if it doesn’t affect the working widget, it effects my development, because it’s throwing a warning. I want my applications clean with no error or warnings, even if they not effect the correct function.

    Torben

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.