473,811 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dynamic coding.

Hello,

I've coded a tab pages somes years ago, with a search engine (with the help
of an other programmer) allowing to search in many divs (any tab show/hide a
div).

Now, I've to change code as new tabs are added. I've a frame where I load
the tabs and fill div with queries, and an other frame where I have the
search form. I'm looking for a way to have dynamic creation of the code,
depending on the loaded divs or tabs.

Here is the javascript code allowing to switch DIV for finding any string in
many DIVS, then show the desired DIV.
....
var oRng1 = win.document.bo dy.createTextRa nge();
var oRng2 = oRng1.duplicate ();
var oRng3 = oRng1.duplicate ();
....
oRng1.moveToEle mentText(win.DI VBrother);
oRng2.moveToEle mentText(win.DI VCanon);
oRng3.moveToEle mentText(win.DI VEpson);
....
if(win.DIVBroth er.style.visibi lity=='visible' ) var bInside =
oRng1.inRange(T Range);
if(win.DIVCanon .style.visibili ty=='visible') var bInside =
oRng2.inRange(T Range);
if(win.DIVEpson .style.visibili ty=='visible') var bInside =
oRng3.inRange(T Range);
....
if(win.DIVBroth er.style.visibi lity=='visible' ) {
TRange.moveToEl ementText(win.D IVBrother);
strFound=TRange .findText(str);
TRange.select() ;
}
if(win.DIVCanon .style.visibili ty=='visible') {
TRange.moveToEl ementText(win.D IVCanon);
strFound=TRange .findText(str);
TRange.select() ;
}
if(win.DIVEpson .style.visibili ty=='visible') {
TRange.moveToEl ementText(win.D IVEpson);
strFound=TRange .findText(str);
TRange.select() ;
}
....
TRange=win.docu ment.body.creat eTextRange();
if(win.DIVBroth er.style.visibi lity=='visible' )
TRange.moveToEl ementText(win.D IVBrother);
if(win.DIVCanon .style.visibili ty=='visible')
TRange.moveToEl ementText(win.D IVCanon);
if(win.DIVEpson .style.visibili ty=='visible')
TRange.moveToEl ementText(win.D IVEpson);

if(oRng1.inRang e(TRange)) {win.tab0.focus (); win.tab0.click( );}
if(oRng2.inRang e(TRange)) {win.tab1.focus (); win.tab1.click( );}
if(oRng3.inRang e(TRange)) {win.tab2.focus (); win.tab2.click( );}

For now I've 9 tabs, but the customer want to add 3 more, and maybe once
will want to add some new. I'd like to be able to manage this kind of code
dynamically, but don't know how to do.

Anybody may help me change the code above to do it dynamically managing that
the tabs and DIVs come from an access database ? maybe with an array or
whatever.

Thanks.

Bob
Jul 23 '05 #1
1 1851
Bob Bedford wrote:
Hello,

I've coded a tab pages somes years ago, with a search engine (with the
help of an other programmer) allowing to search in many divs (any tab
show/hide a div).


You need to use a J2EE webserver (Tomcat is free) and custom tags. It's
fairly simple to write a <mytags:tabse t> tag which will contain
<mytags:tab>s .

Jul 23 '05 #2

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

Similar topics

0
1494
by: only_me | last post by:
Not a coding question as such but highly related to asp/dynamic pages issues : has anyone any suggestions on the following ASP sites are generally (always) of a dynamic nature, pages can be built on the contents of querystrings, so search engines can only be directed to your first index.asp page since the search engine is unable to deduce what querystring parameters should/could be used. I have a company listing site and would like...
1
17686
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
2
1297
by: MacKenzieMouse | last post by:
I have been struggling with creating dynamic tables populated with rows and cells the top row has one cell with a label the next row has four cells with a label each the last row has 4 cells each with a checkboxlist control. Is there a book that would outline the basics of dynamic building? Have any of you done something like this?
3
13759
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum. Everyone wants to do a java confirmation box when a user clicks the delete button. Fair enough, basic user design rules state that you should always confirm a delete action. There is also a consensus that the best way to do this is a template...
5
2053
by: cwertman | last post by:
I have a question regarding dynamic properties. I have an Object say Account --Id --Prefix --Fname --Lname --Suffix
11
3063
by: toton | last post by:
Hi, I have little confusion about static memory allocation & dynamic allocation for a cluss member. I have class like class Bar{ public: explicit Bar(){ cout<<"bar default"<<endl; }
3
2499
by: john | last post by:
I am VERY new to C++ (1st semester) put not so new to coding and programming (SQL, VB, etc). We are learning about classes. I have a program that needs to call many instances (i think this is the right term) of a class. What I have been taught so far is to write to a class we would do something like this in the main.cpp: a1.setmanSalary(something);
0
1147
by: pinxi | last post by:
We are seeking to hire a lead programmer to build a dynamic Web-based imaging module which will enable users to upload a digital image or photograph to the site and choose from thousands of combinations of mattes and frames. We will output the file via high resolution printers on site and matte/frame the image in our state-of-the-art manufacturing facility at a fraction of the cost of having it done at a local framing shop. This...
0
934
by: senthilnathan1985 | last post by:
Hi to everybody i implementing asp.net in my project with sql server 2005 i have one doubt in creating dynamic table in design page In php this is the code for creating table rows and columns <tr><? while( $estate=mysql_fetch_array($real)) {?> <td width="9%"><? echo $estate; ?></td>
2
1363
by: bsgeethaece | last post by:
Hai... now I am doing Library Management System Project in Java. ..I wants to create a Dynamic Table in one interface.... if u people know plz forward the coding 2 me....thank you
0
9722
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
10644
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...
1
10393
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,...
0
9200
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
7664
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
6882
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
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.