/    Sign up×
Community /Pin to ProfileBookmark

Open link in same window

Hi,
How do I get the link below to open in the same window.
What do I change window.open to so that it acts like
<a href=”whatever.com” target=”self”>link</a>?
Thank you.

<script type=”text/javascript”>
<!– Array to change link to correct month. January = 2113340 –>
function linkdate() {
var monthname = new Array(‘2113340′,’2113358′,’2113423′,’2113429′,’2113436′,’2113476′,’2113143′,’2113152′,’2113157′,’2113194′,’2113239′,’2113246’)
var date = new Date()
window.open(“http://thpinfolinkdm/intradoc/groups/infolink/documents/infolink/”+monthname[date.getMonth()]+”.hcst”)
}
</script>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@mjdamatoAug 06.2007 — Change window.open to document.location
Copy linkTweet thisAlerts:
@paulyauthorAug 06.2007 — Thanks, but this gives me an error stating this object doesn't support this action.
Copy linkTweet thisAlerts:
@mjdamatoAug 06.2007 — Sorry, here is the correct format:

document.location.href='http://www.domain.com';
Copy linkTweet thisAlerts:
@paulyauthorAug 06.2007 — Thanks mjdamato - That works!
×

Success!

Help @pauly 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.20,
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,
)...