hi experts,
i'm developing a page in ASP but i'm doing also some javascript insode the page. i'm creating a frame and i want to loop this frame with a duplicateloop function so the form will be duplicate so many time, also i'm using a removeloop if the client want to remove the frame, in the html of the page i'm creating a table and i'm calling this loop, the problem now is that when i'm calling the removeloop it removes the frame but not the table in the html, so if i do the removeloop so many times the table will be big and big and big., how can i remove the table also when i'm calling the removeloop function.
second problem is that i'm calling an asp page inside the frame, i want to make the link to the css files dynamic but it seems that javascript does not alow that, in the asp page inside javascript function i'm calling also a function to get the same token of the page dynamically but it seems that it's not working.
any suggestions will be very appreciated.
i've been working in this now for 2 days.
thanks
2 1860
hi experts,
i'm developing a page in ASP but i'm doing also some javascript insode the page. i'm creating a frame and i want to loop this frame with a duplicateloop function so the form will be duplicate so many time, also i'm using a removeloop if the client want to remove the frame, in the html of the page i'm creating a table and i'm calling this loop, the problem now is that when i'm calling the removeloop it removes the frame but not the table in the html, so if i do the removeloop so many times the table will be big and big and big., how can i remove the table also when i'm calling the removeloop function.
second problem is that i'm calling an asp page inside the frame, i want to make the link to the css files dynamic but it seems that javascript does not alow that, in the asp page inside javascript function i'm calling also a function to get the same token of the page dynamically but it seems that it's not working.
here is the code for the remove loop and duplicate loop:
duplicateloop: - function duplicateLoop(nbr, useData){
-
var u;
-
-
var ta = document.getElementById("loop"+nbr+"_0");
-
for (var i=0; i<ta.childNodes.length; i++ ) {
-
if (ta.childNodes[i].tagName == 'TBODY')
-
ta = ta.childNodes[i];
-
}
-
if (!useData) {
-
for (var i = 1; i <= nbrLoop[nbr]; i++) {
-
var f = getFrame('frame'+nbr+'_'+i);
-
}
-
}
-
nbrLoop[nbr]++;
-
var tr = document.createElement('TR');
-
var td = document.createElement('TD');
-
var i = document.createElement('IFRAME');
-
i.frameBorder=0;
-
//if (nbr==0) {
-
u = '/folder/folder2/page.asp?<%=asp function%>';
-
i.style.height = '480px';
-
//}
-
//u = u+nbrLoop[nbr]+'&getData='+useData;
-
i.src = u;
-
//alert(i.src);
-
i.id = 'frame'+nbr+'_'+nbrLoop[nbr];
-
i.style.width = '600px';
-
i.scrolling = 'no';
-
tr.id = 'tr'+nbrLoop[nbr];
-
td.appendChild(i);
-
tr.appendChild(td);
-
ta.appendChild(tr);
-
enumInputs(document.body);
-
}
-
remove loop: - function removeLoop(nbr,row){
-
var f = document.getElementById('frame'+nbr+'_'+row);
-
f.parentNode.removeChild(f);
-
for (var i = row+1; i <= nbrLoop[nbr]; i++ ) {
-
//var f = top.frames['frame'+nbr+'_'+i];
-
var f = getFrame('frame'+nbr+'_'+i);
-
//f.reNumber(i-1);
-
f = document.getElementById('frame'+nbr+'_'+i);
-
f.id = 'frame'+nbr+'_'+(i-1);
-
}
-
nbrLoop[nbr]--;
the code in html:
[HTML]<a id='makeNew' style='display: ' href="javascrip t:window.parent .duplicateLoop( 0);">more + </a></td>
<span id="loop0span" >
<table id="loop0_0" border="1"></table></span>
[/HTML]
any suggestions will be very appreciated.
i've been working in this now for 2 days.
thanks
acoder 16,027
Recognized Expert Moderator MVP
In the removeloop function, there's no code to remove the table or rows. Just as the duplicateloop function looped and appended table rows/cells, the removeloop also needs to loop and remove the rows using removeChild(). If you remove the rows, the frames will also be removed.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: YT |
last post by:
Howdy,
Why the heck wouldn't this work:
for each item in Session.Contents
if NOT( Instr( item, "customer_" ) = 1 OR Instr( item, "user_" ) = 1 ) Then
Session.Contents( item ) = ""
Session.Contents.Remove( item )
end if
next 'item
|
by: frank |
last post by:
I have two DataTables, A and B. Both have the primary key "CID". How do I
remove all entries in Table A from Table B (with the same PK)?
|
by: Jonathan |
last post by:
Hi. I'm having trouble figuring out what I should be doing here.
I'm trying to remove an object from a list.
The function is:
void Alive::FromRoom ()
{
list<Alive>::iterator iter = room->living.begin();
while (iter != room->living.end())
{
|
by: Niyazi |
last post by:
Hi all,
I have a dataTable that contains nearly 38400 rows.
In the dataTable consist of 3 column.
column 1 Name: MUHNO
column 2 Name: HESNO
Column 3 Name: BALANCE
Let me give you some example first:
|
by: Susan Mackay |
last post by:
I have a data table that is connected to a database table with a data
adapter in the 'standard' manner.
However I want to be able to remove selected rows from the data table (i.e.
no longer include them in the set that is displayed to the user) but I don't
want to delete the corresponding row from the database.
I've tried using the .Rows.Remove() method but an exception is thrown to say
I don't have a 'delete' command in the data...
| |
by: pamelafluente |
last post by:
Hi
I have a sorted list with several thousands items. In my case, but this
is not important, objects are stored only in Keys, Values are all
Nothing. Several of the stored objects (might be a large number) have
to be removed (say when ToBeRemoved = true).
class SomeObj
ToBeRemoved be a boolean field
end class
|
by: Konstantinos Pachopoulos |
last post by:
Hi,
i have the following string s and the following code, which doesn't
successfully remove the "\", but sucessfully removes the "\\".
.... if i!="\\":
.... newS=newS+i
....
'Sadasd\x07sd'
I have also read the following, but i do not understand the "...and the
|
by: balabaster |
last post by:
Hi, I've been bashing my head against this since Friday and it's driving me nuts.
I've got an EntitySet(Of T) (LINQ) which is serialized to/from the viewstate by overriding the LoadViewState and SaveViewState methods. I've confirmed that this object is serialized/deserialized properly - so I know this bit is working as it should and when it should.
I have created a table template in which I have a header row which is just header text for...
|
by: Nates |
last post by:
I have a .bas file saved locally that I load into my Acces project to run a particular sub. I use the following code to load the module (which works fine):
I use the following loop to remove the module:
The above works fine (both adding the module and subsequantly removing it) provided I do not run any code within the module once it is loaded. The second I use code within the module the deletion loop does not seem to remove the...
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |