473,770 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieve Object from dinamically loaded HTML

I have this code that load HTML tags (no including <html> or <body>)
into a DIV dinamically...

after correctly retrieving the HTML, I assign it to my DIV Container

document.getEle mentById(contai nerid).innerHTM L=page_request. responseText

now from main page....I need to get a reference to an Object (a
textbox) contained in the dinamically loaded HTML

Once in my main document this, doesn't works:
document.getEle mentById(contai nerid)

The objects that I loaded dinamically, are part of the Main Document or
not?

How can I access this objects from my main page?

Best Regards
Fabio Cavassini
http://www.pldsa.com

Dec 13 '05 #1
2 1439


Fabio Cavassini wrote:
after correctly retrieving the HTML, I assign it to my DIV Container

document.getEle mentById(contai nerid).innerHTM L=page_request. responseText

now from main page....I need to get a reference to an Object (a
textbox) contained in the dinamically loaded HTML

Once in my main document this, doesn't works:
document.getEle mentById(contai nerid)


What happens exactly, does getElementById return null, do you get any
error mesage, if so which one?
Make sure the inserted HTML does not contain an id attribute value which
already exists in the document.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 13 '05 #2
Ouch... It actually works... the error was in other side.

Thank you

Best Regards
Fabio

Dec 14 '05 #3

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

Similar topics

1
1526
by: wolfing1 | last post by:
So the html looks like this: <%@ Language="VBScript" %> <%Option Explicit %> <html> <head>...</head> <body> <form name="myform"> <table> <% for x=1 to 10 response.write "<tr><td><input type=checkbox name=ch"+cstr(x)+" onclick='vbscript:call f("+cstr(x)+") </td></tr>" %>
2
2304
by: N. Demos | last post by:
I'm having problems with a custom JS object (XMLLoadObject) I designed to load XML and XSL files, perform an XSL transform with them and embed the resultant HTML fragment into the host HTML document. I designed this object so that I could generate and embed HTML fragments from more than one XML/XSL source into a single HTML document. This is done by instantiating an XMLLoadObject with an XML filename, an XSL filename, and the ID of the...
2
12941
by: Marco | last post by:
How I can create TextBox dinamically. I have to create 10 textbox dinamically which name will be txtBox_01, txtBox_02, etc... Thanks.
1
618
by: Jan Van Steenbergen | last post by:
Hi all i'm having a little problem I have a aspx file with a iFrame defined The iframe is loaded with a html webeditor After editing data in the webeditor textbox, i want t get the data to a hidden field in the aspx file What is the best way todo this Is it possible to add some sample code because a i have tried a lo but nothing works
2
2074
by: zek2005 | last post by:
Hi! I have a value loaded in a database as following: &lt;p&gt;&lt;strong&gt;test&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;test 2&lt;/ strong&gt;&lt;em&gt;&lt;strong&gt;questions&lt;img alt=&quot;&quot; src=&quot;http://www.mysite.com/fckeditor/editor/images/smiley/msn/ regular_smile.gif&quot; /&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
3
1128
by: Kojikabutosv | last post by:
Hi everybody, i have a master page and with tree buttons, how configure the buttons to load pages dinamically in wichone pages. Regards,
0
9602
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9439
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
10237
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10071
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7431
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...
1
3987
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
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2832
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.