Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 27th, 2007, 04:57 AM
Authorized User
 
Join Date: Jul 2006
Location: Mumbai, , India.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript Not working

Sir,
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,
Sohrab

  #2 (permalink)  
Old April 27th, 2007, 08:17 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

-Peter
  #3 (permalink)  
Old April 29th, 2007, 10:59 PM
Registered User
 
Join Date: Apr 2007
Location: Mexico DF, , Mexico.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to elmemo
Default

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')"

  #4 (permalink)  
Old May 5th, 2007, 06:04 AM
Authorized User
 
Join Date: Jul 2006
Location: Mumbai, , India.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

how should i open new window when popups are blocked.

  #5 (permalink)  
Old May 5th, 2007, 12:42 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

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

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working JavaScript Regex vinaura Javascript How-To 0 August 16th, 2007 01:06 PM
working with DLL event, method in JavaScript hendyhanusin Javascript How-To 0 March 23rd, 2007 05:12 AM
working with DLL event, method in JavaScript hendyhanusin Javascript 0 March 23rd, 2007 04:54 AM
Working with Forms and Date in Javascript danieljava Pro JSP 1 January 16th, 2006 05:56 AM





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