Hi,
I am trying to code an MVC that returns form fields to the calling page, but can't seem to get this working.
My main.do is defined as the default BSP for the BSP application, and is being called from an independant website.
In my DO_HANDLE_EVENT I would like to return to the calling website populating form fields, but can't seem to get this to work.
I have tried the below...
1) NAVIGATION->RESPONSE_COMPLETE( )
2) NAVIGATION->RESPONSE_COMPLETE( )
navigation->exit( ).
In both cases the MVC leaves a blank screen, but doesn't close itself.
The code in my DO_REQUEST reads...
if is_navigation_requested( ) is not initial.
return.
endif.
Once the navigation is working I would assume the form fields would need to be passed through to RESPONSE in DO_HANDLE_DATA, but I can't even get to that stage.
Assistance appreciated.
Robin
Robin,
The first problem is that your reference world is slightly upside down. So let us put some bits and pieces on the table. With your next questions, we try to bring it more back to normal.
There is a HTTP request, that comes from somewhere (usually a browser) and a HTTP response (that what the server sends back). Nothing else. Only these two concepts.
The concept of "form fields" are only interesting/valid within the context of a HTTP request. Which means only when somebody (the guy talking to us) send us a HTTP request, can we peek inside and look at the form fields.
For the HTTP response (what we are returning), there is only one concept (at our minimal abstraction level): HTML! You can only return a complete page that is full of HTML to the caller (which is usually the browser and it wishes to display this page).
Does this help you? No, probably not. So let me ask some questions in return:
(*) Describe your a simple version of the complete scenario. I suspect you have some external web page, that calls your WhatIsDate.HTM page. And this page must return a string to the sender.
(*) Can we use XML? What type of client is the caller? If a browser, we can consider a JavaScript solution.
brian
Brian,
Hi. I have spoken to my learnered collegues, and the answer lies in Java script. I have implemented their suggestions, and my BSP works now as expected.
So all is solved. I guess shows that as long ask you know what to ask for then you will get the answer.
Thanks for your input.
Regards,
Robin.
Add a comment