- 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 06:45 AM
Hi Dave,
I am also looking for the similar thing. I would like to open a popup window instead of new window/tab. Did you find a solution for this? if so can you share?
Thanks
Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 06:50 AM
Hi
We've kinda found a way of doing it but I still don't like it tbh. On SNGuru they have some modal widgets that kinda get what you want but you miss stuff like the window auto closing after submitting or a message to confirm submission. I guess it depends what you are after but I certainly haven't found a simply onclick open new window 800x600 size for instance.
😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 07:05 AM
Thanks Dave. I will look at this and let you know if I find a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 07:17 AM
<a href="yourpage.htm" target="_blank" onClick="window.open('yourpage.htm','pagename','resizable,height=600,width=800'); return false;">New Page</a>