/    Sign up×
Community /Pin to ProfileBookmark

open in current browser not new one

The following code opens rep in a new browser and I want it to open in the current browser. Your saying, What are you writing code for if you don’t know something this basic?
Answer: I HAVE NO STINKIN IDEA.

function getReport(bclicked)
{
var rep
if(bclicked == “cpr”)
{
rep = “../Teacher/ClassPercentageReport.asp?RosterID=<%= Request.QueryString(“RosterID”)%>”;
}
if(bclicked == “spr”)
{
rep = “../Teacher/ProgRepMass.asp?RosterID=<%= Request.QueryString(“RosterID”)%>”;
}
var repWindow = open(rep);
}

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@pyroOct 08.2003 — <a href="somepage.htm">link text</a> would be best, as it will work for all users. If you've taken the fact that 13% of users do not have JavaScript enabled, and want to know how to do it in that: window.location.href = "somepage.htm";
Copy linkTweet thisAlerts:
@lcscneauthorOct 08.2003 — Hey Pyro,

You bring up a subject that I'm interested in. I'm by trade a network engineer that dabbles in development (no secret there with the questions I've been posting). However I've been a long time Novell man snubbing Microsoft whenever possible. Recently Novell has jumped in the sack with Linix because no developers are writing Novell services (NLMs) anymore but Microsoft and Linix services only. So Novell's master plan is to compete with Microsoft using a Linix kernal in the latest releases of their OS. Now if I have to choose between Linix and Microsoft, there is no question I'm jumping on board with "The Bill". Reason being I hold Novell (native kernal - v6 and prior) certifications as well and MS certs, the path of least resistance (least amount of learning) is towards MS.

Sorry for being long winded here but using that same "path of least resistance" philosophy while wearing my developer's hat is it better to write VBScript client-side or JavaScript client-side. I am much more comfortable with VB than JS and I don't want to devote a bunch of time learing something thats potetially on its way out. I know JS originates with Netscape and I've heard that Netscape is losing market share to "The Bill".

If you were to recommend a client-side language to a newbie, which would it be JS or VB and why?

Thanks for sticking with me here.
Copy linkTweet thisAlerts:
@pyroOct 08.2003 — I would recommend JavaScript over VB any day of any week. The reason is largly due to (but not limited to) the fact that VB only runs in IE, while JavaScript will run in other browsers. Having said that, one must be careful to make sure pages [url=http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts]do not rely on JavaScript[/url] either, for accessibility reasons.

You'll also note that if you hang around web developers for any length of time, you'll find that most of us do not tend to be big fans of Micro$oft...
×

Success!

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