I am trying to make a call to api which returns json object
{ "category" : [ { "id" : 5,
"name" : "Bollywood"
},
{ "id" : 484,
"name" : "International"
},
{ "id" : 15,
"name" : "Devotional"
}
]}
- How do I make a call from within my html page javascript.
Please note: I cannot use jquery, simple javascript is needed..
How do I make a call from within my html page javascript… Um… what API is this? If it’s javascript… why don’t you just call the function…
Why don’t you use javascript
document.createElement("select")andgetAttribute()andsetAttribute()https://developer.mozilla.org/en/DOM/document.createElement http://www.w3schools.com/jsref/met_element_getattribute.asp
Alternatively you could just create the code with javascript as a string and set
.innerHTMLof some element (like a div)setAttribute('onchange', "some_function_name")or somethingI haven’t give you a very detailed response because you haven’t given a very good quesiton