473,395 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1519
"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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.