Client script not working on XP

P

Parrot

I am using a client startup script in my web page to display some data from
my Calendar control in C#. I uploaded the new web page to my server and it
runs fine when I pull up the web page from my Vista computer. However, if I
try to bring up the web page from another computer that has XP it does not
work. The script has the following format:

ClientScript.RegisterStartupScript(this.GetType(),
"Popup", scriptText", true);

Can anyone tell me what is missing on my XP computer that prevents the
script from working? I am using Net Framework 3.5 and developed with Visual
Studio 2008. It appears to me that Net Framework 3.5 has to be installed on
the client side computer in order for the script to work. Is that true? If
so, how do I install NET 3.5 on all of my viewers computers? There has to be
another answer.
Dave
 
N

Nathan Sokalski

No, the .NET Runtime does not need to be installed on the client in order
for the script to work, it only needs to be installed on the webserver
(that's where the .NET code is being executed). What gets sent to the client
is simply html and JavaScript generated by the webserver, the same stuff you
see when you do a View Source. I am guessing that your problem is browser
related. Are all the machines using the same browser and version of that
browser? Do the browser settings on any of the machines restrict scripts in
any way? On the XP machines, does it give an error or just ignore the script
(in other words, does the rest of the page show)? If it does give an error,
what is that error? Hopefully some of this will help you find the solution,
if not, post the answers to these questions here and maybe someone can help
you more then. Good Luck!
 
P

Parrot

Thanks to both replies. I found out that the problem is that I have a popup
blocker set to on for the computers in which the script does not work. I
don't understand this because I have used the following script hard coded in
another web page and it isn't blocked yet if I use the same script in the
RegisterStartupScript it is blocked. The script code I used is as follows:

string scriptText = "printWindow = window.open('','','width=400,
height=400');";
scriptText += "printWindow.document.open();";
scriptText += "printWindow.document.write(\"<html><head><body>Some
text</body></html>\");";
scriptText += "printWindow.document.close();";
cs.RegisterStartupScript(this.GetType(), "Testwindow", scriptText, true);

If I change true to false in the RegisterStartupScript argument, nothing
displays at all. So my question is how can I write the script so it can
bypass a popup blocker?

Dave
 
P

Parrot

Mark;

I did post my question onto another forum. I can understand why popup
blockers will stop my script but why does it not stop the script that is hard
coded in another web page that I have successfully executed without being
blocked.
Dave
 

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

Top