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
- Cross-Origin Read Blocking (CORB)
- jQuery get textarea text
- How to generate a simple popup using jQuery
- What does on() in JavaScript do?
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- jQuery Ajax POST example with PHP
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- Enable Submit Comment Without Page Reload (Using Ajax)?
- Ajax Load More Posts in Category Page
- WordPress Ajax always returns a 404 error
- 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
- 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 create popup same as wordpress popup feature
- 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
- How to speed up admin-ajax.php in wordpress
- Admin Ajax and HTML5 Formdata
- Help with AJAX front end comment moderation
- Sending jsPDF documents to the server
- jQuery Ajax passing empty parameters to my function?
- WordPress customizer refresh screen after save
- Woocommerce Ajax Add cart not working
- How to test nonce with AJAX – Plugin development
- AJAX Load more on CPT returning random posts
- Scripts not appending to element in AJAX call – why?
- How would you update a frontend form with AJAX
- Why is on status span no search results?
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- AJAX request randomly stop working and returns error 400
- Making an ajax request from a different domain
- Performance optimization of tree like structure
- Return an array from get_terms and store as JavaScript array for search autocomplete
- Trouble with WordPress Ajax Login System – 302
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- Why is wp_localize_script returning false?
- How to pass parameters from jQuery ajax into PHP function?
- url – ajax loaded but no JS
- merge wp rest api query to get posts per category does not work
- Properly embed javascript into WP (using function.php) – doesn’t work?
- jQuery tabs plugin with callback to fetch data
- WP AJAX post filter > do something with empty value
- Load more posts in the same category – Ajax + Timber
- How to jQuery Ajax show new data from successful insert?
- How to disable drag-and-drop upload function in Media Library?
- Why i can’t get custom fields value or post ID via Ajax?
- Run javascript upon successfully set featured image
- Accessing an API with jQuery and AJAX
- Replace link with form to pass variables to javascript / ajax
- A carousel slideshow plugin in JavaScript
- Ajax Favorite from foreach (how to specify which result result is processed)
- Get localize of a loaded javascript
- Query data after an Ajax insert
- Refresh Gutenberg with JS for it show updated post
- How to Object.freeze wp_localize_script
- How to pass value from ajax to php in no conflict mode?
- JS global variable doesn’t update
- 400 Bad Request getting on AJAX Call
- Ajax call not working anymore
- How to echo a PHP code into WooCommerce variation product?
- How to call a function from functions.php with ajax?
- number of posts with “Load More”
- Ajax post doesnt call succes after got the response
- Get ajaxForm response value
- Jquery wrap permalink in a data-attribute?
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- Retrieve customizer value using ajax or customizer api and print the value in theme
- ‘Dehighlighting’ navigation once clicked
- AJAX admin Internal 500 error Failed to Upload
- Widget won’t work due to old JavaScript? Any ideas how to make it work? [closed]
- How react js and other Javascript Technologies works on WordPress plugin?
- Custom WP rest api endpoint only working on non https?
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- Help with jquery/ajax requests