× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike,

I have been working with cgi-dev2 for a few years now and the good news is
that it gets easier. I'm not sure why your records are not being selected
correctly, I would need to see the code snippet for that. But I can tell you
the way sorting can be handled. As programming is not an exact science, I'm
sure there are many.

In the HTML for the columns we added code like this:
<td width="136"><a
href="javascript:sortcol('fieldname','pgmname_list');">Column heading#<img
src="/assets/images/arrowd.png" /></a></td>

The javascript looks like this:
function sortcol(sortcol,formname)
{

var formnm = document.forms[formname];
var sortcolumnvalue = formnm.sortcolumni.value;
formnm.sortcolumni.value = sortcol;
formnm.inpbutton.value='SEARCH ';formnm.submit();return false;

The Rpgle then performs the "SEARCH' which entails adding an "Order by" on
the SQL statement when it reloads.

Not sure if that was what you were looking for, hope it helps,

Lynn

Lynn McManus
BlueFountain Tech.
401 Meridian Street
Suite 300
Huntsville, AL 35801
(256) 319-7851
(256)319-7846 Fax


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Smith, Mike
Sent: Monday, August 26, 2013 9:41 AM
To: 'web400@xxxxxxxxxxxx'
Subject: [WEB400] cgidev2

I am playing a bit with CGIDEV2 but I'm having a bit of a problem.

I have been following an example from this article
http://iprodeveloper.com/rpg-programming/business-quality-rpg-web-applicatio
n

I have this program working, but now I've created a similar program of my
own based on this code.

When I select a record to display I don't get the record I selected. I get
only the first record, or sometimes I get a 'Record not found'

It appears the piece of code that determines what record is selected is a
Javascript function in the HTML.

This might be obvious but how do I debug the javascript function?

Secondly, This program doesn't do all I want. I would like to be able to
sort by clicking on the column headings. Does anyone have an example of how
to do this?

Thanks

MIke
NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this message
in error, or are not the named recipient(s), please immediately notify the
sender and delete this message.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.