/    Sign up×
Community /Pin to ProfileBookmark

window.top.navigage question

I have the following code:

[code]
<%if strDuplicateLine = “DiffOrder” then%>
<Script Language=”JavaScript”>
<!– Begin
var strURL = frmGeneral.hidURL.value;
var strURLNewOrder = frmGeneral.hidURLNewOrder.value;

window.open(strURLNewOrder);
window.top.navigate strURL;
// End –>
</Script>
<%else%>
<Script Language=”JavaScript”>
<!–
var strURL = frmGeneral.hidURL.value;

window.top.navigate strURL;
–>
</Script>
<%end if%>
[/code]

I get the error:

Expected ‘;’

for my testing, it is doing the second part of the if then statement, but I suspect it is incorrect on both sides. What is wrong with my code?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@dzirkelbauthorOct 23.2007 — I have this fixed...the code I was using was vbscript opposed to javascript, the correct code is:

top.location = strURL;

thanks!
Copy linkTweet thisAlerts:
@harumphOct 23.2007 — I've always seen it as window.top.navigate(strURL);
×

Success!

Help @dzirkelb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...