Search Results

Search found 337 results on 14 pages for 'ankit sharma'.

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Value is not changing in the javascript variable on the onClick event

    - by Chetan sharma
    I am trying to implement a dynamic search jquery and php, but I am not able to change the value of a javascript variable on my onclick event. <script type="text/javascript"> var main_category = '<?php echo $main_category?>'; var main_url = '<?php echo $url?>get/' + encodeURIComponent(main_category) + '/'; var container_id = '<?php echo $unique_id?>content_area'; //name $('#<?php echo $unique_id?>search_by_name').autocomplete('<?php echo $url?>get_autocomplete_data/' + encodeURIComponent(main_category) + '/names/', { matchContains: "word", autoFill: true, width: 310 });$('#<?php echo $unique_id?>search_by_name').result(function (event, data){ var url = main_url + 'search/title/' + encodeURIComponent(data); load_div(container_id, url); }); //on click of displayed categories $('[rel="<?php echo $unique_id?>sub_category"]').click(function (){ window['main_category'] = this.title; $('#<?php echo $unique_id?>category').html('' +main_category+ ''); return false; }); }); </script> It changes the value when on click is fired //on click of displayed categories $('[rel="<?php echo $unique_id?>sub_category"]').click(function (){ window['main_category'] = this.title; $('#<?php echo $unique_id?>category').html('' +main_category+ ''); return false; }); but when after that i add data for the search it still searches for the old category $('#<?php echo $unique_id?>search_by_name').result(function (event, data){ var url = main_url + 'search/title/' + encodeURIComponent(data); load_div(container_id, url); }); "main_category" value is not changing in the "main_url"

    Read the article

  • How do I secure all the admin actions in all controllers in cakePHP

    - by Gaurav Sharma
    Hello Everyone, I am developing an application using cakePHP v 1.3 on windows (XAMPP). Most of the controllers are baked with the admin routing enabled. I want to secure the admin actions of every controller with a login page. How can I do this without repeating much ? One solution to the problem is that "I check for login information in the admin_index action of every controller" and then show the login screen accordingly. Is there any better way of doing this ? The detault URL to admin (http://localhost/app/admin) is pointing to the index_admin action of users controller (created a new route for this in routes.php file) Thanks

    Read the article

  • I need a simple Example of JNA which can map char * of c dll.

    - by Vikas Sharma
    I have one dll of cpp and i need to call its function which returns char*. Im using String in native Declaration but getting out put like ???? or some crap thing. I just want to knw that do i have to decode the String.i have already set my system property like System.setProperty("jna.encoding","UTF-8"); Im in big mess. Hope to get Some Positive replies from u guys. Thanks in Advance.. Cheers...!

    Read the article

  • Issue in exec method

    - by mukul sharma
    Hi all, I am a having two python files file1.py and file2.py. I am using exec() to get the method/Variables defined in the file2.py. file1.py have a class as given below class one: def init(self): self.HOOK = None exec(file2.py) self.HOOK = Generate ### call the hook method #### self.HOOK() file2.py looks like as (There is no class define in file2.py) def Generate() do 1 do 2 Hello() def hello() print "hello" Now the problem is as When i run script it is giving a error global name Hello not found. If i remove Hello() from Generate method in file2.py then its work fine. I cant use import file2.py in file1.py,because in file2.py the only one method name (Generate) is fix (its taken as requirement). So apart from Genarate method user can define any method and can call this in generate method, because this approach is not working so i have to write whole code into generate method only and code is also repetitive. Any help is really appreciable...

    Read the article

  • Reading Images only from Camera

    - by Ankit
    I wanted to read images only from the Camera folder of the device. Since the folder might be different for different devices, how can I write a simple application for it). So far I have written the following code, which does read from Camera folder, but it also reads from other places on sdcard as well. Cursor childCursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, MediaStore.Images.ImageColumns._ID, null); do { ImageView image = new ImageView(); image.setImageURI(Uri.withAppendedPath(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, ""+ childCursor.getString( childCursor.getColumnIndex( MediaStore.Images.ImageColumns._ID ))); <some other code> } while (childCursor.moveToNext()); How can I create a generic app and filter on Camera Images before displaying. Any help is appreciated.

    Read the article

  • How to parse json with fromJson method

    - by Ankit HTech
    I want to parse my json by fromJson class but I am unable to understand what should be the structure of my class if my json is like below: String json = "{"Result":{"Status":"SUCCESS","Message":""},"Response":{"Token":"ca0d7507-3907-4eed-af19-ad256bc71088","ZoneUrl":"https:\/\/qa.tritononline.com\/","CustomerID":1,"UserID":29,"DefaultLanguageID":1,"ZoneID":1,"IsTritonIntegrated":false,"Language":[{"LanguageId":1,"Language":"English","IsSelected":false}]}}" This is what I want to do Response res = new Response(); Gson gson = new Gson(); res = gson.fromJson(json, Response.class); I want to know what all variable should I take in Response class.

    Read the article

  • insert multiple elements in string in python

    - by Anurag Sharma
    I have to build a string like this { name: "john", url: "www.dkd.com", email: "[email protected]" } where john, www.dkd.com and [email protected] are to be supplied by variables I tried to do the following s1 = "{'name:' {0},'url:' {1},'emailid:' {2}}" s1.format("john","www.dkd.com","[email protected]") I am getting the following error Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: "'name" Dont able to understand what I am doing wrong

    Read the article

  • blitting issue when blitting to wxGCDC from a wxMemoryDC

    - by mukul sharma
    Hi All, I have loaded a wxBitmap (with transparency .png) in memoryDC now when i am blitting the data from the memoryDc to GCDC that time in transparent part its giving the black color. But if remove the GCDC and use normal ClientDC for display purpose there is no such problem happening, but i cannot remove the wxGCDC because this is only support the transparency in color drawing. Any solution or workaround really helpful. Thanks in advanced

    Read the article

  • display HTML content from database with formatting in it

    - by Gaurav Sharma
    Hi all, I have used wmd-editor in my cakephp v1.3 application. The config which I have written is as follows: wmd_options = { output: "HTML", lineLength: 40, buttons: "bold italic | link blockquote code image | ol ul heading hr", autostart: true }; When I submit the form the HTML in the wmd enabled textarea is saved in the database with htmlentities() done to the text then I am displaying it with html_entity_decode() method. but the text is displayed as it is including the HTML coding like this <p><strong>hello dear friends</strong></p>\n\n<pre><code>I want to make sure that everything that you type is visible clearly.\nadasfafas\n</code></pre>\n\n<blockquote>\n <p>sadgsagasdgxcbxcbxc</p>\n</blockquote>\n\n<p><em>sadfgsgasdsgasgs</em></p>\n\n<p><b><a href="http://kumu.in">this is the link</a></b></p> Please help me solve this problem Thanks

    Read the article

  • cahoots - zend framework application is not running

    - by Gaurav Sharma
    hello everyone, I downloaded cahoots from sourceforge.net. It is a zend framework application. Very nicely done and I must say that it should be a nice tutorial for everyone who is struggling to learn Zend framework. But my problem is that even after reading the instructions this application is still not running. The application just doesn't run at all giving an error message. I have tried my best. no success :( Also I wanted to execute the application as "http://localhost/cahoots" but it runs by this URL "http://localhost/cahoots/public". why is it so.? I am using XAMPP v 1.7.1 with mod-rewrite enabled. Please guide me through the process. Any good tutorials on zend framework with zend tool would be appreciable. I want to learn this framework. Thanks

    Read the article

  • How can i sort dictionary ?

    - by Ankit
    i have a dictionary.Inside the dictionary there is an array.i want to sort the dictionary and display it's value in acceding order so please any one help me how can i get sorted data?

    Read the article

  • A strategy to troubleshoot/ fix application crashes in Windows?

    - by Manav Sharma
    All, Over a period of time I have observed that fixing issues related to application crash is a discipline in itself. Some people have this nice way of attacking such problems. Ranging from Viewing the 'Event Viewer' to running Static/ Dynamic memory analysis tools to some of their 'personal favorites', these people have developed this art. Can we share articles/ links/ personal approaches that we use to understand/ troubleshoot/ fix such issues? Thanks

    Read the article

  • how to check the read write status of storing media in python

    - by mukul sharma
    Hi All, How can i check the read/ write permission of the file storing media? ie assume i have to write some file inside a directory and that directory may be available on read only media like (cd or dvd)or etc. So how can i check that storing media ( cd, hard disk) having a read only or read write both permission. I am using windows xp os. Thanks.

    Read the article

  • what is the procedure of performing wsdl parsing in iphone?

    - by Ankit Vyas
    i have performed like this Is there any thing wrong performed by me? NSURL *url = [NSURL URLWithString:@"http://111.111.111.111/BattleEmpire.Service/ApplicationService.svc?wsdl"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; [theRequest setHTTPMethod:@"GET"]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if(theConnection) { webData = [[NSMutableData data] retain]; NSLog( @"connection established"); } else { NSLog(@"theConnection is NULL"); }

    Read the article

  • How to stop an application in C# ?

    - by Praveen Sharma
    Hi All, I have an application and from this application I have to start another process by shutting down the current application and after the completion of the process again start the application. The flow is as follows, suppose I have an application app.exe, and another application another.exe, so i have to do following: 1) Start app.exe 2) Stop/shutdown app.exe and start another.exe from app.exe 3) When another.exe completes, stop/shutdown another.exe and start app.exe from another.exe Anyone please provide me some clue of how to do it ? Thanks in advance for any help...

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >