Not really a WordPress related question but you could do this
// creates a object from the array, one of the properies (search) contains the query
let url = new URL('https://dev/job/?job_id=jkdbsbd45JubJKAAASSYT');
// will create a object of all availalble query properites
const urlSearchParams = new URLSearchParams(url.search);
const params = Object.fromEntries(urlSearchParams.entries());
// remove ? and everything after from url
url = url.href.substring(0, url.href.indexOf('?'));
// url + params.job_id is the final url, did a console.log so you could see it in the devtools console
console.log(url + params.job_id);
Related Posts:
- Drag and drop multiple file upload using Ajax WordPress
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- admin-ajax.php HTTP400: BAD REQUEST – The request could not be processed by the server due to invalid syntax
- WordPress AJAX Call Not Return Result
- Ajax Modal Flickers When Opened Multiple Times
- Refresh Markercluster after ajax call
- wp_mail doesn’t work when logged in?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- How to display contact form 7 form in vanilla js without jquery in frontend
- Uncaught TypeError: Cannot read properties of undefined (reading ‘message’) [closed]
- javascript onClick update user_meta from jquery.ajax
- Ajax sometimes work and sometimes just don’t work
- WordPress live search and filter
- React to AJAX adding to the page
- Download doccument on server rather than clients browser
- Javascript output now showing in custom widget
- WordPress Ajax send response on every iteration of a loop
- AJAX call not initializing for non-admins in WordPress
- Cross-Origin Read Blocking (CORB)
- My javascript is returning this error: $.ajax is not a function
- ajax jquery simple get request
- jQuery AJAX cross domain
- Set timeout for ajax (jQuery)
- jQuery AJAX submit form
- How can I upload files asynchronously with jQuery?
- Adding images to a Bootstrap Carousel with AJAX
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- JavaScript implementation of Gzip
- Is there a JavaScript API? How to access public and private data in JS?
- How to HTML5 FormData Ajax
- jQuery UI Datepicker not working
- Custom PHP endpoint for a plugin’s AJAX call
- How to link WordPress heartbeat to ajax form
- WordPress Ajax Login without page reload
- jQuery Autocomplete not working with wp_localize_script
- How to securely add an Ajax button to a WP Admin page?
- Vue.js + AJAX Shortcode
- WordPress loads whole jQuery UI library
- How do I get my page to load the jQuery UI Effects library?
- AJAX issue – Uncaught SyntaxError when processing Zip File
- Display notification only once
- wp-admin AJAX with Fetch API is done without user
- Call javascript function when category was added via ajax
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- How to add WP API and JS featured image attachment
- Ajax return code 400
- class click counter save number
- WordPress Admin AJAX Serialize
- Show Post Content with AJAX
- Rhyzz Repeatable-fields javascript in php and wordpress
- How to search using ajax for exact phrase or words in an input field?
- Setting value of session with Ajax not working
- videopress videos are not displayed when loading the content with ajax in a lightbox
- Bad request 400 from custom ajax call
- WordPress Ajax Call inserting data but success response false
- How to return multiple arguments from AJAX callback function
- 403 error When i send ajax request on WordPress website
- AJAX jQuery post frontend returning failed to load resource status 400
- Problems with wordpress nonces in Ajax call
- Get post content and show it in a div
- Output multi-steps form results in same page
- Full Front End, AJAX comment system and comment reply script
- Making POST request with AJAX returns a 400 error (without jQuery)
- Is there a better way to access transients using javascript
- Screen Options JavaScript Code
- Is there some jQuery conflict here?
- Get uploaded attachment width & height and attachment ID after upload them
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Updating failed. The response is not a valid JSON response. specific to my browser when I include javascript in my html
- Refresh checkout fields on add to cart with order bump
- Running JavaScript after using WooCommerce Filter Plugin
- how to make sure js is enabled before executing php function
- ERROR while passing data from JS to PHP via AJAX
- My function containing a mysql query launched by ajax is not working in wordpress. What am I missing?
- jQuery AJAX url wit variable
- How to pass array from jQuery to PHP with AJAX in WordPress?
- Using existing ajax data that is loaded into page
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- How to safely pass post_id and user_id via AJAX to the backend (prevent user from changing it via JS)?
- Can’t get next post info with ajax
- Multiple Notifications SetInterval
- How to inject data content from external json into a modal, using UIkit?
- Ajax by worpdress affects called jquery inside template file
- AJAX form not working, still reloads on submit
- Orderby post__in Not Working Correctly?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Ajax WordPress pass post URLs
- Session variables lost during Ajax calls – WordPress – Sage Starter Theme
- 500 (Internal Server Error) of external php file
- Displaying contents of a tab
- Ajax, jQuery and WordPress
- Dynamic Gallery
- Bad Request when adding new post via ajax form
- Using Javascript Callback from plugin in a theme
- Load css classes after using ajax calls
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- Running js in html code with same content
- How to get current_user_id from wordpress in node js?
- How to update my jquery/PHP function to add/remove user as favorites in (WordPress) users list