What is the correct way to convert ASP.NET SOAP-based web services to JSON-based responses? ...And then call these from jQuery?  What are "best practices" when integrating jQuery based AJAX and ASP.NET? Articles? Books?...
The setup: I have a div with a bunch of radio buttons, each of which has been associated with a custom attribute and value using $(element).data(attr_name,attr_value);. When an underlying data structure is changed, I iterate over the fields and set t...
i have an html page displaying an image. it is supposed to delay, change to the video, then after the video plays, change back to the image. this is the javascript i am using:  <script type="text/javascript"> function playVideo(){ var s...
I am trying to find the position of the selected text in a div. I prompt the user to select a substring of the text in a div and then submit it. I need the index of the start point and end point and have not been successful using the strategy below....
I have tried many ways to have the page title automatically update every 3 seconds so the title can display how many unread messages they have.  Here is what I have tried:  setInterval(function() {         document.title = "<?php echo $inboxcc...
How would you use jquery to get the element at a particular x, y coordinate? You can .offset and .position to find absolute and relative position using jquery....
I'm trying to get the response headers from an ajax request but jQuery's getAllResponseHeaders  xhr method only displays the "Content-Type" header. Anyone know why?  This is the response header Access-Control-Allow-Credentials:true Ac...
Similar scenario as Meteor dynamically filter dropdown when another dropdown is selected : I'm able to populate the items in select #2 depending on select #1.  But I cannot programmatically set a specific option of select #2 to selected - at leas...
I have come across several methods for handling click events in jquery:  bind:  $('#mydiv').bind('click', function() {     ... });   click:  $('#mydiv').click(function() {    ... }   on:  $('mydiv').on('click',...
I try writing the following lines in the console one by one  let x = y //throws error "Uncaught ReferenceError: y is not defined" console.log(x) //throws error "ReferenceError: x is not defined" let x = 3; //gives error "Uncaugh...
I'm trying to plot out GPS data that is given to me in Hour Minute Second degree format. Will GLatLng take it in this form or do I need to convert it first. Having a hard time finding anything on the internet about this. If it can take it in this...
I have add this code to functions.php but startwordpress_scripts() function didn't run.  function startwordpress_scripts() {     wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '...
Below is some code I'm having trouble with.  Basically, I'm defining an empty array as a global variable (var playlist = []) and then trying to add elements to it within a jQuery $.get call.  From what I've read on the internet, I should...
I have a web page. When this web page is loaded, I want to execute some JavaScript. This JavaScript uses JQuery. However, it appears that when the page is loaded, the jQuery library has not been fully loaded. Because of this, my JavaScript does not e...
How to write this JavaScript code without eval?  var typeOfString = eval("typeof " + that.modules[modName].varName); if (typeOfString !== "undefined") {   doSomething(); }   The point is that the name of the var that I want to check f...
I have a form in Angular that has two buttons tags in it. One button submits the form on ng-click. The other button is purely for navigation using ng-click. However, when this second button is clicked, AngularJS is causing a page refresh which trig...
For some reason it looks like constructor delegation doesn't work in the following snippet:  function NotImplementedError() {    Error.apply(this, arguments);  } NotImplementedError.prototype = new Error();  var nie = new NotImplementedError(&#...
I'm trying to use the Atom electron to write a Desktop App for both Mac and Windows.  What I need here is :  A button.  And when the user click the button it runs the following shell (or python script):  ping x.x.x.x   And the result will be disp...
I'm using nvd3 to plot some series and want to add some arbitrary rectangles to the plot. How can I access the underlying x- and y-scale for the d3 plot so I can transform my rectangles' coordinates into the svg pixel coordinates so that are...
I have created a frameset, in which one of its frames open a pop-up using window.open . In that window opened i have a form to collect input from users. Input which i'm trying to return to the parent but failing to. Any help. I tried using window...
I have a container that has a % width and height, so it scales depending on external factors. I would like the font inside the container to be a constant size relative to the size of containers. Is there any good way to do this using CSS? The font-...
Example:  <vue-select    class="vue-select1"    name="select1"   :options="options1"    :model.sync="result1" ></vue-select>   What is the meaning the colon in front of :options and :model.sync here? I'...
I have a page with 2 links on it. The page URL is example.com/all  Now the 2 links on the page, one goes to example.com/all/list and the other to example.com/all/map  What I want is when the user lands on example.com/all, class for the href link need...
What is an easy way to remove the querystring from a Path in Javascript? I have seen a plugin for Jquery that uses window.location.search. I can not do that: The URL in my case is a variable that is set from AJAX.  var testURL = '/Products/List...
The question sort of says it all - is there a function which does the same as the JavaScript function setTimeout() for PHP? I've searched php.net, and I can't seem to find any......
App.js      <Store>       <Navbar />       <AppNavigator ref={navigatorRef => {           NavigationService.setTopLevelNavigator(navigatorRef);         }} />     </Store>    I wanna be able to access    props.navigation.o...
I was looking for both single and double-click event handling with AngularJS, since AngularJS always fires only the ng-click event even if there is ng-dblclick directive set for our element.  Here is some working code for those who seek solution:  JS...
I want to export a JSON string in python into a JS variable.  <script type="text/javascript">     var data = JSON.parse('{{ dataJSON }}');     console.log(data) </script>   If I print the content of dataJSON I get: [{"...
I am using two AJAX GET requests to grab data from two different sources. In each request I parse the response data, create a temporary array with the relevant data each item, and push this temporary array into a master array.However, this only works...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.