All Questions
79
questions
4
votes
3
answers
165
views
Get the contents of a table cell for all selected rows
I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string.
I got it to work with the following code, but I'm ...
4
votes
1
answer
538
views
Setting all hidden fields based on id
I am working on a web page where there is a checkbox with a value and a hidden field. I want to ask your opinion on whether this logic is sound.
My logic
The checkbox has a value that matches the id ...
3
votes
1
answer
369
views
Javascript array from IP address
I want to make this code better. It works now but I think it can be better. I have a working sample on jsfiddle.
When the page loads I have the End IP Address disable until the data is entered. Then I ...
3
votes
1
answer
168
views
Submitting form jQuery checkboxlist
In my requestForm submit function I have this logic that checks three checkboxes and then displays the label with an error message. Is there better logic? I would be happy for any kind of feedback ...
2
votes
2
answers
454
views
jQuery form.find radio class
In my application we have four inputs that are radio controls and the first radio control is checked by default. When the user selects another radio control and then saves the form I want to get the ...
3
votes
1
answer
73
views
eCommerce Mock App
This is a follow-up question to eCommerce Mockup App in JS.
How do I implement the 'observe' pattern for the cart to regenerate html? So that, it will keep refresh its own. And any review on my coding ...
3
votes
1
answer
313
views
Javascript Slider that controls TinySlider - feels inefficient [closed]
I feel like the main point of inefficiency is how I create "notches" and must loop through all of the created notches every time the value for the slider is changed.
...
7
votes
2
answers
253
views
eCommerce Mockup App in JS
I have completed this mockup eCommerce app using Javascript. This version can add products into a shopping cart and automatically calculate the order summary in the shopping cart. It can also delete ...
5
votes
2
answers
338
views
Crystals Collector game with four clickable buttons
I'm a few weeks into javascript and had to make a simple "crystals collector" app. The app works as intended, but the code is obtuse and repetitive.
I'd like to make the app work using just one on ...
2
votes
1
answer
131
views
Toggling a class in JS
I'm toggling the class of an element with this code but I'm pretty sure it can be written more efficiently.
...
4
votes
1
answer
200
views
Whitelist for textarea and save input to file
I'm working with product codes, so a user can only scan these type of product codes into a textarea element.
I don't know if my code is written the best way possible, or has good performance.
I'm ...
3
votes
2
answers
933
views
jQuery dynamic toggle class function
I wrote this function that will toggle a class of a targeted element. Applying the class js_class_toggle to any element will trigger the function when clicking on ...
0
votes
1
answer
90
views
Updating values in a database
I'm using standard jQuery Ajax to update values in the database and reflect the result in an output. This repetition seems like bad practice and I don't know enough about jQuery to consolidate this ...
2
votes
3
answers
4k
views
2
votes
2
answers
180
views
Simple menu with descriptions
If one menu-item is clicked then the description with the same data-filter attribute should be shown.
I added a class to the description elements to associate each one with the affiliated menu item.
...