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 validate_nhsno sub that does the validation (and I know works properly) is registered to CGI::Ajax as:
my $pjx = new CGI::Ajax( validate_nhsno => \&validate_nhsno );

The template contains the target div, also not shown earlier but basically:
<p><input type="text" id="nhsno" onchange="validate_nhsno(['nhsno'], ['bad_nhsno']); return true;"><b id="bad_nhsno"></b></p>

The fact that I get the validation output in the div:
Content-Type: text/html; charset=ISO-8859-1 invalid NHSNo!
means the system is working, but I cannot find a way of preventing the 'Content-Type: text/html; charset=ISO-8859-1' header appearing. Or have I misunderstood your reply? It's most frustrating as I felt I was close to success, but now feel it's slipping away.
--
Richard Jones
Leeds, UK
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to