Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] New Window opening help?


  • From: javascript@xxxxxxxxxx (Peter Brunone)
  • Subject: [Javascript] New Window opening help?
  • Date: Fri, 18 Oct 2002 12:20:15 -0500

    You can override browser caching like that by adding a random parameter
in the URL.  That is, instead of just

DispPackerStatement.asp?StatementId=hfjd36423684823

, you could call

DispPackerStatement.asp?StatementId=hfjd36423684823&timestamp=1223213

, where timestamp is just the current time in seconds or something else that
changes.

    For a timing script, you can use the setTimeout function in conjunction
with your own function (anybody else having flashbacks?), like this:

<script language="javascript">
var i = 0;
function getReport() {
 i++;
 if(i==5) { // wait five seconds
    window.open('<%=strAddress%>' ,'ncal<%=i%>', 'scrollbars=yes,status=yes,
location= yes,width=580,height=560');
  }
 setTimeout("getReport()",1000);
 }
</script>

Cheers,

Peter

----- Original Message -----
From: Rahman, Moklesur
To: 'javascript@xxxxxxxxxx'
Sent: Friday, October 18, 2002 11:58 AM
Subject: [Javascript] New Window opening help?


Hi,
Help wanted for the follwoing:
I am opening several new Windows using JavaScript with
different addresses that is dynamically generated. the addresses
looks like:

DispPackerStatement.asp?StatementId=hfjd36423684823

With the Statementd being different in different windows.

The Javascript can open the window with different addresses. The new
windows show Crystal reports that is generated using Stored
Procedure. My Problem is that after the windows are opened, they all
have the same content. But if I Refresh them, they will have correct
content.

Anybody knows how to make the windows show correct content without
Refreshing them?

Another question is: Can I program the browser using Javascript to wait for
few minutes
before opening a new window?

Thanks,
-Mokles

The script is like:

for i = 0 to UBound ( aryStatementId )
strAddress = "DispPackerStatement.asp?StatementId=" & trim(
aryStatementId(i))
%>
<SCRIPT LANGUAGE="JavaScript">

window.open( '<%=strAddress%>' ,'ncal<%=i%
>', 'scrollbars=yes,status=yes, location= yes,width=580,height=560');

</SCRIPT>

<%
Next
%>