0
votes
2answers
15 views

Remaining char counter with popup

My task is to create a counter/limiter, which pops a window when the limit is reached. I made this code: $(document).ready(function() { $('#message-input').keyup(updateCounter); }); function ...
-1
votes
4answers
39 views

Javascript function Call. Escape quotes in strings [duplicate]

Alright and my query is, How do I escape quotes in Javascript? I'm trying to alert the message with my code below. I know it won't work because it contains string in double quotes within the onClick ...
0
votes
1answer
25 views

Best way to bind events (with dynamiac data) to elements after ajax load in raw javascript

After html is entered into a container from a ajax response I would like to bind an event to various elements. I know this can be achieved by running addEventListener or on+event=function(){} right ...
0
votes
3answers
31 views

Javascript Text Input Calculator

I am somewhat new to javascript and I'm trying to make a basic calculator that has 3 text inputs, a 1st number text box, an operation textbox, and a second number textbox, but it doesn't print out the ...
0
votes
4answers
36 views

JavaScript - onClick copy text field value to drop down field

I have been researching how to copy a a text field value into a drop down menu and have only been seeing how to accomplish the opposite. Can somebody help me tweak this code so it will copy the ...
0
votes
5answers
51 views

How do i change Background color of textbox when onfocus?

i tried this code but its not working.. when i on-focus textbox it shows error function ChangeBgColor(obj, evt) { if(evt.type=="focus") style.background ...
2
votes
1answer
27 views

addEventListener not working in Chrome

I am following a tutorial on Lynda.com about the new DOM event model. This is the code I am working with. function addEventHandler(oNode, sEvt, fFunc, bCapture){ if (typeof (window.event) != ...
1
vote
2answers
28 views

Bind context when event binding on $(document)

The situation is like this: I have a div which we can get using $('#container') and a child div of this div is ('#tracker'). On tracker I bind a event as: $(document).on('mousemove', '#tarcker', ...
0
votes
1answer
26 views

How to change running site content with javascript?

Assume that, there are many checkboxs in any site and they are unchecked. Site works in any server. I have not site code. I want to make checked some of those checkboxs. To find checkboxes by value of ...
0
votes
0answers
13 views

textarea not shrinking when deleting character

I am trying to use javascript to shrink and grow automatically as the height of the scroll is increasing. The growing the height of textarea i acheived but when i am deleting the texts i can't figure ...
0
votes
0answers
59 views

Can we instantiate Java Objects in Javascript?

I know we can do this via DWR library to work with java objects in Javascript. But I would like to know if we can actually instantiate Java Objects in Javascript, using plain Javascript objects? I ...
0
votes
1answer
42 views

RE: How can I shorten this JS code? [closed]

I'm still having issues with a PictureReplacer[x]; It seems to me the only way I can call up the img is through img[x] var img = new Array("images/flying-car-593.jpg", "images/flyingCar-article.jpg", ...
2
votes
3answers
55 views

how to solve NaN when i deleting number?

This is the code when i am adding in all textbox it works fine but after removing number it shows NaN function sumVal() { var total = 0; var coll = document.getElementsByTagName("input") ...
0
votes
0answers
40 views

Alternative to onblur/onchange in select

I am trying to find a way to run a JavaScript function when a user selects an option in an HTML select box, regardless of whether this option was already selected. So onchange is out of the question. ...
1
vote
1answer
22 views

using jquery to show previous td element

I know this kind of question has been asked 10 billion times.. I've considered them and used what I could. Basically, I have a text field that I want rendered only when a button is clicked. This ...

1 2 3 4 5 428
15 30 50 per page