472,958 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Swapping/splitting content of two divisions

http://dynamicdrive.com/dynamicindex5/linkinfo.htm

Using the above script, I have a plan whereby when the main link is active,
two different content swaps take place.
Column A shows the main menu which is working just fine.

In column b I have two subdivisions.
Top is for thumbnails, bottom is for description.

What I am looking at doing, if possible, is to have the thumbnails and
descriptions change at the same time.
Perhaps using a two dimensional array?

They use a single array:
var content=new Array()
Content[0]='text'

Could I not have say content[0][0]='text' and content[0][1]="images"?

So that when the link is activated, I can direct to the appropriate
division?

Any one have any thoughts on how I might best achieve this goal?

Any other similar scripts available to look at?
I prefer easy to edit types.
Jul 23 '05 #1
1 1506
"Richard" <An*******@127.001> wrote in message
news:cr*********@news1.newsguy.com...
http://dynamicdrive.com/dynamicindex5/linkinfo.htm

Using the above script, I have a plan whereby when the main link is active, two different content swaps take place.
Column A shows the main menu which is working just fine.

In column b I have two subdivisions.
Top is for thumbnails, bottom is for description.

What I am looking at doing, if possible, is to have the thumbnails and
descriptions change at the same time.
Perhaps using a two dimensional array?

They use a single array:
var content=new Array()
Content[0]='text'

Could I not have say content[0][0]='text' and content[0][1]="images"?

So that when the link is activated, I can direct to the appropriate
division?

Any one have any thoughts on how I might best achieve this goal?

Any other similar scripts available to look at?
I prefer easy to edit types.


Use an array of objects, each object will have a column A value and a
column B value:

var content = [];
content[0] = { columnA:'image1.jpg', columnB:'image1 description' };
content[1] = { columnA:'image2.jpg', columnB:'image2 description' };
// ...

If you want to get really fancy, you could create a "Thumbnail" object
with methods to access the various information:

function Thumbnail(image, text) {
var columnA = image;
var columnB = text;

this.getColumnA = function() {
return columnA;
}
this.getColumnB = function() {
return columnB;
}
}

var content = [];
content[0] = new Thumbnail('image1.jpg', 'image1 description');
content[0] = new Thumbnail('image2.jpg', 'image2 description');
alert(content[0].getColumnA() + ';' + content[0].getColumnB());

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2

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

Similar topics

3
by: Sandman | last post by:
I am splitting a text block into paragraphs, to be able to add images and stuff like that to a specific paragraph in a content management system. Well, right now I'm splittin on two or more...
3
by: Christopher Jeris | last post by:
Please help me understand the differences, in semantics, browser support and moral preferredness, between the following three methods of swapping content in and out of a page via JavaScript. I...
2
by: Dennis M. Marks | last post by:
Please ignore all previous postings from me for the past couple of days. All has been solved except for the following. I have three divisions that I am having trouble positioning. What works in...
9
by: Stanimir Stamenkov | last post by:
Looking through the draft I still can't figure out how one could (is it possible to) group several elements and style a generated containing block for the group. This is much similar to a typical...
4
by: guitarromantic | last post by:
Hey everyone. Following advice found online, I figured out a basic way of splitting a long article into several pages, by exploding out from a <!--pagebreak--> code in my $content field. ...
6
by: nwheavyw8 | last post by:
I am currently trying to write a simple PHP script that will split an uploading file up into 500kb "chunks", then read and concatenate them back together when accessed for download. I can't seem...
1
by: Andy Britcliffe | last post by:
Hi I'm faced with the situation where I could have a single physical file that could contain multiplie XML documents e.g file.txt contains the following: <?xml version="1.0"...
34
by: john | last post by:
If I have a 32 bit unsigned int that is in the wrong byte order, how can I convert it? For example, if have a number 0x090a0b0c how can I reverse this to 0x0c0b0a09 ? Thanks, -John
1
by: chris f | last post by:
I'm dynamically populating a Table control in ASP.NET 2. Each row has 4 columns but column #3 needs to be split into 3 rows and column #4 needs to be split into 4 rows. Each of these cells contains...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.