2610 1
How to get lat/long using Google address autocompete api using Javascript or jQuery?

I am currently using Google's address autocomplete api to get the locations (address) as shown in example here

https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

Now I would like to get only Latitude and longitude of address, when user selects the address.

How can I do this using Javascript or jQuery?

...
Type
Question
2245 1
How do Add class using Javascript?

I wanted to add or remove classes from my HTML <div> dynamically using Javascript, I don't want to use jQuery here, so How can I add a class using JS?

If possible, I would also like to know how can I toggle class in Javascript

...
Type
Question
15261 2
How to remove square brackets from string using javascript?

Hello, I am working a javascript function, in which I want to remove square brackets from string suppose if string it "[test]", then after removing square brackets I should get "test" only.

How can I do this using Javascript and regex, or without regex?

...
Type
Question
6903 2
How to implement validation for input type file using jQuery or javascript?

Hello, I have a HTML form inside which there is <input type="file" /> field, and now before posting form to the server side, I need to validate/check if file field is empty or not, I want user to upload atleast one image file in this field, so how I can implement validation message for <input type ="file" /> field in the form using jQuery or javascript code?

Sample HTML Form

...
Type
Question
2956 2
How to get response data from XMLHttpRequest?

I was trying to get location by calling google maps API using javascript and wanted to know how to get response text/data after request is successfully sent.

Here is my javascript code:

...
Type
Question

6393 2
How to do javascript file upload?

Hello, I am working on a web-application in which I would to upload file using javascript, as soon as someone select's the file using HTML file input, so what should be the code for uploading file using javascript?

Although I need only front-end code/tutorial link etc, but if possible i would like to know C# code to get it in MVC Controller also, thanks.

...
Type
Question
35287 4
How to remove quotation marks (double quotes) from string using jQuery or Javascript?

I am working on a web-application which returns JSON results as "/FileURL", I just need to get /FileURL as a result, means I need to remove quotation marks (double quotes) from returned JSON string using jQuery or Javascript, how can I do that?

...
Type
Question
2094 2
How to clone object in JavaScript?

I was trying to copy/clone the object and edit the new one but whenever I change edit NewObject, olderObject also get's changed, suppose here is my Object

...
Type
Question
8752 3
Datetime Format Regex (MM/dd/yyyy) Javascript

I want to validate the date format on every keypress/keyup that the user's typed.

I've researched for what i'm trying to achieve. And I've found the solution here:

https://stackoverflow.com/questions/36009414/regex-to-validate-date-yyyy-mm-dd-while-typing-on-keyup 

(i was referring to @bobble bubble's answered)

but the format was YYYY-mm-dd. So, I tried to reverse to the format i was looking for to (MM/dd/yyyy).

But i cant get throught with validating every press that the user's typed. What happend was its validate as whole(regex) not one by one.

I also read his explanation about non-capturing group. But still, i can't get it.

 

Happy Coding!

...
Type
Question
2372 1
What's the difference between let and var in JavaScript?

Hello, as I am not very well versed with javascript, I would like to know the difference between let and var keyword of javascript?(With example if possible)

Or Any reference link with proper details will also work, thanks

...
Type
Question

Page 9 of 13