Search Results

Search found 10212 results on 409 pages for 'reverse ajax'.

Page 19/409 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Maven nexus with jetty 7 and apache2 reverse proxy

    - by user613154
    Hello stackoverflow ! Here is my problem : i try to run a maven nexus behind an apache reverse proxy. As i have multiples war in my jetty, i want the nexus to run here : http://localhost:8080/nexus I made a jetty context file as follow : {jetty.home}/contexts/nexus.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/nexus</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/nexus.war</Set> </Configure> My jetty connector in jetty.xml is as follow : <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <Set name="host"><Property name="jetty.host" /></Set> <Set name="port"><Property name="jetty.port" default="8080"/></Set> <Set name="maxIdleTime">300000</Set> <Set name="Acceptors">2</Set> <Set name="forwarded">true</Set> <Set name="statsOn">false</Set> <Set name="confidentialPort">8443</Set> <Set name="lowResourcesConnections">20000</Set> <Set name="lowResourcesMaxIdleTime">5000</Set> </New> </Arg> </Call> I want http://maven.foo.com/ as an end point for the nexus, so i made this apache2 configuration file : ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *> AddDefaultCharset off Order deny,allow Allow from all </Proxy> <VirtualHost *:80> ServerName maven.foo.com ProxyPass / http://localhost:8080/nexus/ ProxyPassReverse / http://localhost:8080/nexus/ ErrorLog ${APACHE_LOG_DIR}/error_nexus.log </VirtualHost> But i can't manage to make it work. The error message displayed in the browser is "The server has not found anything matching the request URI". I tried to read docs on jetty and apache web site, but didn't find information for mapping a subdomain "sub.foo.com" to a context "localhost:8080/sub" ... Any help welcome ! Thanks

    Read the article

  • What about SEO in one page website with ajax loaded content?

    - by Azimbadwewe
    As my title I'd like to build a website with just one input text for searching restaurants and I would like to load via ajax in the same page the resultst in a list. After the list is loaded if you click on one row for Restaurant details it load via ajax all the Restaurant details. what about SEO in a website structure like this? There is a way to index every single restaurant? I'm pretty new in SEO and every comment will be for sure important to me in order to understand and learn more about it. Cheers

    Read the article

  • Ajax site not being crawled - have escaped fragment, what's wrong? [closed]

    - by Harry
    My site is anonkun.com. You can see that it's "ajax" and doesn't load much HTML. Here are some example pages: http://anonkun.com http://anonkun.com/?_escaped_fragment_= http://anonkun.com/stories/Dev-kun---FAQ/6ef881f8-cf48-4f87-a688-c585f23809c5 http://anonkun.com/stories/Dev-kun---FAQ/6ef881f8-cf48-4f87-a688-c585f23809c5?_escaped_fragment_= As you can see the original page has the meta fragment tag and the escaped fragment versions loads static html. Why am I not getting crawled? http://cl.ly/image/2n30212q0K2W Webmaster tools show that pages are being seen as duplicate and fetch as google show me the ajax version of the source not the static escaped fragment version. What's wrong and how do I make this work? Thanks.

    Read the article

  • SEOs: mobile version using AJAX: how to be properly read by crawlers?

    - by Olivier Pons
    Before anything else, I'd like to emphasize that I've already read this and this. Here's what I can do: First choice: create classical web version with all products in that page - http://www.myweb.com. create mobile web version with all products in the page and use jQuery Mobile to format all nicely but this may be long to (load + format), and may provide bad user experience - http://m.myweb.com. Second choice: create classical web version with all products in that page create mobile web version with almost nothing but a Web page showing wait, then download all products in the page using AJAX and use jQuery Mobile to format all nicely. Showing a wait, loading message gives far more time to do whatever I want and may provide better user experience - http://m.myweb.com. Question: if I choose the second solution, Google won't read anything on the mobile version (because all products will be downloaded in the page using AJAX), so it wont be properly read by crawlers. What / how shall I do?

    Read the article

  • Should I ditch AJAX in client side web development when I've got a web-socket open?

    - by jt0dd
    I was thinking that maybe I should forget AJAX (HTTP) requests when I've got a web-socket open between client and server, but I decided I should ask here to check if this could be a bad practice for some reason that I'm not thinking of. Once the socket is open, there's less syntax (often meaning simpler error handling) involved in passing information between client and server with Socket.io (just one example of a web-socket). Is there some obvious situation where a web-socket (Socket.io for example) isn't going to be capable of handling a functionality that an AJAX request could do easily?

    Read the article

  • Creating a Reverse Proxy using Jpcap

    - by Ramon Marco Navarro
    I need to create a program that receives HTTP request and forwards those requests to the web servers. I have successfully made this using only Java Sockets but the client needed the program to be implemented in Jpcap. I'd like to know if this is possible and what literature I should be reading for this project. This is what I have now by stitching together pieces from the Jpcap tutorial: import java.net.InetAddress; import java.io.*; import jpcap.*; import jpcap.packet.*; public class Router { public static void main(String args[]) { //Obtain the list of network interfaces NetworkInterface[] devices = JpcapCaptor.getDeviceList(); //for each network interface for (int i = 0; i < devices.length; i++) { //print out its name and description System.out.println(i+": "+devices[i].name + "(" + devices[i].description+")"); //print out its datalink name and description System.out.println(" datalink: "+devices[i].datalink_name + "(" + devices[i].datalink_description+")"); //print out its MAC address System.out.print(" MAC address:"); for (byte b : devices[i].mac_address) System.out.print(Integer.toHexString(b&0xff) + ":"); System.out.println(); //print out its IP address, subnet mask and broadcast address for (NetworkInterfaceAddress a : devices[i].addresses) System.out.println(" address:"+a.address + " " + a.subnet + " "+ a.broadcast); } int index = 1; // set index of the interface that you want to open. //Open an interface with openDevice(NetworkInterface intrface, int snaplen, boolean promics, int to_ms) JpcapCaptor captor = null; try { captor = JpcapCaptor.openDevice(devices[index], 65535, false, 20); captor.setFilter("port 80 and host 192.168.56.1", true); } catch(java.io.IOException e) { System.err.println(e); } //call processPacket() to let Jpcap call PacketPrinter.receivePacket() for every packet capture. captor.loopPacket(-1,new PacketPrinter()); captor.close(); } } class PacketPrinter implements PacketReceiver { //this method is called every time Jpcap captures a packet public void receivePacket(Packet p) { JpcapSender sender = null; try { NetworkInterface[] devices = JpcapCaptor.getDeviceList(); sender = JpcapSender.openDevice(devices[1]); } catch(IOException e) { System.err.println(e); } IPPacket packet = (IPPacket)p; try { // IP Address of machine sending HTTP requests (the client) // It's still on the same LAN as the servers for testing purposes. packet.dst_ip = InetAddress.getByName("192.168.56.2"); } catch(java.net.UnknownHostException e) { System.err.println(e); } //create an Ethernet packet (frame) EthernetPacket ether=new EthernetPacket(); //set frame type as IP ether.frametype=EthernetPacket.ETHERTYPE_IP; //set source and destination MAC addresses // MAC Address of machine running reverse proxy server ether.src_mac = new MacAddress("08:00:27:00:9C:80").getAddress(); // MAC Address of machine running web server ether.dst_mac = new MacAddress("08:00:27:C7:D2:4C").getAddress(); //set the datalink frame of the packet as ether packet.datalink=ether; //send the packet sender.sendPacket(packet); sender.close(); //just print out a captured packet System.out.println(packet); } } Any help would be greatly appreciated. Thank you.

    Read the article

  • Problems with jQuery getJSON using local files in Chrome

    - by Tauren
    I have a very simple test page that uses XHR requests with jQuery's $.getJSON and $.ajax methods. The same page works in some situations and not in others. Specificially, it doesn't work in Chrome on Ubuntu. I'm testing on Ubuntu 9.10 with Chrome 5.0.342.7 beta and Mac OSX 10.6.2 with Chrome 5.0.307.9 beta. It works correctly when files are installed on a web server from both Ubuntu/Chrome and Mac/Chrome (try it out here). It works correctly when files are installed on local hard drive in Mac/Chrome (accessed with file:///...). It FAILS when files are installed on local hard drive in Ubuntu/Chrome (access with file:///...). The small set of 3 files can be downloaded in a tar/gzip file from here: http://issues.tauren.com/testjson/testjson.tgz When it works, the Chrome console will say: XHR finished loading: "http://issues.tauren.com/testjson/data.json". index.html:16Using getJSON index.html:21 Object result: "success" __proto__: Object index.html:22success XHR finished loading: "http://issues.tauren.com/testjson/data.json". index.html:29Using ajax with json dataType index.html:34 Object result: "success" __proto__: Object index.html:35success XHR finished loading: "http://issues.tauren.com/testjson/data.json". index.html:46Using ajax with text dataType index.html:51{"result":"success"} index.html:52undefined When it doesn't work, the Chrome console will show this: index.html:16Using getJSON index.html:21null index.html:22Uncaught TypeError: Cannot read property 'result' of null index.html:29Using ajax with json dataType index.html:34null index.html:35Uncaught TypeError: Cannot read property 'result' of null index.html:46Using ajax with text dataType index.html:51 index.html:52undefined Notice that it doesn't even show the XHR requests, although the success handler is run. I swear this was working previously in Ubuntu/Chrome, and am worried something got messed up. I already uninstalled and reinstalled Chrome, but that didn't help. Can someone try it out locally on your Ubuntu system and tell me if you have any troubles? Note that it seems to be working fine in Firefox.

    Read the article

  • Ubuntu 10.04 server delay responding to AJAX requests

    - by DanielAttard
    I manage a Ubuntu 10.04 server with a couple of domains hosted on it. As I continue to learn more about all these wonderful new (for me), one issue that I have begun to notice is the delay it sometimes takes for the server to respond to certain requests. As an example, when I view the timeline of events using firebug I can see that most of the time when I make a POST, the server responds in under 100ms. Sometimes, however, there is a substantial delay before the RESPONSE from the server. I can't seem to tell when the delay will happen and when it won't, however, when it happens the delay is always for about 4.5 seconds. The delay seems to happen about 30-40% of the time. Here is the section of apache2.conf dealing with logs: # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i # LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent I have no idea where to look to try and debug this problem or investigate further. Any suggestions?

    Read the article

  • PHP+AJAX with MySQL - Query every 2 seconds, too many in TIME_WAIT

    - by Ryan
    I have a basic HTML file, using jQuery's ajax, that is connecting to my polling.php script every 2 seconds. The polling.php simply connections to mysql, checks for ID's newer than my hidden, stored current ID, and then echo's if there is anything new. Since the javascript is connecting every 2 seconds, I am getting thousands of connections in TIME_WAIT, just for my client. This is because my script is re-connecting to MySQL over and over again. I have tried mysql_pconnect but it didn't help any. Is there any way I can get PHP to open 1 connection, and continue to query using it? Instead of reconnecting every single time and making all these TIME_WAIT connections. Unsure what to do here to make this work properly.

    Read the article

  • Is there a good [and modern] reason to not have static HTML pages with AJAX content , rather than generate pages?

    - by user1725
    Assumptions: We don't care about IE6, and Noscript users. Lets pretend we have the following design concept: All your pages are HTML/CSS that create the ascetics, layout, colours, general design related things. Lets pretend this basic code below is that: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link href="/example.css" rel="stylesheet" type="text/css"/> <script src="example.js" type="text/javascript"></script> <head> <body> <div class="left"> </div> <div class="mid"> </div> <div class="right"> </div> </body> </html> Which in theory should produce, with the right CSS, three vertical columns on the web page. Now, here's the root of the question, what are the serious advantages and/or disadvantages of loading the content of these columns (lets assume they are all indeed dynamic content, not static) via AJAX requests, or have the content pre-set with a scripting language? So for instance, we would have, in the AJAX example, lets asume jquery is used on-load: //Multiple http requests $("body > div.left").load("./script.php?content=news"); $("body > div.right").load("./script.php?content=blogs"); $("body > div.mid").load("./script.php?content=links"); OR--- //Single http request $.ajax({ url: './script.php?content=news|blogs|links', method: 'json', type: 'text', success: function (data) { $("body > div.left").html(data.news); $("body > div.right").html(data.blogs); $("body > div.mid").html(data.links); } }) Verses doing this: <body> <div class="left"> <?php echo function_returning_news(); ?> </div> <div class="mid"> <?php echo function_returning_blogs(); ?> </div> <div class="right"> <?php echo function_returning_links(); ?> </div> </body> I'm personally thinking right now that doing static HTML pages is a better method, my reasoning is: I've separated my data, logic, and presentation (ie, "MVC") code. I can make changes to one without others. Browser caches mean I'm just getting server load mostly for the content, not the presentation wrapped around it. I could turn my "script.php" into a more robust API for the website. But I'm not certain or clear that these are legitimately good reasons, and I'm not confidently aware of other issues that could happen, so I would like to know the pros-and-cons, so to speak.

    Read the article

  • jQuery Ajax call - Set variable value on success.

    - by Nathan
    Hey all, I have an application that I am writing that modifies data on a cached object in the server. The modifications are performed through an ajax call that basically updates properties of that object. When the user is done working, I have a basic 'Save Changes' button that allows them to Save the data and flush the cached object. In order to protect the user, I want to warn them if the try to navigate away from the page when modifications have been made to the server object if they have not saved. So, I created a web service method called IsInitialized that will return true or false based on whether or not changes have been saved. If they have not been saved, I want to prompt the user and give them a chance to cancel their navigation request. Here's my problem - although I have the calls working correctly, I can't seem to get the ajax success call to set the variable value on its callback function. Here's the code I have now. ////Catches the users to keep them from navigation off the page w/o saved changes... window.onbeforeunload = CheckSaveStatus; var IsInitialized; function CheckSaveStatus() { var temp = $.ajax({ type: "POST", url: "URL.asmx/CheckIfInstanceIsInitilized", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { IsInitialized = result.d; }, error: function(xmlHttpRequest, status, err) { alert(xmlHttpRequest.statusText + " " + xmlHttpRequest.status + " : " + xmlHttpRequest.responseText); } }); if (IsInitialized) { return "You currently have unprocessed changes for this Simulation."; } } I feel that I might be trying to use the Success callback in an inappropriate manner. How do I set a javascript variable on the Success callback so that I can decide whether or not the user should be prompted w/ the unsaved changes message? As was just pointed out, I am making an asynchronous call, which means the rest of the code gets called before my method returns. Is there a way to use that ajax call, but still catch the window.onunload event? (without making synchronos ajax)

    Read the article

  • jQuery: AJAX umlauts & special characters are a mess

    - by rayne
    I've just created my first ajax function with jQuery which actually works, but unfortunately the character encoding (for characters like ä, ö, ü, ß, c, c, å, ø) is a nightmare. My files and my database are all UTF-8. I've tried a multitude of options in the ajax function and the PHP function, none of which were satisfactory. This is my ajax var dataString = { 'name': name, 'mail': mail // other stuff } $.ajax({ type: "POST", url: "/post.php", data: dataString, contentType: "application/x-www-form-urlencoded;charset=UTF-8", cache: false, success: function(html){ // do stuff } I've tried it without contentType: "application/x-www-form-urlencoded;charset=UTF-8" and I've tried to wrap the affected data in encodeURIComponent(), none of which worked. When I use that AJAX with htmlentities() in my php, my umlauts look like this in plain text: UE Ã?, AE Ã?, OE Ã?, ue ü, ae ä, oe o And like this in the database: UE Ãœ , AE Ä, OE Ö, ue ü, ae ä, oe o If I don't use htmlentities() but mysql_real_escape_string() instead (or neither), they look good in plain text, but they look like this in the database: AE Ä, OE Ö, UE Ãœ, ae ä oe ö ue ü I've been trying tons of options for hours now, but I can't find a solution that works. So far the only option I seem to have is having them look like a total mess in the database, but that would be very contraproductive if those data sets need to be edited.

    Read the article

  • .Ajax with jQuery and MVC2

    - by Mario
    Im trying to create an ajax (post) event that will populate a table in a div on button click. I have a list of groups, when you click on a group, I would like the table to "disappear" and the members that belong to that group to "appear". My problem comes up when using jQuery's .ajax... When I click on the button, it is looking for a controller that doesnt exist, and a controller that is NOT referenced. I am, however, using AREAS (MVC2), and the area is named Member_Select where the controller is named MemberSelect. When I click on the button, I get a 404 stating it cannot find the controller Member_Select. I have examined the link button and it is set to Member_Select when clicked on, but here's the ajax call: $.ajax({ type: "POST", url: '/MemberSelect/GetMembersFromGroup', success: function(html) { $("#groupResults").html(html); } }); I havent been able to find any examples/help online. Any thoughts/suggestions/hints would be greatly appreciated. Thanks!

    Read the article

  • "not well-formed" warning when loading client-side JSON in Firefox via jQuery.ajax

    - by Zhami
    I am using jQuery's ajax method to acquire a static JSON file. The data is loaded from the local file system, hence there is no server, so I can't change the mime type. This works fin in Safari, but Firefox (3.6.3) reports the file to be "not well-formed". I am aware of, and have reviewed, a similar post here on Stack Overflow: http://stackoverflow.com/questions/677902/not-well-formed-error-in-firefox-when-loading-json-file-with-xmlhttprequest I believe my JSON is well-formed: { "_": ["appl", "goog", "yhoo", "vz", "t"] } My ajax call is straightforward: $.ajax({ url: 'data/tickers.json', dataType: 'json', async: true, data: null, success: function(data, textStatus, request) { callback(data); } }); If I wrap the JSON with a document tag: <document>JSON data</document> as was mentioned in the above referenced posted question, the ajax call fails with a parserror. So: is there a way to avoid the Firefox warning when reading in client-side JSON files?

    Read the article

  • JQuery Validation Plugin: Use Custom Ajax Method

    - by namtax
    Hi Looking for some assistance with the Jquery form validation plugin if possible. I am validating the email field of my form on blur by making an ajax call to my database, which checks if the text in the email field is currently in the database. // Check email validity on Blur $('#sEmail').blur(function(){ // Grab Email From Form var itemValue = $('#sEmail').val(); // Serialise data for ajax processing var emailData = { sEmail: itemValue } // Do Ajax Call $.getJSON('http://localhost:8501/ems/trunk/www/cfcs/admin_user_service.cfc?method=getAdminUserEmail&returnFormat=json&queryformat=column', emailData, function(data){ if (data != false) { var errorMessage = 'This email address has already been registered'; } else { var errorMessage = 'Good' } }) }); What I would like to do, is encorporate this call into the rules of my JQuery Validation Plugin...e.g $("#setAdminUser").validate({ rules:{ sEmail: { required: function(){ // Replicate my on blur ajax email call here } }, messages:{ sEmail: { required: "this email already exists" } }); Wondering if there is anyway of achieving this? Many thanks

    Read the article

  • ie8 breaks with asp.net ajax

    - by Amadeo Torese
    Hello, When using asp.net ajax (scriptmanager, timer, updatepanel) with ie8, after certain time (~3h) IE breaks with null object, constructor, or paramArray (depending on the asp.net code). Even with the simplest timer (no ajax, no updatepanel) ie8 still breaks. On every other browser it works fine, and if I code the ajax myself it works. Since google and msdn forums turned up nothing I'm wondering if anybody here has had similar problems with ie8 browser.

    Read the article

  • Having trouble with instantiating objects in PHP & Ajax custom shopping cart

    - by Phil
    This is my first time playing with both ajax and objects, so please go easy on me I have 3 pages that make up the tester shopping cart. 1) page with 'add' 'remove' buttons and ajax code to call the PHP functions on page 2. this is the actual user page with the HTML output. 2) page with PHP cart function calls, receives $_GET requests from ajax on page 1 and calls functions of the cart object from page 3, returns results to page 1. 3) page with cart object definition. Here's the problem I believe I'm having. Currently I have 'session_start()' on pgs 1 & 2, and the cart definition (pag 3) on pgs 1 & 2. I only define '$_SESSION[cart]= new Cart' on page 2. However, it seems like each time i hit an ajax function (eg each time pg 2 reloads) it seems like it's rewriting $_SESSION['cart'] over again, thus it's always empty at each new click (even tho it displays results of that click) However, if i don't define '$_SESSION[cart] = new Cart' on pg 2, i get an error: Fatal error: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Cart" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition in /home3/foundloc/public_html/booka/carti.php on line 17 Any suggestions? How can i stop re-creating my cart each time my page 2 (php cart function page) is called by ajax?

    Read the article

  • Ajax.dll causing problem?

    - by Ramesh
    Hi all, I am using Ajax.dll.I have registered the class using Ajax.Utility.RegisterTypeForAjax(typeof(Default)) in page load. I have written a function in the server side to return "Name",like [Ajax.AjaxMethod(HttpSessionStateRequirement.ReadWrite)] public string GetName() { return "Test"; } and i accessed from the page like Default.GetName(). For first time its working fine.after leaving system idle for one hour if click any link, that throws error "default is undefined ". Is there anyway to fix this issue?

    Read the article

  • Jquery Multiple ajax call

    - by Mehmet MERCAN
    I have a listed navigation with letters and i am trying to call the actors and directors from different json files when the user clicked a letter. I used 2 ajax calls to get the data from actor.php and director.php. It works fine on my local machine, but only the first one works on server. How can i make each ajax calls working? $(document).ready(function(){ $('.letters').click( function(){ var letter=$(this).html(); $.ajax({ url: 'actor.php?harf='+letter, dataType: 'json', success: function(JSON) { //some code } }); $.ajax({ url: 'director.php?harf='+letter, dataType: 'json', success: function(JSON) { // some code } }); }); });

    Read the article

  • How to setup ASP.NET Ajax Library and WCF Data Services

    - by Jronny
    I was following http://msdn.microsoft.com/en-us/magazine/ee336022.aspx but there were js errors. for example Sys is undefined So I added http://ajax.microsoft.com/ajax/act/40412/start.js. Then Sys.Data is undefined So I added http://ajax.microsoft.com/ajax/act/40412/MicrosoftAjaxDataContext.debug.js. But then TypeError: Sys.Data.OpenDataContext is not a constructor What shall I do to be able to call the service the way they do it on the first link? What are the scripts and resources needed? Thanks a lot.

    Read the article

  • jQuery $.ajax success must be a callback function?

    - by b. e. hollenbeck
    I've created a wrapper function for jQuery's $.ajax() method so I can pass different dataTypes and post variables - like so: function doPost(dType, postData, uri){ $.ajax({ url: SITE_URL + uri, dataType: dType, data: postData, success: function(data){ return data; }); } The problem I'm having is getting the data (which is always JSON) back out. I've tried setting a var ret before the $.ajax() function call and setting it as ret = data in the success function. Am I being stupid about this? If I don't set a success function, will the $.ajax simply return the data? Or is it just success: return data? Or does success require a callback function to handle the data, which could just be return data?

    Read the article

  • Asp.Net Mvc JQuery ajax input parameters are null

    - by Dofs
    Hi, I am trying to post some data with jQuery Ajax, but the parameters in my Ajax method are null. This is simple test to send data: var dataPost = { titel: 'titel', message: 'msg', tagIds: 'hello' }; jQuery.ajax({ type: "POST", url: "Create", contentType: 'application/json; charset=utf-8', data: $.toJSON(dataPost), dataType: "json", success: function(result) { alert("Data Returned: "); } }); And my Ajax method looks like this: [HttpPost] public ActionResult Create(string title, string message, string tagIds) {... } There is something basic wrong with the data I send, but I can't figure out what. All the time the title, message and tagIds are null, so there is something wrong with the encoding, I just don't know what. Note: The jQuery.toJSON is this plugin

    Read the article

  • data is not posted in $_POST variable using AJAX [migrated]

    - by Oliver
    Im having a problem in one of my script. Server is running in php, and im using AJAX to post data. Here is my script. PHP script: 0){ echo "Search Result :"; for ($x=0;$xProject Name:   ".mysql_result($result,$x,"projname").""; echo "APMS ID:   ".mysql_result($result,$x,"apmsid").""; echo "Prefix/es:   ".mysql_result($result,$x,"projprefix").""; echo "Usage Type:   ".mysql_result($result,$x,"usagetype").""; echo "Rate:   ".mysql_result($result,$x,"projrate").""; echo "Offer Details:   ".mysql_result($result,$x,"offerdetails").""; } }else{ echo "No results found ..."; } }else{ echo "Problems encountered while processing the data ..."; } ? JS Script: function QueryPrefix() { var xmlhttp; var pStr = document.getElementById('Editbox2'); var htmlHolder = document.getElementById('Html1'); var butStr = document.getElementById('Button1'); if (pStr.value.length == 0){ alert("Please enter a value on the box provided!"); return; } pStr.value=""; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { htmlHolder.innerHTML=xmlhttp.responseText; butStr.disabled=false; } } butStr.disabled=true; xmlhttp.open("POST","searchutype.php",false); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("pStr=" + pStr.value); }

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >