473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Problem calling dynamic javascript function

I am using remote scripting to call a .NET page within a main page. The
child page (child.aspx) returns html that contains dynamically created
javascript methods (function test()).

The parent page sets a document item's innerHTML property to the result of
the child page. This all works fine, except that the parent page also makes
a call to the "test()" method that is contained within that innerHTML. The
call is made after the innerHTML results are returned, yet a javascript error
occurs stating that the call to "test()" is an invalid object.

It is obvious that for some reason the parent window's javascript is not
recognizing the function definition that was returned by the child page. How
can I get this method to be recognized?
Nov 19 '05 #1
1 2751
copying innerHtml does not copy the script blocks, as the parsed html does
not contain any javascript (except for in attributes like onclick).

you will need to copy the script block, or call the method off the child
frame
-- bruce (sqlwork.com)


"Jamie" <Ja***@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
I am using remote scripting to call a .NET page within a main page. The
child page (child.aspx) returns html that contains dynamically created
javascript methods (function test()).

The parent page sets a document item's innerHTML property to the result of
the child page. This all works fine, except that the parent page also
makes
a call to the "test()" method that is contained within that innerHTML.
The
call is made after the innerHTML results are returned, yet a javascript
error
occurs stating that the call to "test()" is an invalid object.

It is obvious that for some reason the parent window's javascript is not
recognizing the function definition that was returned by the child page.
How
can I get this method to be recognized?

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: daniel | last post by:
Hi, This is more a javascript than a PHP problem, but anyway, if anyone can help.... I have a script that will dynamically create a series of checkboxes according to the number of values in...
6
by: Edward King | last post by:
Hi! I am trying to achieve the following: I have a number of help pages (in the format help_nn.php where nn=helpid). I want to be able to open a particular help page by calling the function...
1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
1
by: CGuy | last post by:
Hi, I have the following code in my aspx page <form id="Form1" method="post" runat="server"> <asp:TextBox ID="txtTest" Runat="server" /> <asp:RequiredFieldValidator ID="valText"...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
15
by: dspfun | last post by:
Hi, Is it possible to print the function name of the calling function? For example, f1() and f2() both calls f3(), in f3() I would like to print the name of the function calling f3() which...
1
by: JohnnieTech | last post by:
I am using some javascript/ajax to load content into a main div. The problem I am running into is that it will work in IE but not in FF. In FF I don't get any sort of load at all. I have a 1...
1
by: Memphis Steve | last post by:
Is it possible to combine multiple javascipts into one file and then call that file from a linked URL in the head section of an XHTML file? Here are the two scripts I want to use with the...
3
by: azegurb | last post by:
hi I have just took from internet dinamic table. this table is dynamic and its rows dynamically can be increased. but i would like how create SUM function that automatically sums each added row...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.