Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 14th, 2005, 01:47 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default send form values to different page

Hello all
i have a form with 2 objects:supplier and HGNo when we select supplier it should give me just the HG of that supplier and the same for HG and Supplier.and my form should send these 2 values to the next page for filtering.should i make 2 forms that on of them is in the another one with the action to itself and the other one to filter page????
thank you

Reply With Quote
  #2 (permalink)  
Old August 15th, 2005, 09:40 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i made tow form in my pages it is working.but it doesn't show the value of check boxes can we write it like this?
 <%Dim rs_MMColParam
          MMColParam=Request.Form("SiteWorkshop")%>
                                  <select name="HGNo">
                                  <%if (MMColParam="All") then

          %>
<option value="null" selected>All</option>
                            <option value="3903">3903 Transporter seling</option>
                            <option value="4005">4005 signs and lable</option>
                            <option value="4006">4006 signs and lables</option>
                            <option value="4011">4011 insulation &amp; piping
                            &amp; indoor grating</option>
                            </select>
<%end if%>

Reply With Quote
  #3 (permalink)  
Old August 16th, 2005, 02:40 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I am not sure I understand the question (well, in fact, I *am* sure I don't understand the question)

You talk about check boxes, but I don't see one in your code. What are you trying to accomplish??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Bust by Big Boi feat. Killer Mike (Track 7 from the album: Speakerboxxx) What's This?
Reply With Quote
  #4 (permalink)  
Old August 16th, 2005, 11:07 PM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

you're right.i think i didn't explain it correctly.i have 2 check boxes.if we select the value of first check box the second check box should show its special values and after that send these 2 check boxes values to the next page.i don't know how should i declare my first check box value.is it corret just to put its check box name?
for exmaple if my first check box is:<select name="Supplier">
...
then i write my codes for second check box like this:
<select name="HGNo">
<%if supplier="aaaa" then%>
<option value=4070>4070</option>
.
.
.
<%end if%>
<write other if code....>
</select>


Reply With Quote
  #5 (permalink)  
Old August 17th, 2005, 04:04 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Ah, I see. You're mixing up check boxes and select list. A check box is the little square that can have a check mark in it, while the select list is (often) a drop down with multiple options.

Anyway, what you need to do is this:

1. Make the first drop-down "auto postback" by adding an onchange handler that submits the form automatically.

2. On the server, retrieve the value from the first drop-down and use it in a query (if you're using a database) to get the selected child records

3. Then use a loop to create the second drop-down with the values from the database.

Take a look here: http://www.asp101.com/samples/db_pulldown_linked.asp for a simple example, or search Google

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #6 (permalink)  
Old August 17th, 2005, 10:54 PM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

yes:))thats right i meant select.i don't get the second select values from the database.can i just wrote some if code fore them?
thank you for your links

Reply With Quote
  #7 (permalink)  
Old August 18th, 2005, 12:20 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Sure you can. Just use If or a Select statement to determine the items in the second drop-down list. Something like this:
Code:
<select name="SecondDropDown">
<%
Select Case Request.Form("FirstDropDown")
  Case "SomeValue"
    %>
       <option value="SomeValue">SomeValue</option>
       <option value="SomeOtherValue">SomeOtherValue</option>
    <%
  Case "SomeOtherValue"
     %>
       <option value="YetAnotherValue">YetAnotherValue</option>
     <%
End Select
%>
HtH,

Imar
Reply With Quote
  #8 (permalink)  
Old August 18th, 2005, 01:41 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

my problem is with my forms.should i have 2 form?one in the another?or can i do it with one form????what should i write for action of my form?

Reply With Quote
  #9 (permalink)  
Old August 18th, 2005, 08:34 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

One form, with a normal action that posts back to the same page. E.g.:

<form action="MyPage.asp" method="post">

Then when the page loads, see if the first drop down has a value with the Select code I showed you.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #10 (permalink)  
Old August 19th, 2005, 11:26 PM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

i put a fprm with a action to same page.but when i click submit button it gives me that page again but at the top of the page it wrote:
Key Submit2 has a value of Select
Key SiteWorkshop has a value of null
Key UnitNo has a value of null
and the menu is empty without any valu

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
send parameters from asp page to an asp.net form hastikeyvan ASP.NET 1.0 and 1.1 Basics 2 March 29th, 2008 01:32 AM
Can't send form values using CDO voyeur Classic ASP Components 1 February 27th, 2008 03:55 PM
Looping thru Form values posted to a page.. kingroon ASP.NET 2.0 Basics 1 February 13th, 2008 02:07 PM
How do I send boolean values with a checkbox babou SQL Server ASP 2 March 28th, 2005 05:43 AM
Combo box with different display and send values iniro VB.NET 2002/2003 Basics 3 November 9th, 2004 12:34 PM



All times are GMT -4. The time now is 11:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.