- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I new started work with Intel XDK. I like it. But I couldn't ajax post to my web site.
Backend (I'm using FlightPHP micro framework for php)
<?php Flight::route("POST /islem/mobil",function(){ $data = array(); $isim = (string)$_POST['isim']; $sisim = (string)$_POST['sisim']; $data['yanit'] = $isim." ".$sisim; echo json_encode($data); });
Frontend
$(document).ready(function(){ $('.ajaxPost').click(function(){ var veri = { "isim" : $('.getIsim').val(), "sisim" : $('.getSoyIsim').val() }; $.ajax({ url: "http://be-vel.com/islem/mobil", dataType:"JSON", type:"POST", data:veri, success: function(cvp){ $('.sonucYaz').text(cvp.yanit); } }); }); });
Where is the error, I don't understand this, because anything show me errors :/
Thank you for interest.
Good works..
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you testing this? In the Emulate tab? In the Debug tab? In a built app on a device?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying on Emulate tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it work for you if you just use a desktop browser? Make sure it all works there, outside the XDK, first. What you are trying to do is not specific to the XDK, it has to do with making your connection between your client browser and your server work. Once you have that connection working correctly, using a browser, then you should be able to move it to a Cordova app, using the XDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I try on my browser ? I don't know sorry.
Because, node-webkit doesn't like firebug.
Thank you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fatih Mert D. wrote:
How do I try on my browser ? I don't know sorry.
Because, node-webkit doesn't like firebug.
Thank you..
Hi, emulate tab has its own debugger, second button top left.
Into debugger, you should see errors in Network section.
Regards
Diego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Faith, to try in a browser, just open the index.html file in your project in a browser...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue with our iOS build system has been resolved, please try again. See > https://software.intel.com/en-us/forums/intel-xdk/topic/611793
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page