Jump to content

Senda a value from unigui to a webpage input


almoandrioli

Recommended Posts

Hello, im new here. I want to know if its possible to send a value (string, number, etc) from my application to an web page input form.

 

This is the html of the input that i want to pass the value: <input name="nmrProtocolo" type="text" size="12" maxlength="12" value="">

The page have this input and a Search Button.

 

What i need -> I click on a field on my unidbgrid and then this page open with the number of the field on the input field. I only need to click on the search button on the page. Sorry for my english and explanation.

Link to comment
Share on other sites

Hi,

Please explain more, What do you mean by the web page?

May can help, try:
For example:

procedure TMainForm.UniButton1Click(Sender: TObject);
var  yourInputElemName, newValue: string;
begin  
  yourInputElemName := 'nmrProtocolo';  
  newValue := 'Search value';  
  UniSession.AddJS('var _textEl = document.getElementsByName("'+ yourInputElemName +'")[0]; _textEl.value="'+ newValue +'"');
end;

Best regards,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...