Digital Training Direct  
   
Dreamweaver FAQs
Frequently Asked Questions
  
     Submitting forms by email
     Nesting CSS rules
     Loading pages in two frames at once
     Returning individual pages to a frameset
     Creating a hover style on a link

     Have you read the HTML FAQs?
  

Forms

Q. We are trying to put a form onto a clients web site. All he wants is for the filled in fields to be emailed to his stand alone PC. From what I've read, it seems this process needs some sort of scripts and software on a server to process the data. Is there no way of just been able to send the data via email when the submit button is pressed?

A. Processing a form with a script is the preferred option if it's open to you, but there is also a simple way too. Just use mailto:yourclient@clientsaddress.co.uk in the action attribute of the form tag, very much like an email link.
Here's an example.

I added an attribute to the form tag to aid the legibility of the resulting email:
enctype="text/plain"

The downside of using the simple email method is that you get a nasty pop-up box warning you that the message you're sending is not secure. It doesn't look very professional. The user is also not taken to a 'Thank you' page, a convention to reasure them that they've sent the form.

If you want to control the subject line of the email add this to the end of the email address in the action attribute. Otherwise it will end up as *Form posted from Internet Explorer* or something. This is useful if your client wants to filter all the messages into a folder as they are received.
e.g.
action="mailto:training@xtinalamb.co.uk?subject=Mailing list"

Also, make sure you give appropriate values to your form objects - e.g. the checkboxes in my example have values which correspond with the labels on the page (add etc.) and it will make sense when you read the email.

Try asking your client's host if they supply a free formmail script. Often they will post this information on their support site as it's a Frequently Asked Question. You may be able to link to it, or they might send you a script file to upload into the site. The benefits being that you can usually link to a page to say thanks for filling in the form, users can fill it in without using a set-up email client, you don't get the nasty pop-up or scrambled text and you may be able to tie the information in to a database.

back to top 

Nested CSS styles

Q. How do I nest CSS styles so that wherever a combination of tags occur in a certain order, a particular style rule is used.

A. Setting a style for links on the page, but only where they occur within a <P> tag.

P a:link { font-family: Arial, Helvetica, sans-serif; font-size: 16pt;
font-style: normal; font-weight: bold; color: #FF6600; text-decoration: none}

In the example above the link appears without underlining because of the style rule
text-decoration: none

back to top 

Loading pages in two frames at once

Q. How do I update pages in two frames by clicking on one link?

A.
Make the link and just use a hash sign # for the file path
Select the link and go to the Behaviours inspector
Add a Go to URL behaviour and in the dialog box choose a frame and browse for the page you want to load in this frame. In the same dialog box choose and browse for the second frame and page. Then click OK.
Check the event listed is the right one (probably On Click)
Choose File > Save All and check it in a browser.

back to top 

Returning individual pages to a frameset

Q. If a search engine links to the content pages of my frames site, how do I get the pages to automatically refresh back to the frameset / homepage when they're visited?

A.
Between the HEAD or BODY tags of each page, type the following script
(where "index.htm" is the name of your frameset page):

<script language="JavaScript">
<!-
if (top== self) self.location.href= "index.htm";
//->
</script>

back to top 

Creating a hover style on a link

Q. How do I change the colour when I put the mouse over a link (hover).

A.
Click New style button in the CSS Styles palette.
Choose CSS selector
Choose a:hover then click OK
Select the text styles you want on hover then click OK
Go back and create new styles for the other link states.
Create links on the page and they will display with your link styles.
Remember hover may only work in Explorer

back to top