- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2016 01:18 AM
Hello,
Consider I have a list of questions. When I click on the first question, it should automatically take me to the bottom of the page.
window.scrollTo(0,document.body.scrollHeight); won't work as document won't work in API.
Thanks
Saranya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2016 08:39 PM
Hello Mansoor,
I got the solution for the same.
$scope.scrollTo = function(id) {
var old = $location.hash();
$location.hash(id);
$anchorScroll();
//reset to old to keep any additional routing logic from kicking in
$location.hash(old);
};
<sp-model form-model="::data.sc_cat_item" mandatory="mandatory" ng-click="scrollTo('e30904d54f83e200bb603f828110c721')" ></sp-model>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 04:42 AM
hello Saranya S Babu
I Also Facing Same Problem
Please Explain Deeply.
$scope.scrollTo = function(id) {
var old = $location.hash();
$location.hash(id);
$anchorScroll();
//reset to old to keep any additional routing logic from kicking in
$location.hash(old);
};
<sp-model form-model="::data.sc_cat_item" mandatory="mandatory" ng-click="scrollTo('e30904d54f83e200bb603f828110c721')" ></sp-model>
Actually I Am New For
ServiceNow,How I Use Above
Code.
Below Video I Mentioned
My Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 10:07 PM
Hello Dinesh,
Ca you please share me the code which you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 10:34 PM
Hello
Saranya
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate>
var kburl = "/$knowledge.do?";
if ("${RP.getParameterValue('sysparm_search')}" != "")
kburl += "query=${RP.getParameterValue('sysparm_search')}&sysparm_type_filter=all&sysparm_order=relevancy";
if ("${RP.getParameterValue('category')}" != "") {
kburl += "sysparm_type_filter=all&";
kburl += "sysparm_kb=dfc19531bf2021003f07e2c1ac0739ab&";
kburl += "sysparm_category=${RP.getParameterValue('category')}&";
kburl += "browse_type=categories";
}
</g:evaluate>
<div id="loading-gif" class="loading-wrapper">
<img src="loading_gif.gif" width="441" height="291" />
</div>
<div class="">
<iframe scrolling="no" onload="applyStyle()" width="100%" height="100%" name="gsft_main" id="gsft_main" frameborder="0" border="0" allowtransparency="true" src="${kburl}" />
</div>
<g:macro_invoke macro="vs_frame_after_script" />
</j:jelly>
Thanks For Your Reply And Please Help For My Issue
Thanks
Dinesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 03:25 AM
Hello Saranya
Still I Am Waiting For Your Responce, Where I Use This Code Please Help To Me
Thanks
Dinesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 04:56 AM
Hello Raghu,
I hope you are using the CMS..
Above code was for service portal
In the jelly script you pass the sys_id of the variable or div id and call that on the client script..