gs.setRedirectURL(window.top.location = "https://"+document.domain+"/nav_to.do?uri ----document.domain mean?

Kiddy1
Tera Contributor

gs.setRedirectURL(window.top.location = "https://"+document.domain+"/nav_to.do?uri ----

window.top.location?mean

document.domain mean?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kids,



What information you need. Do you need difference in those?


javascript - Difference between window.location.href and top.location.href - Stack Overflow



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

no i need to know what do they mean in the url


antin_s
ServiceNow Employee
ServiceNow Employee

Hi kiddy,



Please find the below snapshot which explain all 3 of them.



find_real_file.png




document.domain - Get the domain name of the server that loaded the document


window.location.href - Get the location of the current page.


top.location.href - Within the windows of the current page, get the location of the top window. If there is no parent, it returns the current window.



Hope this helps. Mark the answer as correct/helpful based on impact.



Thanks


Antin