- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2018 01:35 AM
Now we've tried lots of things already but all we seem to be able to do is get the link to open into a new tab.
We have this on our CMS portal which open a link to a chat window:
a href="$chat_support.do?queueID=${menuO.sys_id}" onclick="window.open('$chat_support.do?queueID=${menuO.sys_id}','chat','width=800,height=600'); return false;">${menuO.name}</a>
But when trying this on the portal via a html widget the onclick section gets striped out.
We've looked at the SN portal training but this isn't covered and I can't find good example of how to do it in the community.
Below is the closest I have gotten to getting there :
adding this to the JSON section
"target": {"value": "_blank",
"displayValue":"_blank"
}
BUT anyone know if you can define the window size by adding a line such as:
"target":{
"value": "_blank",
"displayValue":"_blank"
"height":"600",
"width":"800"}
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 10:03 AM
Dave,
The popup window and reszing working now. I Modified the Circle Icon code in HTML Template and added client script. Changes are here.
<!--// Circle Icon popUp-->
<a ng-click="c.openPopUp()" class="circle_icon {{::options.class_name}} text-{{::options.color}}" >
<span class="image-container" ng-if="options.u_image">
<img class="media-object" src="{{::options.u_image}}" width="55" height="55" alt="${{{options.title}}}" style="cursor:pointer;">
</span>
<h2 style="cursor:pointer;">{{::options.title}}</h2>
<span class="text-muted" style="cursor:pointer;">{{::options.short_description}}</span>
</a>
Added this in client script in Client controller:
// Client script
function() {
var c = this;
c.openPopUp = function() {
var url = "my url";
var popup = window.open (url, "popup", "width=900, height=600");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 07:25 AM
Jeff,
We have to add this in json section on widget, this is where we are having trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 10:03 AM
Dave,
The popup window and reszing working now. I Modified the Circle Icon code in HTML Template and added client script. Changes are here.
<!--// Circle Icon popUp-->
<a ng-click="c.openPopUp()" class="circle_icon {{::options.class_name}} text-{{::options.color}}" >
<span class="image-container" ng-if="options.u_image">
<img class="media-object" src="{{::options.u_image}}" width="55" height="55" alt="${{{options.title}}}" style="cursor:pointer;">
</span>
<h2 style="cursor:pointer;">{{::options.title}}</h2>
<span class="text-muted" style="cursor:pointer;">{{::options.short_description}}</span>
</a>
Added this in client script in Client controller:
// Client script
function() {
var c = this;
c.openPopUp = function() {
var url = "my url";
var popup = window.open (url, "popup", "width=900, height=600");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2018 04:14 AM
brill thanks for this. I also just realised that working on a mac by default a new tab is always created when viewing the browser in full screen but on a Windows machine regardless is you are in full screen the popup appears.