Adobe Dreamweaver Forums



Last 10 THreads :         Spry Accordion Panel Default State All Closed? (Last Post : Steven_K - Replies : 2 - Views : 3 )           »          Re: export image in D11 (Last Post : Applied CD - Replies : 0 - Views : 1 )           »          Re: Adobe Capture?? (Last Post : CatBandit - Replies : 0 - Views : 1 )           »          catching errors from remotely invoked processes (Last Post : Cr99 - Replies : 2 - Views : 3 )           »          Tabbing in flash created code (Last Post : PaulGene - Replies : 3 - Views : 4 )           »          Special Message Board creation (Last Post : NedWebs - Replies : 3 - Views : 4 )           »          Dreamweaver Help! (Last Post : mollyjm - Replies : 0 - Views : 1 )           »          Re: Change Book or Page Icons? (Last Post : garythebadger - Replies : 0 - Views : 1 )           »          Embedded hyperlink doesn't work (Last Post : Racer-EX - Replies : 0 - Views : 1 )           »          RoboHelp hanging (Last Post : shawntrident - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags: , , , ,



Reply
  #1 (permalink)  
Old 09-02-2008, 03:23 AM
GlennC02108
 
Posts: n/a
Diggs:
Default passing url variable - what am I doing wrong?

I've made a form and am attaching the code.

Basically I am trying to get a list of offices and select one (which I am able
to do when I publish and run the webpage/form).

However, it always passes the value of "1" (the first record) to the next page
(no matter what office I select from the drop down menu). I've tried the other
choices under the lightning bolt, but those won't pass anything to the next
page.

Help!

<cfquery name="rs_offices" datasource="TAXCAMPAIGN">
SELECT *
FROM dbo.Offices
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post"
action="test2.cfm?OfficeID=<cfoutput>#IIf(isDefine d("Form.OfficeID"),"Form.Offic
eID",DE(""))#</cfoutput>">
<p>Select an office:</p>
<p align="center">
<select name="OfficeID" id="OfficeID">
<cfoutput query="rs_offices">
<option value="#rs_offices.OfficeID#">#rs_offices.OfficeNa me#</option>
</cfoutput>
</select>
</p>
<p align="center">
<input type="submit" name="OfficeID" id="OfficeID" value="Continue" />
</p>
</form>
</body>
</html>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-09-2008, 06:11 PM
delaneypub
 
Posts: n/a
Diggs:
Default Re: passing url variable - what am I doing wrong?

Why are you passing OfficeID as an URL variable in the form action when it is
already a FORM variable (the SELECT form field)? The selected OfficeID will be
passed to test2.cfm in the FORM scope.

Also, you have named the submit button OfficeID, too. Form field names need to
be unique, except possibly radio buttons and checkboxes.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:15 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk