Here is some text you can copy. You can copy text from anywhere on the page, simply select it and press the Copy to clipboard button. Then you can paste it anywhere you want, in Notepad, Visual Studio or in the textarea below.
<br /><br />
<textarea id="txtArea" cols="60" rows="5">You can also copy text from this textarea. Or you can paste the text here, using the Ctrl+V key combination.
I have a large form. One part of it is a column with selects. All drop-downs initially set to "No". The only other option is "yes". I need to make sure that at least one select is set to "yes". Any number, even all of them can be changed to "yes", but only one is required. I can easily add a rule that requires all the fields of the certain class to have certain type of value, but can't think of a way in js to only have one required. I can easily count number of "yes" values with PHP and prevent submitting on the back end, but would really like to have jquery do it first.
I have a set of input fields that can be dynamically duplicated/cloned or removed and submitted. I'm looking for a ways to configure the form for easy processing without having to loop through each input field inside the divs:
I have multiple fields in a form with the same name. Lets call the fields with the same name "junk_array". My first field of junk_array is a input type=hidden. All the others fields in junk_array that follow are type=text. I can reference this first hidden field in IE with document.form.field.value. In, fact my form works absolutely wonderful in IE 6. However, netscape 4.7 does not recognize my first field in the array as the hidden field. Netscape sees the first visible text field as the first field in the array, subscript 0. What totally and utterly perplexes me, is that, from a previous thread, I can do this and get 9999 back in an alert box in Netscape and IE. So, this proves Netscape doesn't have some evil code that disregards hidden fields. I guess...
I even copied these fields directly below the opening <form> tag in my form and both Netscape and IE see the first hidden field as as subscript 0.
However, my form is much more complicated. I have tables within tables and about 30 other fields. In my form I cannot for the life of me get Netscape to recognize the first hidden field of junk_array to zed as index 0.
Somehow, If I make the first type=hidden fields visible, netscape does work nicely. Why when I toggle type=hidden to type=text does Netscape cooperate. What is happening here? Anyone else have this problem with hidden fields in Netscape? I could post the code to my form but it is big.
There are two input fields in a form, but only one of them is required, they are not required at the same time. Either A or B is required. ( A is required OR B is required). In other words, a user can input data to field A, or he can input data to filed B, but he can not input data to Both A and B at the same time. How to implement this constraint in Jquery form validation?
I have this order form where the customers can change the quantity by intput in a text field.I would like to have the text field changed with select fields, but doing so in the form, the script is not doing anymore.Can anyone have a look and tell me what to change in the scritp to accept select fields in place of the text fields.
I am working on a simple control panel where I have text input fields in which a user can click on a text box and the text will automatically focus and select. I have done this fine. However, when I use the same onclick event for multiple fields, only the last one created works. So, if I were to comment out the password and email field additions, then the userName field would work correctly. If I were to just comment out the email field, password would work correctly but userName would not. And finally, if I have the code as is, userName and password do not function correctly while email does.
I know the id's are the same in this, but I tried changing them and it still seems to make little difference.. I did wonder if I could add something variable to the id's and pass that in the function call, but could not figure it out.... the above gives me autocomplete on two fields, but will only fill one of them...
we use sage crm which has a back end sql database and a web front end which is a combination of html and java script.on a particular screen we have 24 numeric fields, these have names / IDs which are flq_glh1flq_glh2flq_glh3.... and so oni would like to total these 24 fields and display the result in another numeric field called total_glh
I need a dialog box to appear when a person clicks the add to cart link on my site, where they are asked to fill in certain fields, and then click next, still inside this dialog and then move on to the next part to fill in more options, when done, must show in this dialog still, "thank you added to cart successfully". This all using php, ajax, jquery.
A good example of this, is for example: facebook >> add friend >> friend successfully added >> suggest this person to friends. Where a lot of stuff happens, but each time you click, action to php already been executed, even though the dialog is not yet closed. Basically everything that normally happens when you post, but only in a dialog.
I want to be able to add "hints" to fields (text which disappears when you click in a field and then reappears if the field is left empty).I have code which is fine for specific fields one at a time, but I'd like to use a JSON structure to apply to arbitrary fields: Something like [["eventType", "eg Walking"], ["eventName", "eg London Marathon"], ["message", "(Max 100 words)"]] would put "eg Walking" into the field with id="eventType" etc.The following code puts the hints in the correct fields, but only the last one handles the focus/blur properly. It seems that the value of hintText for the comparison to this.value is only the last one.
I want to make a search field for my site where the user can enter his query then select which site he would like to search the query on. Like www.torrents.to has, basically just like that. I know nothing about coding, could somebody write the code for me and tell me where to put my links, directory stuff etc...?
I have a page, that will contain up to a couple hundred different widgets on it, that an individual will be able to browse through and choose the size and quantity of the ones they want. Each widget will have form fields associated with it: "size" (small, medium, large) and "quantity", with a "total cost" field underneath that. As the individual looks through the widgets, choosing the size and quantity of the ones they want, I'd like for the "total cost" field to be updated under each widget. I'd also like a "total order cost" field that sums up all the costs of the widgets they want.
I need the script to basically say: If size = small, then multiply $1 by the quantity. If size = medium, then multiply $2 by the quantity. If size = large, then multiply $3 by the quantity.
I am having a problem with the submit() method that is driving me nuts. I'm using document.form.submit() with large text fields (approx. 2000 characters) and am getting a "Invalid Syntax" error. If I do the same thing with a text field of under 1500 characters, it works fine.
Is there some size limit here that I don't know about?
I've used jQuery's datepicker in the past to choose start/stop dates for a single record. Now I'd like to create a page where I can use the datepicker to choose start/stop dates for multiple records. You can see a stripped down version of my code at [URL]. I have start/stop dates for three records and would like to use the datepicker to let the user change the default date. I currently have an icon next to the start times and if you click on it it pops up a datepicker element for the top record where you can select a date and it'll be posted.