courses-dreamweaver - importing list form
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Dreamweaver Training and help » courses-dreamweaver - Importing a list to a form

courses-dreamweaver - Importing a list to a form

resolvedResolved · Low Priority · Version Standard

replyReply Tue 27 Feb 2007, 15:45Delegate Gavin said...

Gavin has attended:
Dreamweaver 8 Introduction course
Dreamweaver 8 Intermediate course

Importing a list to a form

how do i import a list to a form, instead of having to manually type it in?

For upcoming training course dates see: Pricing & availability

replyReply Wed 28 Feb 2007, 14:14Trainer Rich said...

RE: Importing a list to a form

Hi again Gavin,

If I had a long list of items to put in a selectbox element, I'd paste the items into the code view, then either use some kind of macro or just copy and paste the <option> tags around each item.

For example, the selectbox (or list) in HTML code starts and ends like this:
<select name="elementname">
</select>

And between these Select opening and closing tags you put an opening and closing Option tag for each item.

So if, in Code view, you pasted in your list of items (from word, excel, or anywhere) you would then have this:
<select name="elementname">
Orange
Apple
Banana
Peach
</select>

You then need to go and put <option> before each item, and </option> after each item. So either copy and paste them in for each row, or if you have many items, perhaps use a program like UltraEdit, which can do text macros on every line of a text file. eg. you specify to put the text <option> at front of each line, and </option> at the end.

And that's all a select box is.

Note, an optional parameter in the nested <option> tag is value="". This parameter specifies the actual data that gets sent back to the web server. If you don't specify a value parameter, the server assumes the value is the same as the label (what the visitor sees).

eg.
<option value="orange">orange</option> is the same as <option>orange</option>

whereas
<option value="blueberry">orange</option> would send 'blueberry' to the server, even though your visitor selected 'orange' from the list.

Hope this has helped.

Regards, Rich

 

Dreamweaver tip:

JumpMenu in new window

When inserting a jumpmenu to a page, the only option available for 'open in' is usually 'main window'. There would be other options available if the page was a frameset.

To change the jumpmenu to open in a new window, change the target parameter of the selectbox in your code to 'window.open()'.

eg.
<select name="menu1" onChange="MM_jumpMenu('window.open()',this,0)">


source:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16166&sliceId=1

View all Dreamweaver hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard