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
- JQuery UI Autocomplete/Autosuggest WordPress
- How to show custom fields in modal in category page
- How to make Contact Form 7 work when injected via AJAX in WordPress?
- Cross-Origin Read Blocking (CORB)
- Cross-Origin Read Blocking (CORB)
- syntax error: unexpected token <
- Infinite Scrolling in Asp.Net MVC with jQuery / AJAX Issues
- My javascript is returning this error: $.ajax is not a function
- ajax jquery simple get request
- jQuery get textarea text
- jQuery AJAX cross domain
- Set timeout for ajax (jQuery)
- How to generate a simple popup using jQuery
- What does on() in JavaScript do?
- jQuery AJAX submit form
- jQuery Ajax File Upload
- How can I upload files asynchronously with jQuery?
- Adding images to a Bootstrap Carousel with AJAX
- AJAX response error: net::ERR_EMPTY_RESPONSE
- Access Control Request Headers, is added to header in AJAX request with jQuery
- keycode 13 is for which key
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- jQuery Ajax POST example with PHP
- Refresh/reload the content in Div using jquery/ajax
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- JavaScript implementation of Gzip
- How to manage a redirect request after a jQuery Ajax call
- jQuery: Performing synchronous AJAX requests
- FormData append not working
- Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined
- Download a file by jQuery.Ajax
- jQuery’s .on() method combined with the submit event
- Ajax success function
- Is there a JavaScript API? How to access public and private data in JS?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Ajax Load More Posts in Category Page
- How to HTML5 FormData Ajax
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- Ajax call does not activate callback function
- jQuery UI Datepicker not working
- JqueryUi Dialog giving Uncaught TypeError: this._addClass is not a function error
- How to properly use wp.ajax.post?
- WordPress Ajax always returns a 404 error
- Custom PHP endpoint for a plugin’s AJAX call
- How to link WordPress heartbeat to ajax form
- Refused to execute script from ‘***’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled
- WordPress Ajax Login without page reload
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- AJAX Implementation
- Trying to get single posts to load on the front page via ajax
- Dynamically changing navigation links (next and previous) via AJAX
- jQuery Autocomplete not working with wp_localize_script
- Problems with creating sortable sections in customizer
- jQuery UI Autocomplete showing all results
- Ajax not firing properly using Firefox, but works in Chrome
- How to securely add an Ajax button to a WP Admin page?
- Quick Edit: Selected Custom Taxonomy Not Refreshing After Save
- Vue.js + AJAX Shortcode
- WordPress loads whole jQuery UI library
- How to Use JSON With AJAX?
- fetching via fetch/ajax gutenberg block data from third party
- Using wp_ajax and wp_ajax_nopriv hooks
- ajax and nonce when JavaScript is in a seperate file
- How do I get my page to load the jQuery UI Effects library?
- AJAX issue – Uncaught SyntaxError when processing Zip File
- How to create popup same as wordpress popup feature
- Click loads template via ajax
- Ajax with jQuery UI dialog not working
- Nonces, AJAX, script variables & security in WordPress
- Extending wp JavaScript base class to make a post request to a custom REST endpoint
- Display notification only once
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- How to localized one js file for different actions?
- wp_ajax unauthenticated and authenticated
- wp-admin AJAX with Fetch API is done without user
- WordPress ajax function parameter value not being passed
- How to speed up admin-ajax.php in wordpress
- Admin Ajax and HTML5 Formdata
- Call javascript function when category was added via ajax