hamze Posted May 20, 2016 Share Posted May 20, 2016 hi i want open an url on its parent by click on a button? thanks Link to comment Share on other sites More sharing options...
Marlon Nardi Posted May 20, 2016 Share Posted May 20, 2016 UniSession.AddJS('window.open("http://google.com")'); 2 Link to comment Share on other sites More sharing options...
hamze Posted May 20, 2016 Author Share Posted May 20, 2016 thanks my problem is Link to comment Share on other sites More sharing options...
Marlon Nardi Posted May 20, 2016 Share Posted May 20, 2016 this really is a problem.who performs this control is the own browser, you have no action on it. Link to comment Share on other sites More sharing options...
hamze Posted May 20, 2016 Author Share Posted May 20, 2016 I'm looking for solutions and true principles Link to comment Share on other sites More sharing options...
zilav Posted May 22, 2016 Share Posted May 22, 2016 Use some css to make html links to appear as a button, then put the usual <a href> code in TUniLabel.Caption 1 Link to comment Share on other sites More sharing options...
hamze Posted May 22, 2016 Author Share Posted May 22, 2016 Use some css to make html links to appear as a button, then put the usual <a href> code in TUniLabel.Caption would you please give me a sample Link to comment Share on other sites More sharing options...
hamze Posted May 23, 2016 Author Share Posted May 23, 2016 help me Link to comment Share on other sites More sharing options...
zilav Posted May 23, 2016 Share Posted May 23, 2016 help me This for CSS, put into ServerModule.CustomCSS http://css3buttongenerator.com/ This for the link UniLabel1.TextConversion := txtHTML; UniLabel1.Caption := '<a class="btn" href="http://address.com" target="_new">Click</a>'; 1 Link to comment Share on other sites More sharing options...
hamze Posted May 23, 2016 Author Share Posted May 23, 2016 This for the link UniLabel1.TextConversion := txtHTML;UniLabel1.Caption := '<a class="btn" href="http://address.com"target="_new">Click</a>' ; 0 because my url is made runtime so this way doesnt work for me Link to comment Share on other sites More sharing options...
ZigZig Posted May 23, 2016 Share Posted May 23, 2016 You can change UniLabel1.Caption in runtime. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2016 Administrators Share Posted May 23, 2016 Do you want to open URL in same window or in a new window? 1 Link to comment Share on other sites More sharing options...
aristeo Posted May 24, 2016 Share Posted May 24, 2016 Do you want to open URL in same window or in a new window? I have the same problem, and I want to open the URL in a new window. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 24, 2016 Administrators Share Posted May 24, 2016 thanks my problem is You need to disable pop-up blocker. It is not something that you can overcome using code. Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 Do you want to open URL in same window or in a new window? of course in the same window Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 You need to disable pop-up blocker. It is not something that you can overcome using code. this is not logically. how another sites are doing this with out disabaling popup Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 24, 2016 Administrators Share Posted May 24, 2016 Same window: UniSession.UrlRedirect('http://www.google.com'); New window: UniSession.BrowserWindow('http://www.google.com', 0, 0, '_blank'); Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 Same window: UniSession.UrlRedirect('http://www.google.com'); New window: UniSession.BrowserWindow('http://www.google.com', 0, 0, '_blank'); does it need to disable popup yet with this code? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 24, 2016 Administrators Share Posted May 24, 2016 Maybe yes. It depends on your browser and redirected URL. If both URLs are in same domain you may not need to disable blocker. Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 my address isn't in same domain. let's explain my problem obviously. i have a Online banking gateway.at first i should send some information then gateway will give me ResID. i should attach ResID to a Url.for example and new create Url opened in same page https://www.sibapal.com/pay?au=ResID or https://www.sibapal.com/pay?au=6029244bsh91 now all opration should do in this Button Link to comment Share on other sites More sharing options...
Sherzod Posted May 24, 2016 Share Posted May 24, 2016 Same window: UniSession.UrlRedirect('http://www.google.com'); Hi, Have you tried to use?! Best regards. Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 this code isn't in version that I am using UniSession.UrlRedirect This code of what version of the existing Framework? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 24, 2016 Administrators Share Posted May 24, 2016 Current version. Link to comment Share on other sites More sharing options...
hamze Posted May 24, 2016 Author Share Posted May 24, 2016 does not work.it needs disbaling popup yet UniSession.UrlRedirect('http://www.google.com'); this is a dirty style procedure TMainForm.UniButton2Click(Sender: TObject); begin UniServerModule.ServerMessages.TerminateTemplate.Text := '<script>location.href=''http://google.com''</script>'; close; end; Link to comment Share on other sites More sharing options...
hamze Posted May 25, 2016 Author Share Posted May 25, 2016 help me This is a really big Bug. what to do 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