Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic body change
#1
Hello all !
is it possible to change body of http throw intraweb ? 

as an example:
i have a static template
<html>
<body>
#1
#2
#3
<body>
<html>

and i want to replace #1 with my data  and show it to user...

(searched all examples on git and help docs...)


While it get an approvement i already find an answer and have a problem #2 ))

i'm using IWTemplateProcessorHTML>>onunknowntag to create info i needed
and now i need to return info back into intraweb ,...

i tryied to copy function from DBGRID ( <a HREF="#" OnClick="return SubmitClickConfirm('IWDBGRID1','0_name', true, '');">name</a> ) but it do nothing... )



Self answer...
at template add:

<script>
function Submitrowdata(e) {
var a=e
ajaxCall( "Submitrowdata","id="+a )}
</script>

At form "OnCreate" add:


RegisterCallBack('Submitrowdata',
procedure (aParams: TStrings; out aResult: string)
begin
IWMemo1.Lines.Add(aParams.Values['id']);
end
);


Attached Files
.zip   http_test.zip (Size: 435.5 KB / Downloads: 1)
Reply
#2
You can replace content of the DOM and this includes changing the BODY tag content yourself. However if you render INPUT controls you will need to take care of them yourself... the "glue" between the browser and the server, for each control rendered is given by IntraWeb javascript which handles everything for you under the hood. If you do that yourself, you won't have this help from IW javascript code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)