easier to read, still impossible to reproduce. You're doing everything 
without using the nice facilities web2py provides, but since you're going 
that way, let's try to break up and analyze the issue.
You're attaching a submit handler and discarding completely the response 
 
$.post($(this).attr('action'), $(this).serialize(), function(response){
    ************ THIS PART NOT WORKING - START **************
            $('#scan_info_previous').load(
"{{=URL('get_patient_scan_info')}}", document.getElementById(
"hidden_patient_id").value);
    OR I've also tried...
    ajax('{{=URL('get_patient_scan_info')}}',['hidden_patient_id'], '
scan_info_previous');
    ************ THIS PART NOT WORKING - END **************
 },'json');

what you're sending to the action url is the inputs serialized as json..... 
and until here, there should be no issues.
When the action url returns something, scan_info_previous should be filled 
with the contents coming from what url ? Here it seems that it's the 
get_patient_scan_info ..... but you seem to want to pass along the 
"hidden_patient_id" parameter with that, and $(element).load() is a jquery 
function that doesn't work the same as the ajax() one that is coded within 
web2py. We don't know how your "get_patient_scan_info" works to give you 
the details on how to pass something to that. Have you at least checked 
that the request to get_patient_scan_info is being fired (i.e. you have 
problems firing the actual request or managing it at web2py's level)?

On Thursday, February 14, 2013 3:26:05 PM UTC+1, AnnG wrote:
>
> Sorry, I've now attached the code as a file.
> I corrected that error, thanks. ....Still doesn't work.
>
>
> On Thursday, February 14, 2013 1:01:46 PM UTC, Niphlod wrote:
>>
>> meh, next time include the code as an attachment or use the google group 
>> interface that can format code inline...far more readable!
>> Anyway, I'm at work and can't test it (nor anyone, without models, 
>> controllers, and so on), but I spotted an error
>>
>> $('scan_info_previous').load("
>> {{=URL('get_patient_scan_info')}}", 
>> document.getElementById("hidden_patient_id").value);
>>
>> if you refer to something like <div id="scan_info_previous"></div> the 
>> jquery selector is
>> $('#scan_info_previous') not $('scan_info_previous')
>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to