Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening 2 new browser windows from a HTML page

Status
Not open for further replies.

guestAsh

Technical User
Feb 27, 2004
65
GB
Hi,

in my nav bar im linking to a web app on my companies intranet. im currently using:

<li class="lhnav"><a class="speciallink" href="javascript:drilldown('com.walker.ebuyer.WkrEbuyerProductClassificationHandler','OF')">I
want to buy this...</a> </li>

which uses some java script to go to a specific page in the web app, this works fine if i have the app running in the background.

but if it's not, then the user is just sent to the web apps start page.

what i need is some kind of code that fires open a new browser to start the web app and then the URL above.

i hope this is clear %-)and i hope someone can help!

thanks
Ash
 

Without seeing your drilldown function it would be hard to say for sure, but you should be able to modify it to use "window.open" to open a new window.

Hope this helps,
Dan
 
thanks.

here's the function.
<!-- start of javascript hiding
function wkrSubmit() {
if (wkrSubmit.arguments.length > 0) {
document.form1.handler.value = wkrSubmit.arguments[0];}
if (wkrSubmit.arguments.length > 1) {
document.form1.listCurrentPage.value = wkrSubmit.arguments[1];
}else{
document.form1.listCurrentPage.value = "";}
if (wkrSubmit.arguments.length > 2) {
document.form1.listEndItem.value = wkrSubmit.arguments[2];
}else{
document.form1.listEndItem.value = "";}
if (wkrSubmit.arguments.length > 3) {
document.form1.listUniqueKey.value = wkrSubmit.arguments[3];
}else{
document.form1.listUniqueKey.value = "";}
if (wkrSubmit.arguments.length > 4) {
document.form1.listSortKey.value = wkrSubmit.arguments[4];
}else{
document.form1.listSortKey.value = "";}
if (wkrSubmit.arguments.length > 5) {
document.form1.listSortField.value = wkrSubmit.arguments[5];
}else{
document.form1.listSortField.value = "";}
if (wkrSubmit.arguments.length > 6) {
document.form1.listSortDir.value = wkrSubmit.arguments[6];
}else{
document.form1.listSortDir.value = "";}
if (wkrSubmit.arguments.length > 7) {
document.form1.listBrowseDirection.value = wkrSubmit.arguments[7];
}else{
document.form1.listBrowseDirection.value = "";}
if (wkrSubmit.arguments.length > 8) {
document.form1.listRunningTotal.value = wkrSubmit.arguments[8];
}else{
document.form1.listRunningTotal.value = "";}
document.form1.submit();
}
function drilldown() {
document.form1.handler.value = drilldown.arguments[0];
document.form1.commodityGroupCode.value = drilldown.arguments[1];
document.form1.listCurrentPage.value = "";
document.form1.listEndItem.value = "";
document.form1.listUniqueKey.value = "";
document.form1.listSortKey.value = "";
document.form1.listSortField.value = "";
document.form1.listSortDir.value = "";
document.form1.listBrowseDirection.value = "";
document.form1.listRunningTotal.value = "";
document.form1.submit();
}
function openWin(newURL) {
window.open(newURL,toolbar='no',width=700,height=500,directories='no',scrollbars
='yes',resizable='yes',menubar='no',titlebar='yes');
}
// end javascript hiding -->
</script>
 

The first thing I'd do is to fix the major issues with your openWin function. You're missingthe "window name" parameter, and have no quotes around your arguments parameter:

Code:
function openWin(newURL) {
	window.open(newURL, 'yourWindowName', 'width=700,height=500,scrollbars,resizable,titlebar');
}

To get your drilldown function to open in a new window (presumably you want it to open in a window created by the openwin function)... First, you could open the new window:

Code:
openWin('about:blank');

This will create a new window with a name of "yourWindowName" (you can change this in the openWin function, obviously). Then give your form a target of "yourWindowName", and call drilldown. This should open the form in the newly created window.

Hope this helps,
Dan



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top