473,657 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2759
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***@discussi ons.microsoft.c om> wrote in message
news:DE******** *************** ***********@mic rosoft.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
2457
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 the database (a pricelist). The checkboxes are created with a naming convention from cb1 to cbx (x being the number of records returned).
6
2661
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 gethelp(nn) where nn is the helpid. The function is contained in a header file called funcs.inc that each page
1
20691
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 init() {
1
1870
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" ControlToValidate="txtTest" Runat="server" Text="*" Display="Dynamic" ErrorMessage="Enter Value" /> <asp:ValidationSummary DisplayMode="BulletList" Runat="server"/> <asp:Button Text="Submit" ID="Submit" Runat="server"/>
2
4443
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 */ #include <time.h>
15
22835
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 could either be f1() or f2(). BRs!
1
1766
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 column 2 row setup in css. The links are in the top div and the content loads in the main div. The only problem I thought may have been causing it was that I had an ID inside of and ID. I changed my links div to a class instead of an ID and that didn't...
1
2406
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 instructions on where to normally place them in an XHTML document: SCRIPT #1: Step 1: Insert the below anywhere into the <body> section of your page where you wish the clock to be displayed:<script> /* Live Date Script-
3
4205
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 value (text value) here is the code if possible please help me Thanks beforehand <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.