473,811 Members | 3,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1124
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***********@h otmail.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="writeC ontent('Ceremon y');return false;">Ceremon y
</a>

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

(watch for word wrap)

function writeContent(wh ich)
{
if (document.getEl ementById)
{
if (which == 'Ceremony')
{
document.getEle mentById("main" ).innerHTML = "some string of text
etc";
}
else if (which == 'Reception')
{
document.getEle mentById("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="frameNa me">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
1644
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 like this - I need that the script will accurate as possible). On the server side I have the .NET server. Thanks :)
12
3395
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 be, say 400px x 500px ? Thanks in Advance! Warren
2
2411
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. I'm thinking of linking to a site map (server driven) that would highlight the position in the site as a no javascript alternative. Ideas or comments??? Jeff
3
1449
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 pages but I have not been able to figure out the new link format yet. -- Dennis Marks http://www.dcs-chico.com/~denmarks/
25
4006
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 in software which slow crackers down, from things like self-decrypting code to anti-debug tricks, and most people have a breaking point - if you can slow them down and waste enough of their time they usually move on to easier targets (and as there...
0
1006
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 JavaScript - same as You can do it with ActiveX (just put objectId dot and name of function). But know, one of my functions in User Control need do call a javascript function, which is placed on aspx site.
3
1984
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 press delete. Be super-cool if it could also change the textcolor as well. Any ideas on how to do this? I dont mind using another control, as long as its free (its for a charity intranet).
1
1255
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, Java, Smalltalk, etc, and just added a API Guide section for talking about the Google API, Win32 API, etc etc.
5
6668
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: I have a JavaScript function that looks like this: function DoPostRedir() { document.MainFrm.method = "POST"; document.MainFrm.action = "http://XXX.YYY.com/Help/";
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10133
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 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...
0
9204
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
7669
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
5554
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...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
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 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.