jquery,jquery-ui,autocomplete,asp.net-mvc-4Related issues-Collection of common programming errors


  • Alex Kasina
    javascript jquery
    I want to reload a page when I type a character into a textbox and after reload, take cursor back to the textbox. It (browser) should not reload when I delete a character from the textbox.I was trying this but it doesn’t work$(‘#id_BasePairs’).bind(‘input’, function() { location.reload();$(‘textbox’).focus();});How should it be done?

  • Ash
    php jquery ajax wpdb
    I’m using a jquery ajax call to get certain data from wpdb and I’m getting the following message: <b>Fatal error</b>: Call to a member function get_results() on a non-object in <b>C:\wamp\www\maps_en2\markers.php</b> on line <b>15</b><br />This is the call:$.ajax({type: “POST”,url: “markers.php”,data: ({‘southWestLat’ : southWestLat , ‘southWestLng’ : southWestLng , ‘northEastLat’ : northEastLat , ‘northEastLng’ : northEastLng}),success: function(msg){

  • user2772219
    php posts jquery database ajax
    I have a popup which gets the users input (name and email) and sends it to a process.php so I can send an email.I pretty much have that done. But I need to add a functionality wherein it will also the users input to the database (I already have the table for this).My process.php is this:<?php$to = ‘[email protected]’;$subject = ‘Join ‘.$_POST[‘title’].’ Event’;$message = ‘<html><head></head><body>Name: ‘.$_POST[‘participant’].'<br/>Email Address: ‘.$_POST[‘e

  • toscho
    plugin-development jquery ajax query
    I’ve read tons of post already but found no solution…I’m tryin to implement Jeditable functionality in a plugin with this code:jQuery(document).ready(function() {jQuery(‘.edit’).editable(‘http://localhost/www/wp-content/plugins/my_plugin/save.php’ });If in save.php I simply echo something, it will be returned to the textfield I was updating without problem. Problem is on how to insert it into the db… If I use this:if (isset($_POST[‘id’])) {global $wpdb;$query = “INSERT INTO table (col1, col2

  • SLoret
    jquery galleria
    If I have the line <style type=”text/css”></style> , even though it is blank, Galleria throws the error message “Fatal error: Could not extract a stage height from the CSS. Traced height: 0px.” It would appear that even though I’m telling galleria to use a height of 300 via: $(‘#galleria’).galleria({ width: 300, height: 300, transition: ‘fade’ }); it tries to first determine the height and the CSS line is confusing it, so it throws this error. If I remove that one line, no more e

  • mahish
    jquery wp-admin hooks
    This is the hook and script Im using, the jquery script itself is working as you can see in this fiddle:function my_custom_admin_footer(){echo ‘ <script type=”text/javascript”>jQuery(document).ready(function($) {$(“.checkIt”).change(function (e) {if ($(“input:checkbox:checked”).length > 1) {alert(“Only one attribute is allowed.”);$(e.target).prop(‘checked’, false);}});});</script>’; }add_action(‘admin_footer’, ‘my_custom_admin_footer’);in wp-admin, i get only blank page inst

  • Baconbeastnz
    javascript jquery
    I’m using window.onerror, and window.onbeforeunload to pass all the errors encountered in the users session with AJAX, I’m trying to test it, and I need to create some javascript errors to test if it is catching it I’ve tried things like var a = b; (where b doesn’t exist) problem is these errors seems to be fatal and stop any further processing…Can anyone think of a decent way to cause some errors without stopping the processing of the script?ErrorManager: (function () {function Init(message)

  • user2772219
    php posts jquery database ajax
    Why am I getting a Fatal error whenever I use wpdb in the target URL of my jQuery.post?Here is my code so far.My process.php is this:<?php$to = ‘[email protected]’;$subject = ‘Join ‘.$_POST[‘title’].’ Event’;$message = ‘<html><head></head><body>Name: ‘.$_POST[‘participant’].'<br/>Email Address: ‘.$_POST[’email’].'<br/>Message: ‘.$_POST[‘message’].'</body></html>’;$headers = ‘MIME-Version: 1.0’ . “\r\n”;$headers .= ‘Content-type: text/html;

  • Ohgodwhy
    jquery ajax codeigniter smarty
    So, im using Samrty with CodeIgniter as my template builder. On a given page, i do an ajax call to retrieve some data.I do de ajax call usign JQuery. The problem comes here: The call returns success but this is what I get:Fatal error: Uncaught exception ‘SmartyException’ with message ‘Unable to read template file ‘plantilla.tpl” in /export/home/htdocs/evaluacion/pruebas/admin10/application/libraries/Smarty/libs/sysplugins/smarty_internal_resource_file.php:70 Stack trace: #0 /export/home/htdocs

  • Chinchila
    javascript php jquery load
    I have that code:$(function(){$(“#dirr”).click(function(){$(“section[name=files]”).load(‘pages/files.php?’ + $.param({dir: 2}););}); });and that error on page:Fatal error: Call to a member function prepare() on a non-object in \pages\files.php on line 51UPDATE:<? if($_GET[‘dir’] == “”){echo ‘<form id=”dirform” method=”POST” action=”?f=createdir”><label>Create directory:<input type=”text” id=”cdir” name=”cdir” required><input type=”radio” name=”dirpub” id=”dirpub” value=”1

  • lokisapocalypse
    jquery jquery-ui accordion sortable
    This is my first time posting so please let me know if I fail to provide enough details. I have a page that contains multiple accordions. I wanted to use multiple accordions because I wanted users to be able to have multiple sections open at once which is not native to accordion. I also want users to be able to sort those accordions. The way the page is currently set up, users can sort the accordion with no problems. When the user goes to sort the accordions, I have a script that will close all

  • Akke
    javascript jquery jquery-ui dialog callback
    I’m writing some form validation functions, and I’ve decided to go with jQueryUI for prompting the user because of flexibility.There is a slight problem tho. I want my functions to return an array which consists of a boolean and a string for my error reporting system. JQueryUI dialogs are asynchronous which means the browser won’t hang and wait for a return value as the native prompt() would.Here is some sample code:Validator function:function verifyTOS_PVM_v2() {verifyTOS_PVM_v2_callback = ”;i

  • Richard Neil Ilagan
    jquery jquery-ui position
    jQuery has a native .position() function right out of the box which gets positioning values of an element relative to its location on the page.jQuery UI extends that same function to allow modification of positioning of elements.How do I check if the jQuery UI version of .position() is loaded in a page?Sadly, it isn’t just a matter of checking whether jQuery UI is loaded on a page or not, since the .position() plugin extension is not part of the jQuery UI Core libraries, which means someone some

  • UrbanPlanet
    jquery jquery-ui autocomplete asp.net-mvc-4
    List itemI am looking at the JQUERY example on the http://jsfiddle.net/g4stL/212/ link in Jsfiddle website. I am very impressed by the feature. Infact we have to implement the exact same feature on our application.If I copy the code as it is, I am able to see the multicolumn autocomplete. However the selection part does not work. If I select using mouse cursor or using Arrow keys the program fails. The error I get is “htmlfile: Unexpected call to method or property access.”In the append function

  • Mark Richman
    asp.net jquery jquery-ui dialog confirm
    I have a TemplateField in a GridView in an UpdatePanel with a button called btnDelete. Rather than the standard OnClientClick=”return confirm(‘Are you sure?’)” I’d like to use jQuery Dialog.So far, I’m able to set the jQuery using btnDelete.Attributes[“onclick”] and setting the jQuery Dialog code in the code-behind. However, it posts back to the server in all cases before I have a chance to click “Confirm” or “Cancel”. Here is the HTML it produces:<input type=”submit” rel=”Are you sure?” clas

  • Iznogood
    jquery jquery-ui jquery-ui-accordion
    I have a very simple accordion in my webpage that I initialise with :$(document).ready(function() {$(‘#accordion’).accordion({‘autoheight’:true,’header’: ‘img’});});And later I:<div id=”accordion”><img src=”/public/images/btn_avant.gif” alt=”” /><div><ul><li><a href=”/”>link</a></li><li><a href=”/”>link</a></li></ul></div><img src=”/public/images/btn_pendant.gif” alt=”” /><div>du contenu</div>&l

  • alex.mo.07
    javascript jquery html jquery-ui this
    I’m working on what I thought would be a simple chunk of code, trying to dynamically (using ‘this’) animate div blocks to scale (zoom) to the size of the parent container (section tag) on click.My HTML:<section><div id=”project”></div><div id=”project”></div><div id=”project”></div><div id=”project”></div><div id=”project”></div><div id=”project”></div></section>My JavaScript:$(“#project”).click(function() {$(thi

  • James Montagne
    javascript jquery-ui
    see the underlying code.function displayProductsByCategory(a){$.getJSON(‘json/newjson.json’, function(data) {$(“#Product_Display_Div”).empty();$(“#Product_Display_Div”).append(‘<h1>’+a.id+'</h1>’);$.each(data[a.id], function(key, item) {//alert(“key :”+item.productPrice+”value :”+item.productName);$(“#Product_Display_Div”).append(‘<ul class=”columns”><li> <h3>’+item.productName+'</h3><img src=”‘+item.ProductImageURL+'” width=”150″ height=”150″ /><p>

  • Andrew Whitaker
    jquery-ui autocomplete jquery-ui-autocomplete
    I’m using jQuery UI’s Autocomplete slightly differently than it was probably created to do.Basically I want to keep all the same functionality, the only difference is that when the suggestion box appears, I don’t the suggestion box to hide when a user makes a selection and I also don’t want that selection to populate the input box that .autocomplete is attached to.So, I’ve been reading through the jQuery UI documentation, and it appears there is a way to disable the Select: and Close: events, bu

  • revaxarts
    jquery jquery-ui jquery-ui-sortable
    I’m trying to load some html in an iframe and make certain elements in that html page sortable:jsfiddleJS:var _iframe = $(‘iframe’); var containment = _iframe.contents().find( “modules” ); if(containment.data(‘sortable’)) containment.sortable(‘destroy’);containment.sortable({stop: function (event, ui) {console.log(‘STOP: I am never called’);},start: function (event, ui) {console.log(‘START: I am called with a delay!’);},containment: containment,placeholder: “sortable-placeholder”,items: “> mo

  • user2642201
    android autocomplete nullpointerexception searchview
    I’m trying to implement autocomplete textview functionality to my searchview since i find it easy as compared to content providers.The problem is that I’m getting nullpointerexception at autoComplete.setAdapter(aAdapter).This is part of my code: Records.javapublic class Records extends Fragment{String Name;GridView MyGrid;List<String> array=new ArrayList<String>();ArrayList<String> Location=new ArrayList<String>();ArrayList<String> Books=new ArrayList<String>(

  • MPelletier
    android autocomplete textview logcat
    I am using autoCompleteTextView to load the contacts. There is no errors and it doesnt crash too. But the autocompleteTextview doesn’t seem to appear anything.I will post my codes and logcat.Codes:-package com.droidnova.android.samples;import android.app.Activity;import android.content.ContentResolver;import android.content.Context;import android.database.Cursor;import android.net.Uri;import android.os.Bundle;import android.provider.Contacts;import android.provider.Contacts.People;import android

  • user3346237
    android autocomplete google-places-api google-maps-api-2
    I’m using Google Places Autocomplete API in my application. I followed this tutorial http://wptrafficanalyzer.in/blog/adding-google-places-autocomplete-api-as-custom-suggestions-in-android-search-dialog/ but when i write the place name in search box, it doesn’t retrieves the suggestions and when I press Go button, my app crashes. Please HelpLog File03-10 16:51:56.383: E/ActivityThread(25238): Failed to find provider info for com.appscourt.earth.map.PlaceProvider 03-10 16:51:58.798: E/ActivityThr

  • Clive
    7 autocomplete
    I’m kind of new to drupal (been working with it for 2 months) and i seem to hit a wall with this issue . I’ve written a little module to allow my users to find phone numbers quickly . It uses autocomplete and works perfectly fine when the user is logged in , but fail when it ain’t the case (no icon in the field no http requests fired).Digging a little further , i can see that neither the autocomplete.js is loading nor the targeted field is properly formatted for autocomplete .<form action=”/”

  • UrbanPlanet
    jquery jquery-ui autocomplete asp.net-mvc-4
    List itemI am looking at the JQUERY example on the http://jsfiddle.net/g4stL/212/ link in Jsfiddle website. I am very impressed by the feature. Infact we have to implement the exact same feature on our application.If I copy the code as it is, I am able to see the multicolumn autocomplete. However the selection part does not work. If I select using mouse cursor or using Arrow keys the program fails. The error I get is “htmlfile: Unexpected call to method or property access.”In the append function

  • user361022
    jquery autocomplete
    At first, I thought this should be very easy. Just use $(selector).val() to get the value. However, I got a lot of difficulties.Allow me to make an example.Assume that I have two text boxes, and they are attached to jQuery’s AutoComplete plugin.When I click on the first textbox, I make ajax call, when success, I bind the returned data into that clicked textbox, and a hiddenField, which is used to hold the returned ID.The whole progress is easy, I make the ajax call and goes successful. The hidde

  • Fabrício Matté
    jquery autocomplete
    I’m trying to implement this web api autocomplete in a standard mvc app. http://techbrij.com/987/jquery-ui-autocomplete-asp-net-web-apiHere’s a screen grab from Firebug http://sdrv.ms/N0WkHPI’ve created a controller method and added the jquery script, but I keep getting a ‘JSON.parse: unexpected character’ error. I don’t see any unusual characters in my data.$(document).ready(function () { $(‘#txtSearch3’).autocomplete({source: function (request, response) {$.ajax({url: ‘/home/Get’,type: ‘GET’,c

  • DaveRandom
    jquery asp.net ajax asp.net-mvc autocomplete
    I’m using asp.NET MVC, and am looking at the JQuery autocomplete plugin for what I want to do. I need some extra functionality that I don’t think it provides.I have a page with two text fields, First and Last name. Ideally, when someone begins typing into either, I would like autocomplete to display both the first and last name of all matches. If one of these matches were selected, I would like only the appropriate (first/last) name to go into the current field, while the other field is also fil

  • Andrew Whitaker
    jquery-ui autocomplete jquery-ui-autocomplete
    I’m using jQuery UI’s Autocomplete slightly differently than it was probably created to do.Basically I want to keep all the same functionality, the only difference is that when the suggestion box appears, I don’t the suggestion box to hide when a user makes a selection and I also don’t want that selection to populate the input box that .autocomplete is attached to.So, I’ve been reading through the jQuery UI documentation, and it appears there is a way to disable the Select: and Close: events, bu

  • JackTurky
    ajax json jquery-ui autocomplete
    my problem is clear.I’m using jquery autocomplete and i don’t know why it shows me only the message:9 results are available, use up and down arrow keys to navigate.Without showing me the list of result.This is my code:<p class=”select-c”><label for=”fcb”>Location</label><input id=”fcb” name=”fcb” type=”text”> </p>$(“#fcb”).autocomplete({source: function (request, response) {$.ajax({type: “GET”,dataType: ‘json’,url: “../ws/city/” + request.ter

  • amurra
    asp.net-mvc asp.net-mvc-4
    I have the need to manually instansiate some controllers and therefore have this code:var controller = Activator.CreateInstance(typeof(AccountController), repository) as AccountController;In the AccountController I have a method similar to this:[AllowAnonymous] [HttpPost] public ApiJsonResult LogOn(LogOnAccountDto model) {ValidateModel(model);if (ModelState.IsValid){//…} }I want my ModelState.IsValid to work, so therefore I call ValidateModel and pass it the model.This fails, apparently becaus

  • CR41G14
    c# .net asp.net-mvc asp.net-mvc-4 gzip
    Hi what I am trying to achieve is to compress an uploaded file and save this into the database then to decompress on download. I am using C# .NET MVC4.The system does deliver a file available to download, however when I try to open this file it is corrupt. This code works perfectly fine locally, there are no exceptions being thrown on the server and I do get a so I was wondering if anyone has had any issues with GZip on the server? I have had the server guys take a look and they have deemed

  • dazedsnowboarder
    c# android asp.net-mvc asp.net-mvc-4
    I’m a first time poster so please excuse my ignorance on posting technique. I have been searching for hours and cannot seem to find the answer to this so hopefully the smarter people in the room can help? I have a web application written in .net MVC 4 that connects to several cloud service APIs. The user can then download files from this web app. I’ve been able to get this to work on all platforms except android. When I try to download the file on Android it hangs and eventually fails. While dow

  • PseudoNym01
    jquery-ajax post asp.net-mvc-4
    My ajax call looks like this$.ajax({ //actually approve or reject the promotionurl: url,type: “POST”,data: ‘{‘+data.PromotionId+’,’+data.UserId+’,’+data.ReasonText+’}’,dataType: “json”,//contentType: “application/json; charset=utf-8”,success: function (data) {if (indicator == ‘A’) {alert(‘Promotion approved successfully!’);}else {alert(‘Promotion rejected successfully.’);}var homelink = ‘<%: Url.Action(“Index”,”Home”) %>’;window.location.href = (homelink);returndata = data;},error: functio

  • j0k
    .net asp.net-mvc-4 mono asp.net-web-api
    I’m trying to get the new ASP.NET Web API beta (VS 2010 default Web API project) running on Ubuntu 10.04 with Mono 2.10.8.1. Unfortunately I failed miserably in all my attempts so far. The most “meaningful” exception I got is the following:System.TypeLoadException: Could not load type ‘RestTest.Controllers.ValuesController’ from assembly ‘RestTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’.at (wrapper managed-to-native) System.Type:type_is_assignable_from (System.Type,System.Type)at

  • Noel
    c# asp.net-mvc asp.net-mvc-4 asp.net-web-api asp.net-web-api-routing
    I created a new ASP.NET MVC4 Web Api Project. In addition to the default ValuesController, I added another controller, ScenarioController. It has the exact same methods as ValuesController. But for some reason, it behaves differently./api/values/ => “value1″,”value2” /api/values/1 => “value” /api/scenario/ => “value1″,”value2” /api/scenario/1 => “value1”,”value2″^^^^^^^^^^^^^^^^^should return “value”!Using breakpoints, I know that /api/scenario/1 actually gets sent to the public IEnu

  • UrbanPlanet
    jquery jquery-ui autocomplete asp.net-mvc-4
    List itemI am looking at the JQUERY example on the http://jsfiddle.net/g4stL/212/ link in Jsfiddle website. I am very impressed by the feature. Infact we have to implement the exact same feature on our application.If I copy the code as it is, I am able to see the multicolumn autocomplete. However the selection part does not work. If I select using mouse cursor or using Arrow keys the program fails. The error I get is “htmlfile: Unexpected call to method or property access.”In the append function

  • Rudi Visser
    asp.net asp.net-mvc asp.net-mvc-2 asp.net-mvc-4
    In ASP.NET MVC 2, the lifespan of an entry in the TempDataDictionary was just one HTTP Request.That translated to setting a value in one request, redirecting, and having access to the same item at the other end of the line. After this the entry would be no longer available, regardless of whether you read the value out of the dictionary at the latter end of the line or not.Since ASP.NET MVC 3 (I believe), this implementation detail has changed quite significantly.Entries in the TempDataDictionary

  • Saroj
    .net asp.net-mvc web-services wcf asp.net-mvc-4
    I need to write a method which retrieves data from db and need to pass this data to web controller. I have written a method in WCF and calling this method from web controller in MVC 4.But it is giving exception: This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). Inner Exception: The underlying connection was closed: An unexpected error occurred on

  • Mike Wills
    c# asp.net-mvc-4
    I am making a call to a Web API that I wrote. I am working through the bugs on both sides and am getting a 500 error. I want to see that is in that error message to see what might be the problem. How do I find that?using (var client = new HttpClient()) {var fooURL = Url.RouteUrl(“PayrollApi”, new { httproute = string.Empty, controller = “LeaveRequest” }, Request.Url.Scheme);var repsonse = client.PostAsJsonAsync(fooURL, leaveRequest).Result; }I don’t see where that text might be stored so I can f

Web site is in building