Simcy Creative
  • What is Simcify
  • Requirements
  • Getting Started
  • Javascript Functions
    • Simple js Functions
    • Interaction Functions
      • Loader
      • Notifications
      • Credit Card Form
    • Helper Functions
      • Random
      • Cookies
      • Send to server(Ajax)
      • Server Responses
    • HTML helpers
      • Form Processing
      • Send onClick
      • Send onChange
      • Fetch & Display
      • Dropify
      • Switchery
      • Crop Image Input
      • Image Preview
  • PHP Functions
    • Introduction
    • Setup
    • Authentication
      • Login
      • Register
      • Forgot Password
      • Reset Password
    • Configuration
    • Email & SMS
      • SMS
        • Africa's Talking
        • Twilio
      • Email
    • Files Manager
      • Upload
      • Delete
Powered by GitBook
On this page
  • Usage
  • Parameters
  • Response
  1. Javascript Functions
  2. Helper Functions

Send to server(Ajax)

Sending data to server is a must in every web applications and we have created a simple way to do that using Ajax.

Only POST method support now.

Usage

Here is sample usage;

server({
    url: "https://example.com/server",
    data: {
        name: "John Doe",
        email: "john@example.com",
        phone: "1223455"
    },
    loader: true
});

Parameters

This function has only one object parameter that is required

Parameter

Required

Type

Description

url

Yes

string

The url to send data.

data

Yes

object

An object with your data.

loader

No

boolean

whether to show loader while sending data or not.

Response

Responses should be JSON, please refer to the server response page for more information.

PreviousCookiesNextServer Responses

Last updated 6 years ago

Server Responses