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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up window

Status
Not open for further replies.

abyinsydney

Programmer
Feb 17, 2004
99
AU
folks

how do i accomplish this task that on clicking on this hyper link a pop page appears i go to the poppuppage within a new window

on clicking on the following code i 'm navigating in the same window please help
dream weaver has the functionalit target"_blank which on embedding takes u to a new [age how to embed this functionality


<% out.println("<a href=poppup.jsp?date=" +date+ ">" +narrative+ "</a>");%>

aby
 
You do it in java script :

Code:
<html>
<head>
<script language="JavaScript">
  function doNewWindow(sUrl, sTitle, sStyle, iWidth, iHeight ) {
    var iLeft=200;
    var iTop=200;
    if ( iWidth !="" )
    {
        var screenWidth =screen.availWidth - 10;
        var iLeft=(screenWidth-iWidth)/2;
        sStyle=sStyle+",left=" + iLeft + ",width=" + iWidth;
    }
    if ( iHeight !="" )
    {
        var screenHeight = screen.availHeight - 30;
        
        if ( iHeight >= screenHeight )
            iHeight = screenHeight - 50;
        
        var iTop=((screenHeight-iHeight)/2 );
        sStyle=sStyle+",top=" + iTop + ",height=" + iHeight;
    }

    wOpen = window.open(sUrl,sTitle,sStyle);
  }
</script>
</head>
<body>
  <table><tr><td onclick="doNewWindow('[URL unfurl="true"]http://whatever.com','newPage',[/URL] 'menubar=0,scrollbars=0,resizable=0,toolbar=0', '600','600')">Click Here</td></tr></table>
</body>
</html>
 
sedjyou can do htis if you are opening a blank window and notpassing any variable ans session variables
my a href iis

<% out.println("<a href=poppup.jsp?date=" +date+ ">" +narrative+ "</a>");%>


i think caanot use java scrip for this

bayu
 
Apply some of your own logic and try it out !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top