p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   Javascript Not working (http://p2p.wrox.com/showthread.php?t=57194)

sohrabus April 27th, 2007 04:57 AM

Javascript Not working
I have a Website and in that I'm using JAVASCRIPT to open New window as under:

Response.Write("<script>window.open('frmPurchase_O rder.aspx', 'Purchase','status=yes,scrollbars=yes,toolbar=no,m enubar=no,location=no,resizable=0, maximize=yes, height=518, width=800,top=0,left=0')</script>")

In 1 company there r 2 Computers Both r having InternetExplorer.
From 1 Computer Javascript is working n user is able to open new window on button click.

But from second computer New window is not opening (javascript doesnot work). Actually nothing happens when button is clicked, user is on the same page.

Sir Pls. advise me what setting i should make in browser or in js.
Awaiting ur kind reply,

planoie April 27th, 2007 08:17 AM

Aside from the fact that you shouldn't be using "Response.Write()", it sounds like you need to trouble shoot the browsers. Does one have javascript turned off? Are there security settings preventing javascript from running?

You should consider using the ClientScriptManager.RegisterStartupScript Method instead of "Response.Write()" for putting scripts onto the page.


elmemo April 29th, 2007 10:59 PM

I agree with planoie. It sounds like one of the browsers has javascript turned off (in internet explorer you can activate javascript under internet options in the "advanced" tab (look for "scripting"). If all you want is to open a new window then ClientScriptManager.RegisterStartupScript will be overkill, just alter the html button so that its "onclick" attribute will execute the javascript code to be called written inside. Inside the button's html tag, you need an attribute that looks like onclick="window.open('frmPurchase_Order.aspx', 'Purchase', 'status=yes, scrollbars=yes, toolbar=no, menubar=no, location=no, resizable=0, maximize=yes, height=518, width=800, top=0, left=0')"

sohrabus May 5th, 2007 06:04 AM

If Google Toolbar is instaled on the client computer. it blocks popups.

how should i open new window when popups are blocked.

gbianchi May 5th, 2007 12:42 PM

mmm.. that's not all the work from the blocker?? to prevent opening windows???



================================================== =========
Read this if you want to know how to get a correct reply for your question:
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
================================================== =========

All times are GMT -4. The time now is 11:24 PM.

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