Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
154 views

Generate HTML from input fields

I am building a small tool to generate a copy and paste HTML block, based on the user inputs. In the HTML file, I have all my inputs (select, checkbox, text inputs etc). I based myself on the JS of an ...
blogob's user avatar
  • 101
4 votes
1 answer
569 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 ...
Jefferson's user avatar
  • 413
2 votes
2 answers
465 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 ...
Jefferson's user avatar
  • 413
2 votes
0 answers
195 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
mr_muscle's user avatar
  • 197
2 votes
2 answers
275 views

jQuery redirect form

I'm using jQuery to create a (hidden) form that redirects people to another page using JavaScript. ...
Malekai's user avatar
  • 177
0 votes
1 answer
3k views

On form inputs focus, show div. hide div on blur for multiple inputs and hidden divs

I posted a question on Stack Overflow and got an answer that works but has a lot of duplicated code. In the future, the functionality may also require a third or more divs to be shown or hidden. The ...
user191294's user avatar
1 vote
2 answers
184 views

jQuery code to detect whether form fields have the default value when a checkbox is unchecked

How could I rewrite this jquery code to compact it in a more elegant form: ...
user1286956's user avatar
3 votes
1 answer
78 views

Note Tool - Fill text box with template

I've been working on a note tool for my company to help streamline verifying and noting accounts. I've added in extra features that help with different aspects of the job as well. I'm wondering if ...
Zach Wehrli's user avatar
5 votes
3 answers
3k views

Dynamic country, state select options

Here is code I wrote to dynamically choose between three country options (United States, Canada, Other). After the user selects a country it will show the related select option or an empty input (when ...
Pslice's user avatar
  • 162
0 votes
2 answers
96 views

jQuery function to display an alert when submitting blank fields

I am new to jquery and implemented following function in a js file in case of error- ...
AnalyticsPy's user avatar
2 votes
3 answers
2k views

Using jQuery to set the class of an element corresponding to the selected radio button

I'm a bit of a newb with jQuery but can get it working to perform the functionality that I'm after. The below function checks the value of the radio input and then adds a class, depending on the ...
AFK's user avatar
  • 23
5 votes
4 answers
11k views

JS Function warning before closing browser

I have a function that makes sure the user wants to actually leave the page. I am not a jQuery expert. Is the code below the most efficient way to do this function? Or can it be simplified much more ...
David Brierton's user avatar
3 votes
2 answers
178 views

Changing form display based on selected values

The first part of my code is a datepicker for a "From" and "To", showing the date in MMDDYYYY format in a textbox and having the value in the From field 7 days prior to the current date. Second ...
David Brierton's user avatar
1 vote
1 answer
134 views

Tying the enablement of one checkbox to another using AngularJS and jQuery

I'm new to AngularJS, coming from a jQuery background and I have a situation I've solved but only by including jQuery in an AngularJS function. Something just doesn't feel right doing this and I was ...
BMills's user avatar
  • 231
8 votes
5 answers
7k views

Selecting checkboxes based on URL parameters

Is there any way to reduce these lines of code? ...
Paul's user avatar
  • 83

15 30 50 per page
1
2 3 4 5
7