Reply LinkBack Thread Tools Search this Thread
Old 08-06-2008, 02:32   #1 (permalink)
Jimdrang
Registered User
 
Join Date: Jun 2008
Posts: 2
Help with Linking "Variable" Text

Hello,

I have recently been trying to learn Dreamweaver and am having some problems when I try to create a multi page website.

I have no background with html/webcode so I only understand the Dreamweaver interface from video tutorials and playing with it.

What I am trying to accomplish: I have a homepage in which the main area is a table with 1 column and it has about 20-30 rows. Each row starts out with 2-3 word "heading" that is also a web link to the next page for each row and then has a longer 2-3 line description. Nothing is defined in the rows other than the first couple words being the web link. It is just text formatting other than that.

I would like to set it up where whatever the name of the link the user clicks on gets carried over into another section of the seconds page as a heading for a form the user is filling out.

The only way I can think to do this now would be to create 20-30 copies of the 2nd page and then link to a separate one just to change this 2 word heading, but there has to be a better/easier way.

I'd like to keep the layout the same because the first page is kind of like a list of items and a preview of the description and then when they click on one, I want to load that text to a different area in page 2 and then fill out the complete description above a form a created.

Any help would be greatly appreciated.

Thanks
  Reply With Quote
Old 08-06-2008, 10:57   #2 (permalink)
karmedic
id
 
Join Date: May 2008
Location: Ottawa
Posts: 217
First things first - adopt a list:

Code:
<ul> <li>first item</li> <li>second item</li> <li>third item</li> <li>fourth item</li> <li>...</li> </ul>

It's good for listy kinds of things, is accessible, and results in semantically correct clean code. Tables are good for tabular data.

Is the form on each subsequent page the same with the exception of the heading/description? i.e., does it use the same fields (like name, address, quantity, etc etc)?
  Reply With Quote
Old 08-06-2008, 17:18   #3 (permalink)
Jimdrang
Registered User
 
Join Date: Jun 2008
Posts: 2
thank you for the reply

yes the form will stay the same I basically just want to move whatever is in the table cell from the home page to the 2nd page above the form and reformat it a bit and add some more text.

Also can you give me a little more info on where in the first page to add that code? I hardly understand any html at all.

I basically just want to set every field of my main table on the first page to a variable and then when you the user pics on by clicking on a link, (each table cell has a link in it) alter that variable's formatting a bit and paste to a field above a static form on the 2nd page.

I forgot the mention the place I want all this data to go is not even in the form. It is just it's own table cell on the 2nd page.
  Reply With Quote
Old 09-06-2008, 22:35   #4 (permalink)
karmedic
id
 
Join Date: May 2008
Location: Ottawa
Posts: 217
Re: adding the list: replace the table with this list. each <li></li> would represent your <td></td>. Use CSS to style the list ...

Right now
Code:
<table> <tr> <td>heading</td> <tr> </tr> <td>heading</td> <tr> </tr> </td>...</td> </tr> </table>

After:
Code:
<ul class="nav"> <li><a href="#">heading</a></li> <li><a href="#">heading</a></li> <li><a href="#">heading</a></li> </ul>

Sample style:
Code:
<style type="text/css"> .nav { list-style: none; width: 300px; } .nav li { margin: 0; padding: 0; border-bottom: 1px solid #000; } .nav li a { display: block; margin: 0; padding: 3px; } .nav li a:hover { display: block; background-color: #f0f0f0; } </style>

I suggest a list because a) that's what you have, b) it's the correct way to mark it up, c) you'll have more control over styling, d) it's accessible, e) you'll do a huge favour for the next guy to work on this.

Once we have this taken care of we can move on to the second issue ...
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8