ASP.NET Javascript Caching Problem

B

Barney

1) I have an aspx page for customer details, opened using
showModalDialog (i know, i know, but I inherited it and it's too
integrated to change at this point).

2) This aspx page has some inputs on it, and some javascript that
opens another page (address lookup using postcode/zipcode) using
showModalDialog, passing "this" in as the dialogarguments parameter.

3) The postcode dialog refreshes itself as necessary to allow the user
to find the address they want, and when they finish it's "wizard", it
tries the following (excerpt):

// Update the caller with the values
if (top.dialogArguments)
{
var caller = top.dialogArguments;

var targetItemName = document.getElementById("targetItemName").value;

var address1 = caller.document.getElementById(targetItemName +
"_txtAddress1");
var address1Local =
document.getElementById("selectedAddressFields_txtAddress1");

if (address1 != null && address1Local != null)
{
address1.value = address1Local.value;
}
}

close();

Expected Result:
The customer details page has it's form values updated by the address
finder page, just before it closes.

Actual Result:
window.dialogArguments returns "undefined".

I've tried the following to resolve this:

1) Delete IE temporary internet files.
2) Delete VSWebCache in My Documents.
3) Delete ASP.NET Temporary files in Windows\Microsoft.NET\... etc

Various test pages all worked ok, including creating a "dummy" customer
details page, using the same address lookup page, opened using copied
javascript.

The root cause is the customer details popup, for some reason doesn't
pass the dialogarguments properly.

I then tried creating a new popup, called CustomerDetailsTest.aspx,
copied and pasted every last line of code in (modifying class names
etc, obviously).

AND IT WORKS!!

But still, the old page does not.

It's only javascript, there's no server-side here, and it's not to do
with the address popup refreshing before attempting to update the
fields, because in my test examples it works.

CAN ANYONE HELP???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top