Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 24th, 2004, 08:58 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default refresh

Hi,
I've got a problem
I have an asp page with a button.
When I click the button it calls a javascript function which use a window open to open an excel spreadsheet.
This works fine, but if I change the spreadsheet and I click the button again it doesn't reflect the last changes.
Why is that?

Thanks in advance

Reply With Quote
  #2 (permalink)  
Old March 24th, 2004, 09:05 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Can we see a minimal example of the code you're using?

--

Joe
Reply With Quote
  #3 (permalink)  
Old March 24th, 2004, 09:11 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<html>
<head>
<javascript language="javascript">
function nav()
{
var a=window.open
("http://localhost/dashboard/dashreport/current/testmarc0704.xls")
}
</script>
</head>
<body>
<input type="button onclick="nav()">
</body>
</html>

Reply With Quote
  #4 (permalink)  
Old March 24th, 2004, 09:54 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

It's probably because your browser has cached the page. You can try two things. Go to Tools|Internet Options|General Tab - middle section - settings. Change to 'every time you visit page'.
Or add a query string to the url:
Code:
function nav()
{
var sBaseUrl = "http://localhost/dashboard/dashreport/current/testmarc0704.xls";
var dt = new Date();
var iRandomInt = dt.valueOf();
var sFullUrl = sBaseUrl + "?q=" + iRandomInt;
var a=window.open(sFullUrl);

}
--

Joe
Reply With Quote
  #5 (permalink)  
Old March 24th, 2004, 10:29 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It works.
Thanks a lot for your help.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
refresh crmpicco HTML Code Clinic 7 January 31st, 2005 09:43 PM
Refresh surendran Javascript 7 August 3rd, 2004 05:31 AM
refresh kilika VBScript 0 September 16th, 2003 01:41 PM



All times are GMT -4. The time now is 01:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.