Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, June 28, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Launch a separate web browser from a menu item.
Jeff L
Posts: 65
 
Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Apr 12 2:33 PM
fiogf49gjkf0d


Hi all,


 


We are using SalesLogix web version 7.5.4.


 


I have been tasked with launching a new web browser window (outside of SLX) from a menu item.  For the life of me I cannot seem to make it work.


 


I can cause the SLX web to redirect to my new web site. But I cannot get a new browser window to 'pop' up.


 


Any ideas?


[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Apr 12 3:08 PM
fiogf49gjkf0d

Are you using a Hyperlink or a Menu?


 


Either way, you have to use the Target option.


For a Menu, the last property shown on the View is called "Target". Enter a value for it, it will cause the Nav URL to be opened on a new window.


 


Here is how you do it on an HTML anchor tag:


<a href="http://www.cnn.com" target="_new">Click here to go to CNN</a>

[Reply][Quote]
Jeff L
Posts: 65
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Apr 12 7:33 AM
fiogf49gjkf0d

Thanks but I was able to do it using Nav Url by calling javascript:window.open('http://...../default.aspx', 'xxxxxx', 'status=no,width=625,height=550');


 


My problem before was the I left off the trailing semicolon.


 


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Apr 12 10:56 AM
fiogf49gjkf0d

Jeff:


  That is indeed another way to get it done, but do keep in mind that it may get blocked by Popup Blockers (depending on which program and settings are used).

[Reply][Quote]
Jeff L
Posts: 65
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 12 10:44 AM
fiogf49gjkf0d


ok I have another issue that is causing me a headache.


I need to pass the current user's Authentication Token to my new web site.


Does anyone have input as to how to get it and added it to the url string such as ...default.aspx?token=......?


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 12 12:25 AM
fiogf49gjkf0d

If you're doing that from a menu item you would need to set the location that the menu goes to at runtime. You can refer to this post on getting access to the menu items from a module: http://customerfx.com/pages/crmdeveloper/2009/07/15/creating-modules-for-saleslogix-web-and-hiding-toolbar-items-at-runtime.aspx This article looks at removing menu items in code, but once you have the menu item you could set it's link location just the same (and append on the authentication token to the URL - see http://customerfx.com/pages/crmdeveloper/2011/12/22/passing-connection-information-from-saleslogix-web-to-another-website.aspx)


Make sense?


Ryan

[Reply][Quote]
Jeff L
Posts: 65
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 12 8:58 AM
fiogf49gjkf0d


Hi Ryan,


 


Thanks for the input. This looks like the way to go.


Can you tell me what version of SLX web your LeadsMenuModule was written for? As it was written in 2009 I assume it was for an older version. We are using SLX Web 7.5.4 and apparently things have changed.  


For example,


1) I cannot find Sage.Platform.Secutity to reference.


2) Objects such as _userService and  _parentWorkItem do not exist in the current context.


Do you have an updated version?


Jeff


 


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 12 4:15 PM
fiogf49gjkf0d

1) You don't need that reference for what you're doing. That was for referencing the current user in that sample (which you don't need)


2) You need to create those properties in your module. In the article, it mentions you need to create the dependency injection properties as:


 


using Sage.Platform.Application;
//...

private UIWorkItem _parentWorkItem;
[ServiceDependency(Type=typeof(WorkItem))]
public UIWorkItem ParentWorkItem
{
get { return _parentWorkItem; }
set { _parentWorkItem = value; }
}

 


The UIWorkItem object will be injected into the ParentWorkItem property at runtime and you'll be able to use it to get to the Toolbar workspace and then get the MenuService from there.

[Reply][Quote]
Jeff L
Posts: 65
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:11 AM
fiogf49gjkf0d

Thanks Ryan,


 


After some hair pulling, I was finally to take you example and work out a solution that worked. Not a whole lot different than what you presented, but different all the same.


Now, I have but one more headache to deal with.  When the menu item is slected and my new web site appears in a new browser window, SLX is showing a white screen with only the word 'null' on it. Click the back button once and we are back at SLX as expected.


What is causing the white screen with 'null' on it?


How do I prevent or automatically recover from it?


Jeff


P.S. this problem was happeing before I added the code to pass the Token.


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 11:17 AM
fiogf49gjkf0d

Jeff:


 


  I have ran into this before. Try returning false:


  "javascript:window.open(your parameters); return false;"


Or, if that doesn't work:


  "javascript:window.open(your parameters);1=2;"


 


 

[Reply][Quote]
Jeff L
Posts: 65
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 12:15 PM
fiogf49gjkf0d

Thanks Raul, 


I thought I had the return in there.


Alas one syntaic headache after another.


When I add the return such as "javascript:window.open(your parameters); return false;" I get 'Return outside function error. But when I use the 1=2 it works. Neat trick. Can you explain what's going on with that?


Jeff



[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 1:45 PM
fiogf49gjkf0d

Quote:
Originally posted by Jeff L
Can you explain what's going on with that?



 


The reason for this is that window.open returns an object. The browser is trying to display the result of the function call  (Because it is on the HREF area of the Anchor tag, if this was an onclick event this wouldn't happen either).


For example, the alert function returns undefined, so doing javascript:alert('test'); will not affect your page.


 


So, there are several ways to work around it, one is the method I showed you (adding 1=2 as a second call to stop execution.


Another is to create your own js function and call it there:


"javascript:func=function(){window.open('http://www.cnn.com');}; func();"


Since the function we defined has no return statement, it will return "undefined", and the browser won't do anything else.


 


 

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 4:04 PM
fiogf49gjkf0d

In addition to Raul's suggestion, instead of using Javascript, just set the URL of the menu item normally, but then set the Target to "_blank" and it will cause it to open in a new window. IIRC the Target property is exposed on the nav items.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 4:15 PM
fiogf49gjkf0d

Quote:
Originally posted by Ryan Farley
In addition to Raul's suggestion, instead of using Javascript, just set the URL of the menu item normally, but then set the Target to "_blank" and it will cause it to open in a new window. IIRC the Target property is exposed on the nav items.



Ryan, that was indeed my first suggestion to the original post....


 


 

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Launch a separate web browser from a menu item.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Apr 12 4:20 PM
fiogf49gjkf0d

Ah right. Just went back up and reread through the posts. 


Jeff, switch from using javascript for the link to just a normal link (you can even set the target in AA, then all you need to do is just set the URl normally). Then all should work.

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/28/2025 7:43:43 AM