RA Jones wrote:
An app. I was developing some time ago seems to have stopped working
properly. The problem seems to involve methods in a CAP::AR delegate
class, which run correctly except when I try to forward to another
sub-routine.
I'm still stuck with an ugly fix on this one. I don't
An app. I was developing some time ago seems to have stopped working
properly. The problem seems to involve methods in a CAP::AR delegate
class, which run correctly except when I try to forward to another
sub-routine. Let me illustrate:
package MyApp::Runmodes;
use strict;
sub runmode_1 {
Jonathan Mangin wrote:
First drop-down: select onBlur=populate_clinicians(['src_id'],
['clin_list']); return true; name=src_id id=src_id option
value=nbsp;/option .. /select
Looks like all the examples of using CGI::Ajax I've seen. Is
populate_clinicians doing a db lookup? If so, isn't that
Michael Peters wrote:
I'm not sure I completely understand what you're looking for here, but if you
want an Ajax call to submit back to the same url you're page is coming from,
then window.location will contain that.
The problem does not arise with CGI::AJAX as it is mostly Perl-driven
and I
Michael Peters wrote:
wrap that bit into a function that you have in a .js file. Something like
function do_cool_stuff(url)
$('#bad_nhsno').load(
url, { # = using TT2 'INTERPOLATE' function
etc,
}
);
And then in your template when you want to use it, do this:
[EMAIL PROTECTED] wrote:
Is this list still active, or has my workplace started to filter
this...
Well, I could throw in a couple of (slightly off-topic) AJAX questions
if anyone cares to field them, or have we had enough of that topic recently?
--
Richard Jones
Leeds, UK
mailto:[EMAIL
Ron Savage wrote:
On Wed, 08 Nov 2006 20:43:36 +, RA Jones wrote:
Hi
Well, I could throw in a couple of (slightly off-topic) AJAX
questions if anyone cares to field them, or have we had enough of
that topic recently?
Throw them in (aka I'm bored...)!
That's what I wanted to hear
David Scott wrote:
RA,
Please summarize your function so we can all benefit.
David,
With pleasure. The validation function is part of a much larger clinical
information system, and validates the UK National Health Service number,
which is a 10-digit unique patient identifier with a
Michael Peters wrote:
Not to add too much to your plate, but you'll also need to use a browser that
has decent debugging tools. I prefer firefox, but some people pay for visual
studio and use IE.
With Firefox, my Ajax debugging goes something like this:
If it's not doing anything, then open up
Ron Savage wrote:
I've just read some of the JQuery docs, and I'd say it's a clever
package, but with an unusual syntax. And since you've not comfortable
with Javascript yet, I don't see the point /for a beginner in this
field/ to try producing production-quality code while learning
Bruce McKenzie wrote:
Your corresponding javascript func must send the string to some target
div or else handle it with another function (a callback) that will
manipulate it further.
I know, I didn't show all the code as I thought it would make the
message unnecessarily long. The
Bruce McKenzie wrote:
with the tiny (~15k) jQuery library loaded, all the javascript you
would have to write would be something like this (assuming you use
rm=runmode in CGIApp)
function validateNHSOwithAjax(myInput){ $('#someHTMLContainer').load(
'myWebApp.cgi', { rm : 'validate_nhso',
Jonathan Mangin wrote:
Well, just to finish the story...
I needed to register the subs this way.
They also need to be defined as run_modes in setup.
my $activity_url = 'fitness.pl?rm=getActivity';
my $daily_url = 'fitness.pl?rm=dispDaily';
my $pjx = new CGI::Ajax('getActivity' =
Cees Hek wrote:
I did a talk on AJAX and perl at YAPC Chicago [1] this year. The
slides for most of the talks are online [2], and I added links to my
slides [3] and source code [4].
Hi Cees, thanks I have downloaded the source code and am working my way
through the files. I cannot see any
Michael Peters wrote:
IMO, saying you want to learn AJAX without learning JS is like saying
you want to learn web programming without learning HTML and HTTP.
Sure there are probably frameworks out there that will hide those
details from you, but sooner or later you're gonna have to get your
Michael Peters wrote:
After the client receives the info from the server it needs to process it. Using
the same cases above:
A) JS usually takes that partial document and injects it into the current page
(in prototype this is done with Element.update).
B) Parse the XML and
1 - extra data
Am using CAP::ValidateRM to handle web-form validation, and all works as
expected - if missing or invalid fields, return $obj-dfv_error_page()
without updating database, otherwise update database and
$obj-forward('desired_runmode').
But now the client wants the database to be updated with fields
Michael Peters wrote:
RA Jones wrote:
Presumably changing all rm's to the current rm is the intended behaviour
of ValidateRM / HTML::FillInForm, but is there anything I can do to
modify this so it works the way I desire, or is it not possible? Hope it
all makes sense.
Well, HTML::FillInForm
Hi group,
My current app under development needs to accept a session id from a
referring (non-CGI:App) application, which uses the same 32-digit
construct (MD5) as used by CGI::Session. The session identifier is
passed in the url, so can be captured by the new application as part of
the
Cees Hek wrote:
On 6/16/06, RA Jones [EMAIL PROTECTED] wrote:
Presumably this is not the correct way to handle new session id
generation in CGI::Session. Is it even possible to force CGI::Session to
use a pre-defined session id string in the first place?
If CGI::Session can not load a session
Barry Hoggard wrote:
I'm getting ready to add an upload meter to some CGI::Application-based
applications, running under mod_perl (1.x). Is there a plugin I've
missed, or a tutorial somewhere I could use? Otherwise I'll just adapt
something from one of the CPAN modules.
I think Cees is
Cees Hek wrote:
CGI::Session-find( sub {} );
I believe that function will load up and decode every session in the
store to check it's expiry time. It is really inefficient for large
numbers of sessions. That is why the 'find' command is much better
for files, and that is why I use the
Michael Peters wrote:
Even the most complicated auth setup can be done in Apache using
mod_perl Authz and Authen handlers. Even though it's running at the
apache level, it's still a part of your application since it's
connecting to your database and has your business logic. It's just done
Michael Graham wrote:
But even before all that, I have to fix a bug in LinkIntegrity which
is currently preventing it from...um...actually working. Film at 11.
That is the one which generates 'Access Denied' on initial access to the
application? I haven't got past that one yet and am running
Ron Savage wrote:
On Mon, 27 Mar 2006 23:47:17 +0100, RA Jones wrote:
I just re-read the CAP::Authentication docs, under 'Choosing a Store', and I
think at least one of us is confused :-). Here's how I see it:
A glimmer of hope then!
o User submits credentials
o Server logs user in, puts flag
Thanks Michael that's just the sort of information I was hoping for. Ron
partly answered in an earlier post which I hadn't noticed when I posed
my question. I do use occasional static pages but they are delivered via
templates through the app so I can still use session stuff.
--
Richard Jones
Hi group,
I've run into an unforeseen problem with the above combination. All
worked fine under development on my system, but transferring to
production for the final test session highlighted the following - if the
user disables cookies then session maintenance fails even when using
session
Ron Savage wrote:
On Mon, 27 Mar 2006 20:38:22 +0100, RA Jones wrote:
Hi RA
is always required irrespective of store method? Is there any way
round this save the horrible kludge of passing the parameter as an
embedded hidden form field or tacked onto the end of clickable
links?
Aren't you
It seems a bit quiet here at the moment. I could do with some help with
CAP::AutoRunmode::FileDelegate - basically I cannot get it to work using
the documentation as provided. Depending on how I configure the system I
get one of the following:
All runmodes including start rm into ./runmodes
Jesse Erlbaum wrote:
Hi Richard --
I can't help you with that error, but out of curiosity: Why did you
choose ::FileDelegate?
Perhaps a more pointed version of the same question: Why did you choose
to use ::FileDeletegate instead of a more fully thought-out server page
system like Mason?
On Tue, 10 Jan 2006, Michael Graham [EMAIL PROTECTED] wrote:
I don't think there is an easy way for you to override generate_id() in
a way that will trick FormState into using a different value for its
ids. The sensible thing to do is to patch CAP::FormState to use
sequential ids.
OK some
On Mon, 9 Jan 2006, Michael Graham [EMAIL PROTECTED] wrote:
One point to remember is that these form state ids are specific to a
particular user session. So any potential collision would have to be
with an existing state for the *same* user.
For this reason, tampering is less of an issue as
Hello group, I'm using CAP::FormState to protect hidden form fields.
Everything appears to work OK, but I notice a large amount of
information build-up in the a_session field of the sessions table (also
using CGI::Session with MySQL for authentication). In particular there
is a large
Hi group,
What is the best way to use DFV (via CAP::ValidateRM) with drop-down
menus which have default as blank?
To elaborate with an example - field entry 'last_name' is required by
check_rm(), so an empty submission should trigger an error, and does.
But the problem is to satisfy HTML
On Thu, 5 Jan 2006, Cees Hek [EMAIL PROTECTED] wrote:
On 1/5/06, RA Jones [EMAIL PROTECTED] wrote:
To elaborate with an example - field entry 'last_name' is required by
check_rm(), so an empty submission should trigger an error, and does.
But the problem is to satisfy HTML validation I have
On Sun, 25 Dec 2005, Ron Savage [EMAIL PROTECTED] wrote:
Sorry, no. But then, I don't ever have to debug my code... Hohohohoho.
Well aren't you the lucky one! For me it's more often a case of decoding
my bugs ;-) Hope everyone is, has or will enjoy the days festivities
(if you celebrate
On Thu, 22 Dec 2005, Michael Peters [EMAIL PROTECTED] wrote:
I decided to play with CAP::DebugScreen (since it uses my CAP::ViewCode and I
was interested to see what someone is doing with my stuff :) and I have to say
that I like it. It's fairly simple and really easy for tracking down fatal
On Sat, 24 Dec 2005, Mark Stosberg [EMAIL PROTECTED] wrote:
On 2005-12-24, Cees Hek [EMAIL PROTECTED] wrote:
I ignored the test failure and installed anyway. However, the author
should be notified I guess...
Done:
http://rt.cpan.org/NoAuth/Bug.html?id=16727
Still having problems with
On Sat, 24 Dec 2005, Mark Stosberg [EMAIL PROTECTED] wrote:
You should get the 500 error for compile time issues, but the
DebugScreen for run time issues. That part works for me.
I know, but it's definitely giving the default 500 error page both
run-time as well as of course compile-time
Reading the thread on 'Good practices: how many run modes in an app' it
is obvious my current application under development is going way over
the 'recommended' upper limit of rm's. I know I need to break it into
smaller units based around functionality, but how?
At the moment my main
On Sun, 18 Dec 2005, Jeff MacDonald [EMAIL PROTECTED] wrote:
I'm at about the same stage of figuring things out as you are, I'd
recommend looking into
C::A::P::Dispatch, it can basically parse your query string, to know
which module handles which runmode, combine that with AutoRunmodes and
you
On Sun, 18 Dec 2005, Rhesa Rozendaal [EMAIL PROTECTED] wrote:
Here's a sketch of my app structure as it is now. I show two parts, the
main, formerly monolithic CgiApp, and one package with a set of run
modes.
package My::MainApp;
use base qw/My::BaseApp/; # I already have this one; it
Hi Jesse,
On Sun, 18 Dec 2005, Jesse Erlbaum [EMAIL PROTECTED] wrote:
[lots of useful remarks]
HTH,
Yes it does - but only to muddy the already murky waters ;-) It is a
counter argument to the one that suggests the fewer the better. Actually
I've no real preference as yet, other than to
In trying to improve my authentication routines I've switched from
CAP::Session to CAP::Authentication. Running the sample file in
CAP::Auth works well, provided I change the package name to match
MyLogin-authen. But when run from my own application in cgiapp_init() I
get the following when
Hi group,
I have a problem with AnyTemplate's Multiple Named Template
Configurations under a mod_perl environment. Following the convention in
AnyTemplate POD, I have the following in cgiapp_init():
$obj-template('no_wrapper')-config( # for templates not requiring
wrapper
type =
On Thu, 8 Sep 2005, Jaclyn Whitehorn [EMAIL PROTECTED] wrote:
While there is such a thing as over-simplifying, I really don't see why
TT can't be covered in a page or two. I personally think that the
book should primarily use HTML::Template, since it's (1) integrated,
and (2) EASY. At some
I have successfully setup my CGI::Applications so that a single app
module can be run under 3 different environments - mod_cgi instance
script, ModPerl::Registry and an Apache PerlResponseHandler, under both
Linux and WinXP OS's on a dual-boot development system. Firstly, is
there any
On Mon, 18 Jul 2005, Michael Graham [EMAIL PROTECTED] wrote:
Trying to get CA plus some plugins working under mod_perl.
CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but
when run under mod_perl:
$self-template-config(
Configs-AT_CONFIG,
);
Do you put the
Trying to get CA plus some plugins working under mod_perl.
CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but
when run under mod_perl:
Error executing run mode 'login': HTML::Template-new() : Cannot open
included file login.html : file not found. at
On Mon, 18 Jul 2005, Michael Graham [EMAIL PROTECTED] wrote:
Hi Ron,
Trying to get CA plus some plugins working under mod_perl.
CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but
when run under mod_perl:
$self-template-config(
Configs-AT_CONFIG,
);
Do you put the
On Fri, 22 Apr 2005, Michael Peters [EMAIL PROTECTED] wrote:
RA Jones wrote:
[..]
Many, many people have used TT and C::A under mod_perl, and
statistically, some of them were probably using windows. I don't think
it's that combination.
To figure it out, you might have to get your hands dirty
On Fri, 22 Apr 2005, Cees Hek [EMAIL PROTECTED] wrote:
[..]
Are you using the experimental XS Stash module with TT? See
Template/Config.pm to see if you are, and if so, try the pure perl one
instead.
To use the pure perl stash, just edit Template/Config.pm and change
the following line:
$STASH
I know it's been quiet on the CA list recently. So a Q to liven it up.
This one was originally posted on the Templates mailing list but got no
takers so I want to try again here (I only use TT via CA so it's sort-of
relevant).
It concerns the Perl interpolate bug, but at a much smaller file
that. And the strange thing is it only
happens when running under mod_perl (Registry or PerlRun), never as a
native CGI application. Does anyone successfully run CA with TT under
mod_perl? Maybe it's a Windows thing? I don't have access to
mod_perl/Apache on a UNIX system (yet).
On Fri, 22 Apr 2005, RA Jones
On Wed, 13 Apr 2005, Emanuele Zeppieri [EMAIL PROTECTED] wrote:
-Original Message-
[...]
The reason for this is in the nature of $return_page. For
H::T-generated
templates it is scalar data (ie the complete HTML return
page), but for
Template-generated templates it prints out as
As mentioned before, I could not get ValidateRM working with
Template.pm's templates within CGI::Application. I can now.
I narrowed the problem down to the check_rm() sub in ValidateRM, and I
know that $err_page is returning empty, so is not triggering the error
page for Template-generated
Hello mailing list,
I am new to both mailing list and OOP. With a little help from Cees Hek
I have managed to get a working web application where I can login,
display a default page and (almost) logout again (see below). I'm using
Template Toolkit and CGI::FormBuilder to manage my html.
But now
On Sun, 3 Apr 2005, Cees Hek [EMAIL PROTECTED] wrote:
On Apr 3, 2005 3:45 PM, RA Jones [EMAIL PROTECTED] wrote:
sub logout { # called via link from web-page:
my $self = shift;
$self-session-delete(); # delete session
$self-tt_params( username = undef ); # delete UserID param
58 matches
Mail list logo