Posts

ajax - Reading JSON values in servlet -

i posting jquery ajax post servlet , data in form of json string. not sure whether data getting posted or not. also, want verify login , password fetching json object. heres code snippet: <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript" src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script> <script type="text/javascript"> function doajax(){ var fullname=$("#fullname").val; var mobileno=$("#mobileno").val; $.ajax({ url: 'dvsds', type: 'post', datatype: 'json', data:{ "mobileno":mobileno, "fullname":fullname}, error:function(){ alert("error occured!!!"); }, success:function(data){ alert(data.message); } }); } </sc...

mysql - Json_encode generate null value while try to connect two database -

i have use utf8_unicode_ci collation field of 2 database.for english language , number fine thai language not showed.it show null.i try many way still.but if remove $dbh2 work need both <?php $timezone = "asia/bangkok"; if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone); $dbh1 = mysql_connect('localhost','user1','pass1', true); $dbh2 = mysql_connect('localhost','user2','pass2', true); mysql_query("set names 'utf8"); mysql_select_db('db1', $dbh1); mysql_select_db('db2', $dbh2); $name=$_get['name']; $data=array(); $search=mysql_query("select * `users` `uname` = '".$name."'",$dbh2); while($a=mysql_fetch_assoc($search)) { $data[]=$a['total_point']; } $find=mysql_query("select * `item` order `item_id` desc",$dbh1); while($r=mysql_fetch_assoc($find)) ...

Does eclipse support xml comment description like Visual Studio? -

i'm trying switch project visual studio eclipse. in visual studio comment functions , parameters xml comments. these comments shown in code completion. /// <summary> /// function hotkey.deinstallkey() deinstalls single hotkey. function uses ascii character identify key has deinstalled. function works local , global hotkeys. /// </summary> /// @cond visual_param /// <param name="key">the hotkeytag.</param> /// @endcond /// @param[in] key hotkeytag. void deinstallkey(int key); does eclipse support well, or how have change comments achieve same functionality?

Is there a YouTube API that can give me structured metadata about a video? -

using youtube api, how can fetch structured data video? instance, given video movie trailer, how can find movie title or topic in structured format, , other interesting metadata such celebrities featured or director? yes. v3 api allows do via videos/list . here's example api call using trailer dark knight rises: get https://www.googleapis.com/youtube/v3/videos?part=topicdetails&id=g8evye9tuyk&fields=items%2ftopicdetails%2ftopicids&key= {your_api_key} (to developer key, follow instructions in our video tutorial ). that sets: topic: topicdetails id: g8evye9tuyk fields: items/topicdetails/topicids in response body, get: { "items": [ { "topicdetails": { "topicids": [ "/m/0bpm4yw", "/m/01d5g", "/m/0btpm6", "/m/0184dt", "/m/02vxn" ] } } ] } these correspond freebase mids, can lookup using freebase api . instance, first respons...

Javascript - export a JQuery dataTable to Excel problems -

i have following code: <a id="dlink" style="display:none;"></a> <input type="button" onclick="tabletoexcel('cereritable', 'tabel date', 'myfile.xls')" value="export excel"> <script language="javascript"> var tabletoexcel = (function() { var uri = 'data:application/vnd.ms-excel;charset=utf-8;base64,' , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" ' + 'xmlns="http://www.w3.org/tr/rec-html40"><head>' + '<!--[if gte mso 9]>' + '<xsl:template name="styles">' + '<style>' + 'table {' + 'mso-displayed-decimal-separator:"\,";' + 'mso-displayed-thousand-separator:" ";' + '}' + '@page...

Create XML File With Dynamic Sub Elements Level In C# -

there tree view in c# project contains dynamic level of categories , products belong 1 category application create parent category single level of sub category so need create xml file multiple sub categories code : private void createxmlfile(object sender, eventargs e) { try { list<prg.createxml.category> categories = service.category.instance.findall(); list<prg.createxml.product> products = service.product.instance.findall(); string filename = "category.xml"; string filepath = directory.getcurrentdirectory() + "\\data\\" + filename; if (file.exists(filepath)) file.delete(filepath); xmltextwriter writer = new xmltextwriter(filepath, system.text.encoding.utf8); writer.writestartdocument(true); writer.formatting = formatting.indented; writer.indentation = 3; writer.writestartelement(...

javascript - Refresh parent window after submitting a form in a IFrame in jQuery -

i know how can refresh/reload parent window iframe on submit without closing frame using javascript / jquery. parent window contains display table , button opens iframe. iframe contains form on submit saves data in table displayed on parent window. @ present data not displayed until refresh page manually. please suggest me method so. this scenario main window has buttton called form , on clicking iframe opens , iframe has form on submit saves data, this data displayed in table on main window. but when submit data saved not displayed. i want method main window refreshed / reloaded without having close iframe , refreshing manually please suggest solution problem ...don't offer other method.. this thing not possible parent window cannot refreshed keeping open i-frame