Good morning,
i’ve an HtmlPanel embedded in a window.
The code of the htmlpanel is this:
<form action=”http://app.xxx.it/call/default.aspx” method=”POST”>
<div>
<label for=”Name”>Nome</label>
<input name=”Name” id=”Name” type=”hidden” value=”” runat=”server”>
<div>
<label for=”Lastname”>Cognome</label>
<input name=”Lastname” id=”Lastname” type=”hidden” value=”” runat=”server”>
</div>
<div>
<button class=”button-8″> SEND</button>
</div>
</form>
I Would like to assign the value of each input field automatically during load event.
Is there a way to di this?
Hi Angelos,
You can definitely do that!
Each Control or Widget has an InitScript property that you can customize to your liking, with that being said, it can be used to have some custom functions that you can Call them from the server.
Wisej can call JavaScript functions or run any JavaScript scripts , using the Call and Eval methods respectively.
This can be scoped to the entire application (by using Application.Call() or Application.Eval()) or on individual controls (i.e Control.Call() or Control.Eval()).
For more information on this, you can visit:
https://docs.wisej.com/api/wisej.web/general/application#call-function-args
https://docs.wisej.com/api/wisej.web/general/application#eval-script
https://docs.wisej.com/api/wisej.web/content/widget#initscript
I have updated the provided sample and I re-attached it!
HTH,
Alaa
Alaa i’m sorry,
now i would like to “click” programmatically the HTML button without really push it, for example on an event.
Is it possible?
HI Alaa,
thank you very much.
SOLVED!
Hi Angelo,
I have attached a sample that might be of help to you.
Basically, you can assign any placeholder id in your HTML code and then replace it with whatever value you want.
The HtmlPanel has the Html property that you can manipulate, no matter the source.
Please visit : HtmlPanel – Documentation for more info.
HTH,
Alaa
Please login first to submit.