Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

    This error pops up when i hit the button. But my URL for all AjaxCallBack is correct as I am able to submit data to the database if this function is not called.

    Here is my code for better understanding.
    Code:
    cordova.plugins.barcodeScanner.scan(
    function(result){
    	{dialog.object}.setValue('QRCODE',result.text);
    	{grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','search_table_function','','',{onComplete: function() { {dialog.object}.setValue('dateTxtBox',date);
    	{dialog.object}.setValue('timeTxtBox',time);
    	if({dialog.object}.getValue('statusTxtBox') == "Duplicated")
    		{alert("Duplicated");}
    	else
    		if({dialog.object}.getValue('statusTxtBox') == "Fresh")
    		{alert("Fresh");}
    	{dialog.object}.submit();},deviceOfflineFunction: function() {   }});
    })

    #2
    Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

    *bump

    Comment


      #3
      Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

      Sorry... have to ask... do you have a valid XBasic function named "search_table_function"?

      I would replace the {grid.Object} ajax callback syntax with the {dialog.Object} version. Not that it matters... it just looks odd.

      I would also use a more accepted method of formatting javascript code...

      Code:
      if ({dialog.object}.getValue('statusTxtBox') == "Duplicated") {
      	alert("Duplicated");
      } else {
      	if ({dialog.object}.getValue('statusTxtBox') == "Fresh") {
      		alert("Fresh");
      	}
      }
      Don't include the braces around lines of code... makes it hard to read.
      As well, reformatting the code easily shows an error in the code you have. Missing a brace is far too common a mistake I make... but formatting the code well helps to spot that error.

      This is your code, in error, reformatted... there are 2 errors

      Code:
      if ({dialog.object}.getValue('statusTxtBox') == "Duplicated") {
      	alert("Duplicated");
      } else
      	if ({dialog.object}.getValue('statusTxtBox') == "Fresh") {
      		alert("Fresh");
      	}
      Finally... you have an awful lot going on this in code. The ajax callback is going to fire... but the balance of the javascript code is going to finish running long before the callback even gets warm. Not that it's a problem... just something to be aware of.

      To find errors in a bunch of code like this it's best to split up the code into logical blocks. First... make sure the callback works. Next... make sure the javascript if...else works. Test them out in pieces... and then put them together. Otherwise you could have a bunch of errors and never know where.

      Comment


        #4
        Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

        The JavaScript code was formmated by A5. This is because I converted the JavaScript action to the JavaScript Text mode and i thought it was going to be fine. I have tried the different part of the codes independently and is working. This follow is my search_table_function XBasic Function
        Code:
        function search_table_function (e as p)
        dim search as c
        	search = e._currentRowDataNew.realQrResultTxtBox
        	dim cn as sql::Connection
        	dim sqlSelect as c
        	dim args as sql::Arguments
        	dim result as l = .f.
        	result = cn.Open("{A5API='SQLServer',A5DBVersion=2008,Server='xxx.xxx.xxx.xxx\xxx,xxxx',A5ANSINullPadWarn=Default,UserName='xx',Password='xxxxxx',Database='xQR'}")
        	if result then
        		sqlSelect = "SELECT * FROM QRScans WHERE QRCode = :newCode"
        		args.Add("newCode", search)
        		result = cn.Execute(sqlSelect,args)
        		if result then
        			dim rs as sql::ResultSet
        			rs = cn.ResultSet
        			dim flag as l
        			flag = rs.nextRow()
        			if flag then
        				e.control.statusTxtBox = "Duplicate";
        				else
        				e.control.statusTxtBox = "Fresh";
        			end if
        		end if
        		cn.close()
        	end if
        	debug(1)
        end function
        *Credits to Govindan Gandhi & Rohan Shenoy

        Sorry for a misunderstanding. This XBasic function works in "Working Preview" the fatal error only occurs when I install the app on my device.

        Will try to fix the problem with your the help you provided. If after experimenting and if it still unable to work i will post on this thread again. Thank you!

        Comment


          #5
          Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

          I've tried and tried multiple times. It works in "Working Preview" but I just keep seeing the error when i scan a barcode. it just keep saying "Fatal error executing ajaxcallback"

          Comment


            #6
            Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

            *bump

            Comment


              #7
              Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

              Don't know if it's required but you don't have a return type for your function

              Comment


                #8
                Re: Fatal error executing Ajax callback: Function: 'search_table_function' was not recognized

                I doubt so, I can do this in "Working Preview" HELP PLEASE!

                Comment

                Working...
                X