Jelly scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 06:48 AM
Hi All,
I have a textbox in portal. The user will input the value in textbox and click on Submit.
On Submit, I want to write a jelly script so that it compares the data input by user in textbox with the data base table to see if it matches and if so, it returns a field value.
Eg : If a user enters k001 in the textbox in portal, the script should match this k001 with the list of records in table xyz and if it finds a match it outputs a fields (abc) value.
Thanks in advance
surya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 07:19 AM
Hello Surya,
You can use a GlideAjax call in the onclick javascript for your button to get the data on the server and then process the response as you wish.
Regards,
Timmy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 07:25 AM
Hi Timmy
I have placed the button as dynamic content to place it in portal.
I am not sure how I can use GlideAjax in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 07:31 AM
Can you show what you have in your dynamic content block for your page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2016 07:33 AM
Hi Timmy
This is the dynamic content.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<input id="name" spellcheck="false"
maxlength="32" style="direction:ltr; " name="name"
onchange="onChange('name');"
value="${name}" class="form-control" autocomplete="off" type="text" />
<button class="button" style="vertical-align:middle;font-weight:bold;color:black" onclick="location.href='https://your.service-now.com/Xyz/Abc.do'" type="button"><span>Submit</span></button>
</j:jelly>