Home > Archive > dBASE Web Applications > January 2006 > How to navigate the record in web page?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to navigate the record in web page?
Michael NG

2006-01-11, 1:23 pm

I try to navigate the record in web page but found that the "goto" function
not work. Below is the code I used.

rmember = dmember.member1.rowset
fmember = rmember.fields
rmember.indexname := "memberno"
rmember.first()

if .not. empty(cParam1)
rmember.goto(cParam1)
else
rmember.first()
endif
crecord = rmember.rowno()

Can someone show me a way to do that ? Thanks in advance.

Best Rgds,
Michael



Ken Mayer [dBVIPS]

2006-01-11, 1:23 pm

Michael NG wrote:
> I try to navigate the record in web page but found that the "goto" function
> not work. Below is the code I used.
>
> rmember = dmember.member1.rowset
> fmember = rmember.fields
> rmember.indexname := "memberno"
> rmember.first()
>
> if .not. empty(cParam1)
> rmember.goto(cParam1)
> else
> rmember.first()
> endif
> crecord = rmember.rowno()
>
> Can someone show me a way to do that ? Thanks in advance.


The rowset's goto() event works with bookmarks. Rather than "goto" try
using findKey() ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Michael NG

2006-01-11, 8:23 pm

Hi Ken,

Thanks for your reply. But findkey does not fit into this situation. I
want to get the row number instead to act as a parameter so as to navigate
within the rowset.

Michael

"Ken Mayer [dBVIPS]" < dbase@_nospam_golden
stag.net> ???
news:n1HRTMuFGHA.1584@news-server ???...
> Michael NG wrote:
function[color=darkr
ed]
>
> The rowset's goto() event works with bookmarks. Rather than "goto" try
> using findKey() ...
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase



Ken Mayer [dBVIPS]

2006-01-11, 8:23 pm

Michael NG wrote:
> Hi Ken,
>
> Thanks for your reply. But findkey does not fit into this situation. I
> want to get the row number instead to act as a parameter so as to navigate
> within the rowset.


Rownumbers don't exist when using the data objects in dBASE. It ignores
them completely, because the dBF format is the only table that actually
has those built in.

Suggest you use a unique value ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Claus Mygind

2006-01-13, 9:23 am

Ken is right. Use rmember.setRange( cParam1 ) with a partial key to
return a desired rowset. then use rmember.next( ) or rmember.next( -1) to
navigate through the rowset.

For navigation with OODML look in help under:
..first( )
..last( )
..next( )
..endOfSet
..applyFilter( )
..setRange( )


Michael NG

2006-01-13, 8:23 pm

Thanks for your advise. But seems this only apply in desktop application,
not work in web application. I have to pass back a value when the users
press the navigation key. For my application I use :

oCGI.streamDetail([<A HREF="/cgi-bin/editmember.exe?MEMBERNO=]+"'"+;
fmember["MEMBERNO"].value.righttrim()+"'"+[">]+;
"First"+[</A>] )

and it dosn't work. Any sugestion please ?

Michael


"Ken Mayer [dBVIPS]" < dbase@_nospam_golden
stag.net> ???
news:JKpjPDxFGHA.1080@news-server ???...
> Michael NG wrote:
navigate[color=darkr
ed]
>
> Rownumbers don't exist when using the data objects in dBASE. It ignores
> them completely, because the dBF format is the only table that actually
> has those built in.
>
> Suggest you use a unique value ...
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase



Claus Mygind

2006-01-16, 7:23 am

Michael,
For one thing you have too many quotes.

There should be no double "s around /cig-bin..."

Second you don't need single 's around fmember...

Third if the value of fmember["MEMBERNO"].value
contains a blank in the string you will need to escape it.

The word First is part of the anchor label so you don't
have to separate it out. Just put it between the > <
no quotes


This line should look like this (note to start with make sure it is one
line)
([<A HREF=/cgi-bin/editmember.exe?MEMBERNO=]+
class::escapeURL(fme
mber["MEMBERNO"].value)+
[>First</A>])



function escapeURL(cData)
// Bowen Moursund (dBASE, Inc.)
// March 2000
local cRetStr, nLen, cChar, i
cRetStr = ""
nLen = len(cData)
for i = 1 to nLen
cChar = substr(cData, i, 1)
if cChar = " "
cRetStr += "+"
elseif not cChar $
" =0123456789abcdefghi
jklmnopqrstuvwxyzABC
DEFGHIJKLMNOPQRSTUVW
XYZ"
cRetStr += "%"+itoh(asc(cChar))
else
cRetStr += cChar
endif
next i
return cRetStr


"Michael NG" <micnghl@china21.com> wrote in message
news:8ySyNGKGGHA.1284@news-server...
> Thanks for your advise. But seems this only apply in desktop application,
> not work in web application. I have to pass back a value when the users
> press the navigation key. For my application I use :
>
> oCGI.streamDetail([<A HREF="/cgi-bin/editmember.exe?MEMBERNO=]+"'"+;
> fmember["MEMBERNO"].value.righttrim()+"'"+[">]+;
> "First"+[</A>] )
>
> and it dosn't work. Any sugestion please ?
>
> Michael
>
>
> "Ken Mayer [dBVIPS]" < dbase@_nospam_golden
stag.net> ???
> news:JKpjPDxFGHA.1080@news-server ???...
> navigate
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com