Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| 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
 
Old July 11th, 2008, 01:00 AM
Authorized User
 
Join Date: Nov 2005
Location: Colombo, , Sri Lanka.
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript isnt work well on my aspx page

Hi ,

I used java script for open popup window and pass value from popup window.



This is my Popup open script

string url = "../../Default2.aspx";

string popup = "<script language='javascript'>" +
"window.open('" + url + "', 'CustomPopUp', " +

"'width=600, height=450, resizable=yes')" +
"</script>";

Page.RegisterStartupScript("Popup", popup);



This javascript work well. My secon javascript used for send value to my parent page and close my popup window. This script isnt work well. Please help me to solve it.

string aa = "aaaa";
string popup = "<script language='javascript'>" +

"window.opener.document.getElementById('TextBox1') .value = '" + aa + "'; " +
" window.close();" +

"</script>";

Page.RegisterStartupScript("Popup", popup);







Thanks


MSB
__________________
MSB
 
Old July 11th, 2008, 08:00 AM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

i'm no java expert but i think you want to name your pop up windows 2 different things....


string url = "../../Default2.aspx";

string popup = "<script language='javascript'>" +
"window.open('" + url + "', 'CustomPopUp', " +

"'width=600, height=450, resizable=yes')" +
"</script>";

Page.RegisterStartupScript("Popup", popup);

string aa = "aaaa";
string popup = "<script language='javascript'>" +

"window.opener.document.getElementById('TextBox1') .value = '" + aa + "'; " +
" window.close();" +

"</script>";

Page.RegisterStartupScript("Popup", popdown);

Jason Hall




Similar Threads
Thread Thread Starter Forum Replies Last Post
RssReader web parts now work on Default.aspx ewelling BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 12 October 6th, 2007 07:01 AM
Javascript with aspx page zaheerabbas.sk ASP.NET 1.0 and 1.1 Professional 2 April 4th, 2007 11:36 PM
Ex 401 isnt working right xlr8 BOOK: Beginning C# 2005 Databases 3 March 2nd, 2007 08:34 PM
Javascript Works Fine in Aspx page but... vivek_inos Javascript 0 June 14th, 2006 01:57 AM
can anyone see why this isnt working? ldavis Classic ASP Databases 0 January 5th, 2006 10:59 PM





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