Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 January 7th, 2007, 02:42 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default choose specific record

Hi !
I'm working on a page that display database records in the table. There can be only one record or more, so I use repeat region. In this table is data from database and from menu on previous page. Now, I have to display data from selected table row on another page, so I try with master/detail page. It works OK with data from database(passing ID of a database record), but it doesn't display one from dropdown menus. Anybody know what to do ?
This is how that table looks like:

Name Adress Date_begin Date_finish Link
dbRecord dbRecord from list/menu from list/menu img.gif
. . . . .
. . . . .
. . . . .

In a "link" column is a small image and when user clicks, it should display data from choosen row on another page. As I said before, it doesn't show two Date
Thanks



Reply With Quote
  #2 (permalink)  
Old January 7th, 2007, 03:19 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

Hi there,

I am not sure I understand what you're asking. What do you mean with "but it doesn't display one from dropdown menus"??

Can you post the (relevant bits of) code?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Mic-check by Osdorp Posse (Track 1 from the album: Geendagsvlieg) What's This?
Reply With Quote
  #3 (permalink)  
Old January 8th, 2007, 04:07 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for reply ! The first two colums in the table (table is on result page) displaying data from database depending on what user choose on the search page. On that search page user can choose what he wants from two dropdown menus and he must enter two dates. And that is what I meen - because these two dates are not in database, they are not displayed on detail page because the form is not submited. The code is generated by DW 4. I'm a student, and I don't have to much exeperience in this, so any help would be great

Reply With Quote
  #4 (permalink)  
Old January 8th, 2007, 04:13 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

Well, can't you just display those dates the same that the Dreamweaver code does? By requesting them from Request.QueryString or Request.Form??

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #5 (permalink)  
Old January 9th, 2007, 07:29 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But the form is not submitted, I tried that way, it doesn't display anything. If form is submitted same way as link for this deatil page, I get multiple dates displayed in same column, and only first table row no matter which I choose (table row is repeat region). Two dates I'm talking all the time are not from DB, user enters them to compare with two in DB (from/to)

Reply With Quote
  #6 (permalink)  
Old January 9th, 2007, 07: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

Quote:
quote:Two dates I'm talking all the time are not from DB, user enters them to compare with two in DB (from/to)
But when the user enters them, they end up on the server somehow right? So if the server has them, you can display them again, can't you?

We could debate about this for weeks, without any result. Like I suggested earlier, post the relevant pieces of code so we have something to look at.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #7 (permalink)  
Old January 11th, 2007, 05:40 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is part of code from result page:

<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
    <tr>
      <td width="20%" height="19">
        <div align="center"><%=(Recordset2.Fields.Item("name"). Value)%> </div>
      </td>
      <td width="17%" height="19">
        <div align="center"><%=(Recordset2.Fields.Item("adress" ).Value)%></div>
      </td>
      <td width="7%" height="19">
        <div align="center">
          <input name="date1" value="<% Response.Write(Request("date1")) %>" size=8>
            </div>
      </td>
      <td width="7%" height="19">
        <div align="center">
          <input name="date2" value="<% Response.Write(Request("date2")) %>" size=8>
            </div>
      </td>
      <td width="7%" height="19">
        <div align="center"></div>
      </td>
      <td width="8%" height="19">
        <div align="center"> <A HREF="details.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "sifra=" & Recordset2.Fields.Item("ID").Value %>"><img src="pic/view.gif" width="40" height="17" align="middle"></A>
        </div>
      </td>
    </tr>
    <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset2.MoveNext()
Wend
%>


Reply With Quote
  #8 (permalink)  
Old January 11th, 2007, 05:43 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

I think you need to post more code. How is the recordset constructed? Where do you get the dates from to use in the query? Why does this not work:

<% Response.Write(Request("date2")) %>

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #9 (permalink)  
Old January 11th, 2007, 05:50 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And this from result page. Not sure if Icut&paste parts what you want ? Other, just as this is generated by DW result/detail page

%@LANGUAGE="VBSCRIPT"%>

<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_bla_STRING
Recordset1.Source = "SELECT name, adress, ID FROM Per"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

' set the record count
Recordset1_total = Recordset1.RecordCount

' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
  Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
  Recordset1_numRows = 1
End If

' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1

' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
  If (Recordset1_first > Recordset1_total) Then Recordset1_first = Recordset1_total
  If (Recordset1_last > Recordset1_total) Then Recordset1_last = Recordset1_total
  If (Recordset1_numRows > Recordset1_total) Then Recordset1_numRows = Recordset1_total
End If
%>
<%
' *** Move To Record and Go To Record: declare variables

Set MM_rs = Recordset1
MM_rsCount = Recordset1_total
MM_size = Recordset1_numRows
MM_uniqueCol = "ID"
MM_paramName = "id"
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Specific Record: handle detail parameter

If (MM_paramIsDefined And MM_rsCount <> 0) Then

  ' get the value of the parameter
  param = Request.QueryString(MM_paramName)

  ' find the record with the unique column value equal to the parameter value
  MM_offset = 0
  Do While (Not MM_rs.EOF)
    If (Cstr(MM_rs.Fields.Item(MM_uniqueCol).Value) = param) Then
      Exit Do
    End If
    MM_offset = MM_offset + 1
    MM_rs.MoveNext
  Loop

  ' if not found, set the number of records and reset the cursor
  If (MM_rs.EOF) Then
    If (MM_rsCount < 0) Then MM_rsCount = MM_offset
    If (MM_size < 0 Or MM_size > MM_offset) Then MM_size = MM_offset
    MM_offset = 0

    ' reset the cursor to the beginning
    If (MM_rs.CursorType > 0) Then
      MM_rs.MoveFirst
    Else
      MM_rs.Close
      MM_rs.Open
    End If
  End If

End If
%>
<%
.
.
.
.
<form action="<%=MM_editAction%>" method="POST" name="form1">
  <div align="center">
    <p>&nbsp;</p>
    <table width="46%" border="0">
      <tr>
        <td width="51%">
          <div align="center">Name:</div>
        </td>
        <td width="49%">
          <input name="name" value="<%=(Recordset1.Fields.Item("name").Value)%> ">
        </td>
      </tr>
      <tr>
        <td width="51%">
          <div align="center">Adress:</div>
        </td>
        <td width="49%">
          <input name="adr" value="<%=(Recordset1.Fields.Item("adress").Value) %>">
        </td>
      </tr>
      <tr>
        <td width="51%">
          <div align="center">Date
            from:</div>
        </td>
        <td width="49%">
         <input name="date1" readonly value="<% Response.Write(Request("date1")) %>" size=8>
        </td>
      </tr>
      <tr>
        <td width="51%">
          <div align="center">Date
            to:</div>
        </td>
        <td width="49%">
          <input name="date2" readonly value="<% Response.Write(Request("date2")) %>" size=8>
        </td>
      </tr>


Reply With Quote
  #10 (permalink)  
Old January 11th, 2007, 06:03 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

And where are date1 and date2 defined? I don't see them anywhere in your code, so it makes sense they won't show up anywhere on the page.

Or are they passed in from another page?

How about you describe - in detail - what it is you're trying to accomplish. Describe page logic, structure and so on.
Otherwise, I can't help much. I don't like to play hide and seek where you hide all the details of your problem and I am supposed to seek them.... ;)

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
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
double click for specific record naveed77 Beginning VB 6 0 December 4th, 2007 04:55 AM
Going to a specific record in a separate subform discorhino Access VBA 2 August 7th, 2006 12:35 AM
How do you open a specific record from a search? Szimmer9 VB How-To 1 March 31st, 2006 12:57 AM
Choose record by data jilly Classic ASP Basics 0 November 23rd, 2005 11:21 AM
Link to a specific record rexecampbell Classic ASP Basics 2 April 7th, 2004 01:40 PM



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


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