Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: RE: hyperlink for entire table rows


Message #1 by "Drew, Ron" <RDrew@B...> on Fri, 28 Jun 2002 13:18:46 -0400
Not sure how you want to do it...but I use the ID of the record like
so...if not you can use the onClick on the <TR>

mySQL =3D "Select blah1, blah2 from xxx"
idfield=3D"ID"
scriptresponder=3D"gotothis.asp"
set conntemp=3Dserver.createobject("adodb.connection")
mdbPath =3D Server.MapPath("xxx.mdb")
conntemp.open "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
            "Data Source=3D" & mdbPath & ";" & _
            "User Id=3Dadmin;" & _
            "Password=3D;"
set rstemp=3Dconntemp.execute(mySQL)
howmanyfields=3Drstemp.fields.count -1
%>
<table border=3D"1" width=3D"100%">
<tr><td valign=3D"top">&nbsp;&nbsp;&nbsp;</td>
<% 'Put Headings On The Table of Field Names
for i=3D0 to howmanyfields %>
       <td align=3Dcenter><b><%=3Drstemp(i).name %></b></td>
<% next %>
</tr>
<% ' Now lets grab all the records
do  while not rstemp.eof %>
   <tr><td valign=3D"top">
   <%my_link=3Dscriptresponder & "?which=3D" & rstemp(idfield)%>
   <a HREF=3D"<%=3Dmy_link%>"><%=3Dpgm%></a></td>
   <% for i =3D 0 to howmanyfields%>
          <td valign=3D"top"><%=3Drstemp(i)%></td>
   <% next %>
   </tr>
   <%
  rstemp.movenext
loop

rstemp.close
set rstemp=3Dnothing
conntemp.close
set conntemp=3Dnothing
%>
</table>

-----Original Message-----
From: Carlos Lamar [mailto:lamar@s...]
Sent: Friday, June 28, 2002 12:01 PM
To: ASP Web HowTo
Subject: [asp_web_howto] hyperlink for entire table rows


Good morning, all!

I create an ASP page which displays query results in a table.  How can I
allow the user to edit a record by simply clicking on the desired row?
anywhere on the row...  I know how to do this using a cell...  but
wanted to try something different.

Thanks in advance for your assistance!
---Carlos

____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *:   xxx.xxx.xxxx
> *:   xxx.xxx.xxxx   (FAX)
> *:  clamar@s...
> u http://www.snyder-newell.com/
>
>
>


---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
Message #2 by "Carlos Lamar" <lamar@s...> on Fri, 28 Jun 2002 10:28:47 -0700
Thanks for your suggestions, guys!
It works!
---Carlos

____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *:   xxx.xxx.xxxx
> *:   xxx.xxx.xxxx   (FAX)
> *:  clamar@s...
> u http://www.snyder-newell.com/
>
>
>
> ----------
> From: 	Drew, Ron[SMTP:RDrew@B...]
> Reply To: 	ASP Web HowTo
> Sent: 	Friday, June 28, 2002 10:18 AM
> To: 	ASP Web HowTo
> Subject: 	[asp_web_howto] RE: hyperlink for entire table rows
>
> Not sure how you want to do it...but I use the ID of the record like
> so...if not you can use the onClick on the <TR>
>
> mySQL =3D "Select blah1, blah2 from xxx"
> idfield=3D"ID"
> scriptresponder=3D"gotothis.asp"
> set conntemp=3Dserver.createobject("adodb.connection")
> mdbPath =3D Server.MapPath("xxx.mdb")
> conntemp.open "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
>             "Data Source=3D" & mdbPath & ";" & _
>             "User Id=3Dadmin;" & _
>             "Password=3D;"
> set rstemp=3Dconntemp.execute(mySQL)
> howmanyfields=3Drstemp.fields.count -1
> %>
> <table border=3D"1" width=3D"100%">
> <tr><td valign=3D"top">&nbsp;&nbsp;&nbsp;</td>
> <% 'Put Headings On The Table of Field Names
> for i=3D0 to howmanyfields %>
>        <td align=3Dcenter><b><%=3Drstemp(i).name %></b></td>
> <% next %>
> </tr>
> <% ' Now lets grab all the records
> do  while not rstemp.eof %>
>    <tr><td valign=3D"top">
>    <%my_link=3Dscriptresponder & "?which=3D" & rstemp(idfield)%>
>    <a HREF=3D"<%=3Dmy_link%>"><%=3Dpgm%></a></td>
>    <% for i =3D 0 to howmanyfields%>
>           <td valign=3D"top"><%=3Drstemp(i)%></td>
>    <% next %>
>    </tr>
>    <%
>   rstemp.movenext
> loop
>
> rstemp.close
> set rstemp=3Dnothing
> conntemp.close
> set conntemp=3Dnothing
> %>
> </table>
>
> -----Original Message-----
> From: Carlos Lamar [mailto:lamar@s...]
> Sent: Friday, June 28, 2002 12:01 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] hyperlink for entire table rows
>
>
> Good morning, all!
>
> I create an ASP page which displays query results in a table.  How can
> I
> allow the user to edit a record by simply clicking on the desired row?
> anywhere on the row...  I know how to do this using a cell...  but
> wanted to try something different.
>
> Thanks in advance for your assistance!
> ---Carlos
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *:   xxx.xxx.xxxx
> > *:   xxx.xxx.xxxx   (FAX)
> > *:  clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> 
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
> me
> r-20
> Constructing Accessible Web Sites
> 
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
> me
> r-20
> Practical JavaScript for the Usable Web
> 
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
> me
> r-20
>
Message #3 by Paul R Stearns <pauls@c...> on Fri, 28 Jun 2002 12:26:56 -0400
Put an onclick on the tr line. This might only work in IE.

Paul

Carlos Lamar wrote:

> Good morning, all!
>
> I create an ASP page which displays query results in a table.  How can I
> allow the user to edit a record by simply clicking on the desired row?
> anywhere on the row...  I know how to do this using a cell...  but
> wanted to try something different.
>
> Thanks in advance for your assistance!
> ---Carlos
>
> ____________________________________________________
> Carlos L. LaMar
> Executive VP, IS & Management Development
> snyder/newell, inc.
> > *:   xxx.xxx.xxxx
> > *:   xxx.xxx.xxxx   (FAX)
> > *:  clamar@s...
> > u http://www.snyder-newell.com/
> >
> >
> >
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20

Message #4 by "Carlos Lamar" <lamar@s...> on Fri, 28 Jun 2002 09:00:52 -0700
Good morning, all!

I create an ASP page which displays query results in a table.  How can I
allow the user to edit a record by simply clicking on the desired row?
anywhere on the row...  I know how to do this using a cell...  but
wanted to try something different.

Thanks in advance for your assistance!
---Carlos

____________________________________________________
Carlos L. LaMar
Executive VP, IS & Management Development
snyder/newell, inc.
> *:   xxx.xxx.xxxx
> *:   xxx.xxx.xxxx   (FAX)
> *:  clamar@s...
> u http://www.snyder-newell.com/
>
>
>

  Return to Index