Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...AutoCompletion with Jquery and asmxAutoCompletion with Jquery and asmx
Previous
 
Next
New Post
12/17/2012 11:23 AM
 

 Hi,

In DesktopModules\SetupProject\SetupProject.ascx i have a textbox which i want to have the auto-completion functionality. and i have used below jquery and its working fine outside dnn as a standalone web project. But in dnn it gives an error "

asmx is located in DesktopModules\SetupProject\GroupList.asmx and code behind of it in "~/App_Code/SetupProject/GroupList.cs" 

i used below js code, please help me on this.

How we can call asmx method in a module, if so how to state the url. if asmx is not needed then what are the other options. Highly appreciate for your support.

$(function () {

            $(".tb").autocomplete({
                source: function (request, response) {
                    $.ajax({
                        url: "GroupList.asmx/FetchGroupIDList",
                        data: "{ 'groupname': '" + request.term + "' }",
                        dataType: "json",
                        cache: false,
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        dataFilter: function (data) { return data; },
                        success: function (data) {
                            response($.map(data.d, function (item) {
                                return {
                                    label: item.GroupName,
                                    value: item.ID
                                }
                            }))
                        },

                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            extStatus);
                        }
                    });
                },
                select: function (event, ui) {
                    var selectedObj = ui.item;
                    $('#uniID').val(selectedObj.value);
                    return false;
                },
                minLength: 1
            });

        });

 
New Post
12/17/2012 10:01 PM
 
Hi,

Try to change the url to "DesktopModules/SetupProject/GroupList.asmx/.."

Or put your service file "GroupList.asmx" to the root of the website.

NovaSoftware ---a professional outsourcing company in China .
* More than 6 years' offshore experience in DNN
* Successfully developed 30+ websites , 250+ DNN modules, 50+ sets of Skins/Containers.
* Demo Site:http://dotnetnuke.novasoftware.com/
 
New Post
12/17/2012 11:40 PM
 

Hi Eileen,

Thanks alot for your help. I brought asmx to the root. and still im having the issue.

if i type http://localhost/dnn/GroupList.asmx/FetchGroupIDList?groupname=jo, then i get the xml.

but still below script gives

                       url: "http://localhost/dnn/GroupList.asmx/FetchGroupIDList",
                        data: "{ 'groupname': '" + request.term + "' }",
                        dataType: "json",
                        cache: false,
                        type: "POST",

Further i added below to web.config as well

<location path="GroupList.asmx">
    <system.web>
      <webServices>
        <protocols>
          <add name="HttpGet"/>
          <add name="HttpPost"/>
        </protocols>
      </webServices>
    </system.web>
  </location>

 

 
New Post
12/18/2012 8:35 PM
 
Hi Abeetha,

Please try "~/GroupList.asmx/FetchGroupIDList" instead of "http://localhost/dnn/..."

The webservice cannot be used as absolute path in javascript.

NovaSoftware ---a professional outsourcing company in China .
* More than 6 years' offshore experience in DNN
* Successfully developed 30+ websites , 250+ DNN modules, 50+ sets of Skins/Containers.
* Demo Site:http://dotnetnuke.novasoftware.com/
 
New Post
12/18/2012 11:34 PM
 

Thanks Eileen, Based on your feedback i tried it but no joy.

also i tried '../GroupList.asmx/FetchGroupIDList' , it comes with 'http://localhost/dnn/GroupList.asmx/FetchGroupIDList'  but gives "NetworkError: 500 Internal Server Error - http://localhost/dnn/GroupList.asmx/FetchGroupIDList"

But if i type http://localhost/dnn/GroupList.asmx/FetchGroupIDList?groupname=jo in the browser it gives the correct xml.

Any idea what im doing wrong here please.

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...AutoCompletion with Jquery and asmxAutoCompletion with Jquery and asmx


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out