473,396 Members | 1,990 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,396 software developers and data experts.

First web site - need help with javascript

Hi,
I'm in the process of designing a web site for my wedding. This is my
first attempt at web design of any sort. I have the basic design done
and I am now at the point where I want to start adding some content. I
am having a problem with one page, the URL is:

http://www.peterj1974.plus.com/weddingdetails.htm

The left hand side will be link and I want the content to be displayed
in the main area. So for example, when someone clicks on ceremony, the
information on the ceremony will be displayed etc etc. I'd like to try
and do this with out creating a separate page for each menu item. Is
this possible, if so can some one give me some instructions.

Thanks
Jul 23 '05 #1
3 1112
Peter Jones wrote:
Hi,
I'm in the process of designing a web site for my wedding. This is my
first attempt at web design of any sort. I have the basic design done
and I am now at the point where I want to start adding some content. I
am having a problem with one page, the URL is:

http://www.peterj1974.plus.com/weddingdetails.htm

The left hand side will be link and I want the content to be displayed
in the main area. So for example, when someone clicks on ceremony, the
information on the ceremony will be displayed etc etc. I'd like to try
and do this with out creating a separate page for each menu item. Is
this possible, if so can some one give me some instructions.

Thanks


As a quick answer I would think you would not have to use javascript to
get where you want to go - Instead, you could use an IFRAME to the right
of your menu - Give it a name (for example, call it WORKAREA) then, use
TARGET=WORKAREA in your links on the right...

Does that help you any?

randelld
Jul 23 '05 #2
In article <6e**************************@posting.google.com >,
pe***********@hotmail.com enlightened us with...
Hi,
I'm in the process of designing a web site for my wedding. This is my
first attempt at web design of any sort. I have the basic design done
and I am now at the point where I want to start adding some content. I
am having a problem with one page, the URL is:

http://www.peterj1974.plus.com/weddingdetails.htm

The left hand side will be link and I want the content to be displayed
in the main area. So for example, when someone clicks on ceremony, the
information on the ceremony will be displayed etc etc. I'd like to try
and do this with out creating a separate page for each menu item. Is
this possible, if so can some one give me some instructions.


Sure, assuming supporting recent DOM browsers such as IE and Netscape 6+
are sufficient for this personal site.

Make a div and give it an ID.
<div id="main"></div>

When someone clicks a link, call a javascript function that writes the
appropriate content to the div.
<a href="#" onClick="writeContent('Ceremony');return false;">Ceremony
</a>

The innerHTML property should suffice if we're keeping this simple.

(watch for word wrap)

function writeContent(which)
{
if (document.getElementById)
{
if (which == 'Ceremony')
{
document.getElementById("main").innerHTML = "some string of text
etc";
}
else if (which == 'Reception')
{
document.getElementById("main").innerHTML = "some other string of
text etc";
}
}
}

You can get fancy by storing the values for the various links in an
array and referencing that instead. It's easier to modify, but a tad
more complicated to "get" if you're new to programming.

HTH

--
--
~kaeli~
Those who get too big for their britches will be exposed in
the end.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3
In article <6e**************************@posting.google.com >, Peter
Jones <pe***********@hotmail.com> wrote:
Hi,
I'm in the process of designing a web site for my wedding. This is my
first attempt at web design of any sort. I have the basic design done
and I am now at the point where I want to start adding some content. I
am having a problem with one page, the URL is:

http://www.peterj1974.plus.com/weddingdetails.htm

The left hand side will be link and I want the content to be displayed
in the main area. So for example, when someone clicks on ceremony, the
information on the ceremony will be displayed etc etc. I'd like to try
and do this with out creating a separate page for each menu item. Is
this possible, if so can some one give me some instructions.

Thanks


The easiest way would be to modify your table so there is a cell where
you want the pages to appear. In this cell create an <iframe
id="frameName"></iframe>. This will act as a window. On the left create
<a href=xxx target="frameName">xxx</a>.

Use CSS to set the size of the iframe.

There are other methods, such as using innerhtml, which others will be
sure to show you.

..

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #4

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

Similar topics

8
by: Mr. x | last post by:
Hello, I need a script for counting the no. of enters on my site, please. I need a check that for the same user in the same day - if the user enter several times, it is count once (or something...
12
by: Warren | last post by:
Greetings: I know how to size a child window (po-up) however WITHOUT using FLASH, is there a way to size the FIRST PAGE of a web site (and all subsaquent pages as well) i.e. the WHOLE site would...
2
by: Jeff Thies | last post by:
I have a site with javascript navigation menus (it's in the design spec). There's a bit too many pages to do a bread crumb type alternate nav, and no natural index page for each site section. ...
3
by: Dennis M. Marks | last post by:
Take a look at the new www.amtrak.com site. It looks like all pages are built dynamically using javascript. All of the page sources look the same. I used to have direct links to some of the...
25
by: Dave Turner | last post by:
I know that its impossible to completely prevent somebody from ripping a site (or cracking software) if that person has the skills and the time/patience, but there are tricks that can be employed...
0
by: Jakub Gutkowski | last post by:
Hi, Dose anybody knows how to call JavaScript function in C# Windows User Control? I use Windows User Control as smth like ActiveX, 'coz I need to call functions from my User Control from...
3
by: musosdev | last post by:
Hi I want to have a textbox on my webpage that shows 'Type here' in gray. When you click on the textbox, that text disappears and you can type your search, rather than having to select it and...
1
by: da404LewZer | last post by:
hell all, i'm starting a new wiki for programming called "CoderWiki" i plan on documenting all functions of all programming languages. I have started a couple portals for C, VB, PHP, HTML,...
5
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I am trying to create ASPX code which will allow me to redirect a user to another site with POST data. I figure that the best way to do this is with JavaScript to the client. Here's what I'm doing:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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.