Jump to content

open url on its parent page by click button


hamze

Recommended Posts

Hello,

 

It seems that we don't understand correcty your issue, because none of us is able to reproduce it.

 

So could you please:

- post a sample project that shows your problem;

- specifiy your exact configuration (uniGUI and Delphi version, OS, browser, AV...)

 

Thanks!

Link to comment
Share on other sites

Mask, glad to see I make you laugh, even if you try to talk to Farshad about me in Farsi, which is not very polite.

I just wanted to help you, and I cannot reproduce your issue (nobody can).

 

Sorry, I won't try to help you anymore, your last answer looks like a troll to me.

  • Upvote 1
Link to comment
Share on other sites

Anyway, UniSession.UrlRedirect('http://www.google.com') works iike a charm, even with a popup-blocker : the same window changes to Google page without blocking.

Tested on MS Edge, IE11, Chrome and Firefox (latest uniGUI build : 1301).

  • Upvote 2
Link to comment
Share on other sites

Anyway, UniSession.UrlRedirect('http://www.google.com') works iike a charm, even with a popup-blocker : the same window changes to Google page without blocking.

Tested on MS Edge, IE11, Chrome and Firefox (latest uniGUI build : 1301).

thanks.
please give me a sample that be contained this code
Link to comment
Share on other sites

If you compile my previous code, you'll get the same exe file.  And once again, it would be so much easier if you provide a sample test case with your issue, and if you specify your conf (OS version, browser version, AV, Delphi version, uniGUi version, aso), so that we can understand where is your problem.

 

Anyway, here is a short video that shows how this code works perfectly:

.
  • Upvote 3
Link to comment
Share on other sites

Dear Mask, I think it will be better if YOU make an exe file that has an edit text to enter an url, then calls UrlRedirect by pressing a button (just like I did) and see what will happen.  If it doesn't work, then would you please upload your project, so that we can see where is your issue ?

If I send you a compiled binary file, how will it help you?

  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...

 

Same window:

UniSession.UrlRedirect('http://www.google.com');

New window:

UniSession.BrowserWindow('http://www.google.com', 0, 0, '_blank');

 

On vanilla chrome 51.0.2704.103 m, BrowserWindow() function opens both a tab and a new browser window. I guess it does everything to bypass popup blockers.

Link to comment
Share on other sites

  • 6 years later...
On 5/24/2016 at 7:23 PM, Farshad Mohajeri said:

Same window:

UniSession.UrlRedirect('http://www.google.com');

New window:

UniSession.BrowserWindow('http://www.google.com', 0, 0, '_blank');

Hi Farshad,
Is it possible to hide paramter in this functioin 
UniSession.UrlRedirect('http://www.google.com/SingleSignon.do?key=UjJsZ3p4Z0xnSmRHL2tBT2MxW');

Link to comment
Share on other sites

1 hour ago, EDOM said:

Is it possible to hide paramter in this functioin 
UniSession.UrlRedirect('http://www.google.com/SingleSignon.do?key=UjJsZ3p4Z0xnSmRHL2tBT2MxW');

Also this post may help you:

 

Link to comment
Share on other sites

15 hours ago, Sherzod said:

Also this post may help you:

 

Thank you for your prompt reply
This method can hide parameters but the page will be show in a new window.
How to implement this method in the original window?

Link to comment
Share on other sites

2 hours ago, Sherzod said:

Or window.location.href

Hi Sherzod,

The problem has been solved.

same window and hide parameter

UniSession.AddJS(
  'var f=document.createElement(''form''); '+
  '    f.style.display=''none''; '+
  '    f.action='''+sURL+'''; '+
  '    f.method=''post''; '
  '    f.innerHTML=''<input type="hidden" name="PARAMETER_NAME" value="PARAMETER_VALUE"/>''; '+
  '    document.body.appendChild(f); '+
  '    f.submit(); '
);

thank you for the information.

  • Like 1
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...