Skip to content

Tag: input

jQuery append input value to iframe data-src

How can I append an input value to data-src iframe in jQuery. I am doing like the above snippet but the console.log returns only the initial value without the input value that should be appended. Does anyone know a way to do it? Answer You did not update data-src. You updated src attribute.

Condition: input:checked with the same class

I would like to have a little help on an enigma that I have. I have a button that changes according to the number of input:checked but I would like to add a condition which is: select of the checkboxes of the same class. for example can I have 2 or more input. I can’t use attribute name or value.

JavaScript save value of div element

I have a simple text editor and I want to save its content, but it doesn’t work because it is not an input element. It is a div element which has contenteditable=’true’ so I can write inside it. My question is that is there any way to save the characters that the user types in it? I have tri…

<input type="text" assign id value to php string

I have a modal form to write employee working time stamp to an SQL database. I select the employee from a dropdown menù and fill by javascript function the name and surname input box using the id tag. When I submit the form, the datas are written into the db using php. The problem is I’m not able to con…

Insert SubString in a time input type

I have an time calculator which returns an input type of time in the following format: hh/mm/ss It currently displays like this: When I do a calculate function it return “3:0:0” instead and removes the “0”. How can I change this to be 03:00:00? The “0” must only be added if…

Trying to change background color on same valued inputs

I’ve been trying to change the input on a same valued inputs. The input ids are (Input${i} (Input0 , Input1 and etc., iterating them with loop), I have a button which evokes the function, The best I got so far is this: Answer I think you probably want to learn to do something like: You’ll notice t…