Bear Bibeault

Sheriff
+ Follow
since Jan 10, 2002
Merit badge: grant badges
Forum Moderator
Bear Bibeault currently moderates these forums:
Biography
Author of:
Secrets of the JavaScript Ninja, 1st and 2nd editions,
jQuery in Action, 1st, 2nd and 3rd editions,
Ajax in Practice, and
Prototype and Scriptaculous in Action
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Bear Bibeault

I would place both elements in the same div, and use flex to control the side-by-side layout.
Because div 3 has a display rule of "block".

Investigate flex for the best way to position side-by-side elements.
What code editor are you using? An editor such as VS Code or WebStorm should point out where the unbalanced parentheses are.
That would typically be due to an unclosed parentheses pair, but I'm not seeing such in the code you posted. Are you sure the error is coming from this code fragment?

Some unrelated comments:
  • If rmaNum is a string, you should be using !== vs !=
  • Any reason you're not using modern ES6 notation? Unless you're supporting very VERY old browsers (e.g. IE) your code can be simplified and compacted by using arrow functions and template literals.
  • You can view your local storage in DevTools to see if your set to local storage is working and the value is what you expect. If not, debug how you are setting the value. If so, then it's your local storage fetch that's the issue.

    Be aware that all local storage is stored as strings; so if you are trying to store complex structures they need to be serialized. JSON is the usually technique for that.
    DropBox may be an option.
    10 months ago
    Use the debugger or console.log to see what each factor in your conditional expressions equates to individually. Make sure that they are all as you expect.

    Also, prefer !== and === in comparisons. That way you get xact comparisons without coersions.
    Because you want to return data, not a view, you would not use ModelAndView, you'd return an appropriate ResponseEntity, and mark the controller with @RestController.
    1 year ago
    Two things:

    1. When using regular expressions, it's best to use RE literals versus strings when you can. That way you get syntax checking, and avoid string escaping woes.

    2. \s

    So:
    Then you would use <c:forEach> to iterate over your data.
    1 year ago
    JSP
    That depends on what tag library you are using. It will likely have tags for looping over a list or array of data.
    I revised my post. You'd need to loop through your list and create an option element for each choice.
    Your HTML for the select element should contain only options elements, and optionally optgroup and hr elements.