The problem is with your jQuery selector:
var usr = $("#site-addres-input").attr('value');
Will get the default value of the input element. Typically this will be blank, because you’re not setting it ahead of time. You need to use:
var usr = $("#site-addres-input").val();
I’m also noticing that you’re using #site-addres-input, but “address” has two s at the end. Not sure if this is also causing you a problem or not …
Related Posts:
- Ajax Redirect role = ‘Editor’ to their Dashboard after register
- How to check username availability with ajax at registration
- (updated) How to add AJAX error handling to a (fully) custom registration form?
- How to make registration form ajax?
- WordPress is creating nonce as a logged in user but verifying it incorrectly
- Register Template
- Add Server Side validation in Ajax mail form
- Registration form AJAX check for existing username (simple version)
- how to get password from user instead wp-generate-password
- jQuery: Performing synchronous AJAX requests
- Best way to end WordPress ajax request and why?
- Update user meta using with ajax
- WordPress function that makes HTML safe to be sent via AJAX request
- admin-ajax.php returns 0. How do I debug it and fix it?
- Detecting post type within init action
- Basic question on passing variables to AJAX in WordPress
- Metabox cloning via Admin Ajax call issue
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- Cannot update my options using wp_ajax
- ajax and nonce when JavaScript is in a seperate file
- Prevent wp_debug from polluting ajax within plugin
- How to localize inline script called with ajax
- Conditional Ajax inclusion
- Is there a maximum length to user passwords?
- Load ajax if is_home()
- How to know what page is calling admin-ajax.php?
- Populate a Map at The Same Time as showing Posts via AJAX
- wp_localize_script not working on ajax response
- Why Does WordPress not output admin-ajax.php path by default?
- SSO autologin WordPress + Ajax
- Test WordPress api with postman
- How to process wordpress ajax call without action parameter?
- All AJAX requests return a 400 error
- Unable to successfully verify nonce
- Create custom POST Method URL
- POST Ajax bad request
- Getting a variable using $post ajax back from php to js response in WP
- AJAX Call – Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- WordPress is Not Setting PHP $_POST on Custom Ajax
- bulk update meta value with ajax
- Ajax Validation for reCaptcha
- Ajax for subscibers not working
- javascript ajax and nonce
- Is it possible to determine whether a page is a page template by page_id in ajax call?
- Chained ajax call, second call returns 0
- How to create a form button that executes a function?
- How to stop being directed to admin.php after sending request to admin-ajax.php
- 200 return code on ‘POST /wp-admin/admin-ajax.php’ while NOT logged in
- i’m trying to get all my media query attachments via ajax in wordpress
- Distinguish between 2 instances of admin-ajax.php
- How to update post with Ajax (no plugin)
- Next Ajax call doesn’t work
- Ajax page load without reload
- need a confirmation text to appear on email submission
- Including ‘wp-load.php’ after another include() generates an error
- How to make pages that arent indexed for ajax applications
- Why does reCAPTCHA v3 return 0 ? In custom AJAX registration form
- admin-ajax.php 400 bad request
- WordPress Ajax Page Load to skip embedded iframe
- edit user input data contact form 7
- WordPress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start
- Set cors header for ajax requests
- Simple AJAX code that refreshes every x seconds?
- How to keep scripts persistent during admin-ajax process when saving widget?
- Very weird bug: Ajax for non-admins
- Search function – problem with whole words
- jQuery ajax method does not return data
- WordPress 403 error on form submission with Ajax
- I am getting Admin-ajax.php 400 Error
- Ajax and get_template_part
- Ajax is not defined
- Get posts by category via ajax
- Download doccument on server rather than clients browser
- How to require files in a custom endpoint
- Load oEmbed iframe within ajax call
- Adding pagination to Ajax Query
- WordPress 4.9.6 – IncludeMe & getAjax GET using wrong URL
- Create secondary Archive page format?
- Get post details with pure javascript ajax
- WorddPress website admin part not working correctly – I think ajax/json issue
- check_admin_referer fails on new AJAX plugin uninstall with “Are you sure you want to do this?”
- Ajax Security regarding user priviliges and nonces
- How to populate data from JSON using AJAX in TypeScript? [closed]
- Filter and validate user role in registration
- Use ajax without a plugin?
- Weird admin-ajax.php problem
- Ajax contact form returnig 0
- Know which script/page is being called by ajax call
- Trying to send AJAX data to WordPress hook
- wp_enqueue_media problem
- Can’t update WP Editor after Ajax
- Update user meta using Ajax on front end?
- retrieving page content per AJAX [duplicate]
- Posting to loop.php file
- Can’t access data from database using AJAX
- $wpdb Ajax not redirecting to main page
- Custom WP rest api endpoint only working on non https?
- Blocking admin-ajax.php from outside domain
- Object name undefined using localize script
- Help with jquery/ajax requests