Click to See Complete Forum and Search --> : open in current browser not new one


lcscne
10-08-2003, 01:39 PM
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);
}

pyro
10-08-2003, 01:49 PM
<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";

lcscne
10-08-2003, 02:10 PM
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.

pyro
10-08-2003, 02:20 PM
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 do not rely on JavaScript (http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts) 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...