IIS 5 <> IIS 6, different behaviour with dynamically generated scriipts

U

Urs Vogel

Hi

In a WebApp, I use IFrame for getting back to the server without reloading
the page. The server returns a dynamically generated javascript. Ths works
fine with IIS 5.x on my deveopment machine (XP Pro SP2), but on a Win2003
Server with IIS 6.x, the browser claims 'object expected', but it runs the
returned script correctly.

I'm wondering what's causing this effect with IIS 6. When showing the
returned script in the browser, it appears to be identical with the one
generated under IIS 5. Are there any hidden characters in the

Client side

....
<layer style="VISIBILITY: hidden"><iframe id="__validate" width="0"
height="0"></iframe>
function ServerValidation(cb, id, evt) {
document.getElementById('__validate').src = null;
document.getElementById('__validate').src = 'wiz.aspx?query=' + cb + '~' +
id + '~' + evt + '~' + document.getElementById(id).value;
}
....

Server side during the Page_Load event:
....
string sSSN = this.ValidateSSN(Args(3)); // Args(3) contains the SSN
script = "<scr" + "ipt
language='javascript'>parent.document.getElementById('txtSSN').value = '" +
sSSN + "';</scr" + "ipt>";
Response.ClearContent();
Response.Write(script);
Response.Flush();
....

Any hints? Thanks.

Urs
 
K

Ken Dopierala Jr.

Hi Urs,

Nothing stands out from your code. You might want to try putting debugger;
before the javascript line:
language='javascript'>debugger;
parent.document.getElementById('txtSSN').value = '" +

Then check the parent.document.....stuff in the watch window. That might
narrow down what the browser is complaining about. Good luck! Ken.
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top