SayeyeZohor Posted December 11, 2019 Share Posted December 11, 2019 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 Topics that look like this and have not responded: 1- 2- 3- Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 19 minutes ago, SayeyeZohor said: how to open url without popup blocker in browser You should attach click handler on the client side to prevent popup. Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 7 minutes ago, Sherzod said: You should attach click handler on the client side to prevent popup. hi please check sample source and fix that ... thanx http://forums.unigui.com/applications/core/interface/file/attachment.php?id=8306 I'm desperate Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 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 More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 how to add in button click convert ? function click(sender, e, eOpts) { window.open("https://www.google.com", "_blank"); } Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 3 minutes ago, SayeyeZohor said: for this url is not working ... What does not work? Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 4 minutes ago, Sherzod said: What does not work? function click(sender, e, eOpts) { window.open("https://www.digikala.com/", "_blank"); } 1- check this site 2- convert function js to pascal button click code tnx Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 12 minutes ago, SayeyeZohor said: function click(sender, e, eOpts) { window.open("https://www.digikala.com/", "_blank"); } Works for me. 1 Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 6 minutes ago, Sherzod said: Works for me. 2- please convert function js to pascal button click code tnx Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 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 More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 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 More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 8 minutes ago, SayeyeZohor said: yessss but i use that when cellclick in unidbgrid if column = "field1" @Sherzod function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts) { window.open("https://www.google.com/", "_blank"); } Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 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 More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 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 More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 52 minutes ago, SayeyeZohor said: yessss but i use that when cellclick in unidbgrid if column = "field1" Please use the search, you can use "href" for example... Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 11, 2019 Author Share Posted December 11, 2019 1 hour ago, Sherzod said: Please use the search, you can use "href" for example... how open url with another type browser like internet explorer, mozila, chrome, ...? @Sherzod Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 12, 2019 Author Share Posted December 12, 2019 11 hours ago, SayeyeZohor said: how open url with another type browser like internet explorer, mozila, chrome, ...? @Sherzod @Sherzod hi, please refer me to solve that ... tnx Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2019 Share Posted December 12, 2019 42 minutes ago, SayeyeZohor said: how open url with another type browser like internet explorer, mozila, chrome, ...? I'm sorry, I don't understand what you wanted. Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 12, 2019 Author Share Posted December 12, 2019 27 minutes ago, Sherzod said: I'm sorry, I don't understand what you wanted. hi, i want to open url with another browser in my web application like "explorer, Mozila , ..." Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2019 Share Posted December 12, 2019 From which browser? Link to comment Share on other sites More sharing options...
SayeyeZohor Posted December 12, 2019 Author Share Posted December 12, 2019 9 hours ago, Sherzod said: From which browser? yes @Sherzod Link to comment Share on other sites More sharing options...
Ron Posted December 12, 2019 Share Posted December 12, 2019 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now