I have a script that opens a hyperlink with a variable to pull up the particular account on the intranet. However, if the "module" is open already (80% of the hyperlink is the same), I would like to just keep the same tab/window open and refresh it.
Right now my Vbscript merely uses the script host and opens in a new tab each time. Since the user may have multiple tabs open, I'm not sure how to indentify if they have the link I want open and then use that window to refresh the data.
Begin pseudocode Script Sub
dim LINK as string
dim variableHere as string
LINK = "link/section/comments.aspx/account=" & variableHere & "&SID=11111"
variableHere = APIAccountNumberAccessed
IF ("link/section/comments.aspx/account=" exists)
then open hyperlink in same tab: LINK
else open in new tab
End IF
End pseudocode Sub
UPDATE:
I've made some progress in identifying that one can use the Window.Open method to set the target name and open a link. However, I'm still getting an error.
Syntax
set varWindow = Window.Open "google.com", "targetName", "toolbar=no, menubar=no, location=no, directories=no"
This provides me with the error expected end of statement, error code 800A0401, right in the Window open line. Still can't get past this part.