Jump to content

how to open url to another tab?


SayeyeZohor

Recommended Posts

 

please check sample case and repair that pleaseeeeeee... Sample.rar

 

this code 

UniSession.AddJS('window.open(''https://support.wwf.org.uk'''_blank'');' ); // to open a new window/tab

corect and use my program but open page in popup blocker 

how to open url without popup blocker in browser

 

@Sherzod@Farshad Mohajeri

 

 

01.png

02.png

03.png

 

 

 

 

 

Topics that look like this and have not responded:

 

1-

2-

3-

 

Link to comment
Share on other sites

4 minutes ago, SayeyeZohor said:

hi please check sample source and fix that ... thanx

 

http://forums.unigui.com/applications/core/interface/file/attachment.php?id=8306

For example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  //UniSession.AddJS('window.open(''https://www.google.com'', ''_blank'');'); // to open a new window/tab
end;

UniButton1.ClientEvents.ExtEvents ->

function click(sender, e, eOpts)
{
    window.open("https://www.google.com", "_blank");
}

...

Link to comment
Share on other sites

Just now, SayeyeZohor said:

2- please convert function js to pascal button click code tnx

What do you mean?

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener('click', 'function(sender, e, eOpts){window.open("https://www.digikala.com/", "_blank")}');
end;

?

Link to comment
Share on other sites

9 minutes ago, Sherzod said:

What do you mean?


procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener('click', 'function(sender, e, eOpts){window.open("https://www.digikala.com/", "_blank")}');
end;

?

yessss but i use that when cellclick in unidbgrid if column = "field1"

 

@Sherzod

Link to comment
Share on other sites

16 minutes ago, SayeyeZohor said:

function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
{
   window.open("https://www.google.com/", "_blank");
}

 

procedure TUniF_WebSites.UniDBGrid1CellClick(Column: TUniDBGridColumn);
begin
  IF Column.FieldName = 'LinkAddress' THEN
  BEGIN
    UniSession.AddJS('window.open('+QuotedStr(UQ_WebSitesLinkAddress.AsWideString)+', ''_blank'');'); // to open a new window/tab
  end;
end;

 

Link to comment
Share on other sites

36 minutes ago, Sherzod said:

What do you mean?


procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener('click', 'function(sender, e, eOpts){window.open("https://www.digikala.com/", "_blank")}');
end;

?

how open url with another type browser like internet explorer, mozila, chrome, ...?

Link to comment
Share on other sites

14 hours ago, SayeyeZohor said:

hi, i want to open url with another browser in my web application like "explorer, Mozila , ..."

I don't think you can choose which browser to open.

The default browser will be called, just as when you double-click an .htm file in File Explorer.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...