You can reference the estimated time from another URL within the same domain by using the following steps:
Retrieve the estimated time from the other URL using JavaScript or any other programming language.
Set the estimated time value in a variable.
Reference the variable to display the estimated time on your current page.
For example, if your estimated time is stored in a variable called "estimatedTime" on URL "example.com/estimated-time", you can reference it on URL "example.com/current-page" by using the following code in JavaScript:
var estimatedTime;
$.get('example.com/estimated-time', function(data) {
estimatedTime = data.estimatedTime;
});
document.getElementById('time-display').innerHTML = estimatedTime;
In this code, the estimated time is retrieved from the other URL using the jQuery $.get()
method, and the value is stored in the estimatedTime
variable. The estimated time is then displayed on the current page using the innerHTML
property of an HTML element with an ID of "time-display".
Asked: 2021-09-19 11:00:00 +0000
Seen: 8 times
Last updated: Mar 21 '23