Home > Archive > dBASE Web Applications > January 2006 > Displaying Multiple HTML Pages and Moving Forward & Backwards









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 Displaying Multiple HTML Pages and Moving Forward & Backwards
Robert Shields

2006-01-30, 8:23 pm

Does anyone have any sample code for displaying multiple HTML pages
using a hyperlink as opposed to a Form Submit?

After generating the first HTML page results, I create a response form
with link at the bottom which looks like this:

F.PUTS('<A
HREF="http://83.146.7.84/cgi-bin/hd_run.exe?SEARCH='+m->search+'& amp;SearchType=BY%20
COMPANY"')

I realize that I have to add a couple of mvar values sent to the CGI
(hd_run.exe) file that will let hd_run.exe know what the next page of
records are to display. I suppose that one mvar could be the number of
records to display per page and on which record the CGI should start
displaying records on the continuation page(s) or when moving forward or
back to any given HTML page.
Claus Mygind

2006-01-31, 9:23 am

Robert,
Sounds like you already have it figured out. Just a couple of things to
watch out for:
1. If the user has changed any information you may wish to save the record
or at least advise the user that the record has changed and give them a
yes/no option to save.

2. You also need to think about eof( ) for either the beginning or ending of
the file when passing your parameters to the receiving app.

Besides using the hyper link in your example you have a couple of other
options which will let you use all the content of your page. You could use
buttons (they are objects and transmit some things that a hype link does
not).

One simple technique is to give the "name" property of each submit button a
different value. This way when the receiving app reads the oCGI array on
the name of the button that was clicked is transmitted. Then just read the
oCGI["your field"] as the next search parameter.

For example if you have two submit buttons:
<input type="submit" name="save"> and
<input type="submit" name="next">
the receiving app would only get the name of the button clicked. then you
just branch from there. Then if next is clicked just branch appropriately
in your receiving app.

Another example would be to use buttons defined as button instead of submit
and assign some javaScript handling code which includes the submitForm(); :
<input type="button" name="Next" onClick="checkForm( );"

puts('<SCRIPT LANGUAGE="JavaScript">')
puts('<!--')
puts('function checkForm( ) { ')
... your code here..
puts(' formSubmit( ); ')
puts( ' } ')
puts('//-->')
puts('</SCRIPT>')

using this option would allow you to read the content of the page before it
is submitted. If the user had changed the content of a field that you
wanted to use as a parameter, then you could read it before submitting the
page.

"Robert Shields" < robertshields@financ
ialmarketsresearch.com> wrote in
message news:ywAFhDgJGHA.1704@news-server...
> Does anyone have any sample code for displaying multiple HTML pages using
> a hyperlink as opposed to a Form Submit?
>
> After generating the first HTML page results, I create a response form
> with link at the bottom which looks like this:
>
> F.PUTS('<A
> HREF="http://83.146.7.84/cgi-bin/hd_run.exe?SEARCH='+m->search+'& amp;SearchType=BY%20
COMPANY"')
>
> I realize that I have to add a couple of mvar values sent to the CGI
> (hd_run.exe) file that will let hd_run.exe know what the next page of
> records are to display. I suppose that one mvar could be the number of
> records to display per page and on which record the CGI should start
> displaying records on the continuation page(s) or when moving forward or
> back to any given HTML page.



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