jquery to 1C via Http-Service

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

Hi,

Firstly, in new year I wish you get success in your life.

I wonder how will be the jquery code to access publicated 1C http service, even if 1C has autorization users and passwords? Is there possibility to publicate a little example?

 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

Murat Yazlıyev,

1C HTTP-services works like regular http-links.

Code
<!DOCTYPE html>
<html dir="ltr" lang="ru-RU">
    <head>
        <meta charset="UTF-8" />
        <title>jQuery test</title>
        <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
    </head>
<body>
<script>
$.post("http://localhost/we/hs/test",
    {username:"admin",pass:"123",submit:true},
    function(data, textStatus, jqXHR)
    {
        alert(data);
    }).fail(function(jqXHR, textStatus, errorThrown)
    {
        alert(textStatus);
    });
</script>
Here some text
</body>
</html>

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.