Ask Your Question
4

How can I reference the estimated time from another URL within the same domain?

asked 2021-09-19 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-21 12:00:00 +0000

bukephalos gravatar image

You can reference the estimated time from another URL within the same domain by using the following steps:

  1. Retrieve the estimated time from the other URL using JavaScript or any other programming language.

  2. Set the estimated time value in a variable.

  3. 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".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-09-19 11:00:00 +0000

Seen: 7 times

Last updated: Mar 21 '23