ChronoEngine Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Launch submit URL in a popup window? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Launch submit URL in a popup window?
#8144
cohncons (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Launch submit URL in a popup window? 4 Days, 16 Hours ago Karma: 0  
I'm trying to use a form to launch a hosted remote control tool.

The url for the remote control host works great in the Submit URL, but it changes the entire page to the remote control host. What I would like to do is have the remote control URL opened in a popup window and have the main form window go to my redirect URL.

Any suggestions?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#8164
GreyHead (Admin)
Admin
Posts: 2155
graph
User Online Now Click here to see the profile of this user
Re:Launch submit URL in a popup window? 4 Days, 14 Hours ago Karma: 44  
Hi cohncons,

Add the code to open the popup in the 'OnSubmit after' box, this is executed before the main form redirects.

Bob
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
#8206
cohncons (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Launch submit URL in a popup window? 3 Days, 19 Hours ago Karma: 0  
Bob,

Thanks for the suggestion. I figured that's where I was going, and had hoped to get the quick three line, "here's how you would do it." But, the exercise in hunting down the answer was rewarding.

I now have the popup window working, but I have either uncovered a bug or I'm trying to do more than is possible.

If I put a redirect url in on the Form URLs tab or if I use mosRedirect (doesn't matter if I put it in the on submit before or after code blocks), then the redirects occur, but the popup doesn't launch. If I remove that redirect, then the popup fires properly.

It's not a big issue, because the redirect went to a simple, "Your remote session is launching." page and I just copied that HTML into the on submit -after block.

The first block is the code that launches the popup. I have it in my onsubmit - before block. The second code block in in on submit - after and just serves to keep the main browser window on my site without a blank content area.

I'm sure there's a more optimal way to build the window.open arguments string instead of opening and closing three PHP code blocks, but I needed to keep this simple until I got it working.

Code:

<script type="text/javascript"> { <?php require_once("libraries/joomla/utilities/browser_detection.php"); $url = 'https://www.fastsupport.com/'; $name = 'Cohn Consulting Remote Support Tool'; $status = 'status=no,toolbar=no,scrollbars=no,titlebar=no,menubar=no,resizable=no,width=800,height=480,directories=no,location=no'; $user_browser = browser_detection('browser'); if ($user_browser == 'msie7') { $name='_blank'; } $param1 = '?name=' . $_POST['name']; $param2 = '&supportSessionId=' . $_POST['supportSessionId']; $url.=$param1 . $param2; ?> window.open("<?php echo $url ?>","<?php echo $name ?>","<?php echo $status ?>"); window.focus("<?php echo $name ?>"); void(0); } </script>
Code:

<h2>Your remote support session has been launched.<br /></h2> <p>Please answer 'Yes,' 'OK,' or 'Run' when prompted. </p><p>&nbsp;</p>
I guess my bottom line question is should I expect to be able to launch a popup window and redirect the main page at the same time?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


equalheight If you have any questions you can post to our forums and we will be glad to help ASAP

Members Login






Lost Password?
No account yet? Register

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com

ChronoForms License

equalheightTo be able to continue working at this component we decided to get a small profit out of it but at the same time don't force everybody to pay in order to use this great component.

 

 From version 1.5 and up a link at the bottom of everyform created will be placed, saying "joomla professional work", the link will be to us here htttp://www.chronoengine.com, its illegal to remove this link from the source code unless you have a license,

so the license is very simply for the same ChronoForms component without a link, thats all!

This License is for 5 different websites ONLY. 

 

 However, in order to allow everybody to still use the component and even get out of this, the link is inside a div with class : chronoform , use this to hide the link by using different colors or whatever if you really can't pay, but of course the link is still exists at your page source.

 

The license is ONLY 25$ can be bought here :

 

Thank you!

 

ChronoEngine.com Team 

Joomla Templates and Joomla Tutorials