Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 June 17th, 2005, 09:06 AM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Asp.Net/Java/User Control Problem

 Hi There! Starter question... I have a web form (main.aspx, loaded with several controls) and in it a IFRAME that contains my child.aspx.
Now, when I click on my button on "child.aspx" I need to raise an click event on one of the controls in the main page.

To do that I used a little JavaScript.

Button click event in child....

Page.RegisterStartupScript("getParent", "<script language='javascript'>getParent( )</script>")


Then, JavaScript on child.....

Function getParent(){

window.parent.clickMyButton(); // this line could go in the page.registerS....... to skip this step
}

And, the JavaScript on the parent.....

Function clickMyButton(){
document.getElementById( 'myButtonControlName' ).click();
}

No I'm I'm having a error on the parent page: document.getElementById () is null or not an objetc.
I'm passing the control name: MapControl1.
The web page I'm tring to modify is: http://www.eauclairedevelopment.com/...ty_search.html
The part with map legend are my Main.aspx, the property search is my child.
When I click on Search, I want to display the results + refresh the draw on top -> Calling the event Image_Click on the parent page.
I'm a begginer with java, so I'm wondering if I can use a java function to call directly my Sub Image_Click (in my MapControl1 control).

Any ideas?


 
Old June 17th, 2005, 02:46 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Just to verify something: Is this the *exact* script?

Function clickMyButton(){
document.getElementById( 'myButtonControlName' ).click();
}

If so, "Function" should be "function".

-Peter
 
Old June 17th, 2005, 03:03 PM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi There, Peter!

Thanks for your help! I found my way around the problem... instead of calling the 'button click', I called another Java function in the user control... and I fixed the Function -> function.

THANKS








Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use asp.net we user control on asp 3.0 web i_shahid Java Basics 2 January 8th, 2008 09:04 AM
using asp.net web user control in asp 3.0 App i_shahid Classic ASP Professional 0 January 8th, 2008 07:32 AM
User Control Not Fired in ASP.NET 2.0 jwang709 BOOK: ASP.NET Website Programming Problem-Design-Solution 0 April 17th, 2006 03:07 PM
odbc user dsn in asp.net problem with code ashu10dec ASP.NET 1.0 and 1.1 Professional 0 February 23rd, 2006 09:49 AM
using jscript in with a .net user control Morrislgn Javascript How-To 0 April 2nd, 2004 12:41 PM





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