- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 02:28 AM
Hi ,
I want to add a button using UI Macro to the header and on click of the button it should redirect to the incident page.
I tried by creating a UI Macro and invoking it in UI Page. Please let me know what i am missing or an approach with which I can achieve the desired output.
1> created a UI Macro as
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div style='width:100%; font-size: 2em; color: black; text-align: left; background-color: orange;'>
<button type="button" onclick="return TestFunc();">Add Job</button>
<script>
funcion TestFunc()
{
window.location= '/incident.do;
}
</script>
</div>
</j:jelly>
2> Created a UI page
<?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:macro_invoke macro="TestHeader" />
<table>
<tr>
<td style='width: 100px;'>Menu<br/>Option 1<br/>Option 2</td>
<td>Do this
.</td>
</tr>
</table>
</j:jelly>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 06:01 AM
it is working on my instance,
here is the new screenshot :
Have you got the same ?
Kind regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 04:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 04:59 AM
Thanks for the screenshots.
If you can see my initial code, I have put a header there
<div style='width:100%; font-size: 2em; color: black; text-align: left; background-color: orange;'>
So, I checked ur code and if I am removing this code then it is working but I need to place the button on the header.
And then it is not working.
Thanks
Surya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 05:46 AM
Surya,
Replace your line by this following one :
<div style="width:100%;font-size:2em;color:black;text-align:left;background-color:orange;">
Let me know if this works or not
Kind regards,
ZA
Dont feel shy to mark correct or helpful answer if it is correct or helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 05:53 AM
Nope the same issue.
I want a header and a button on header. On click of button should take to incident page.
But the above codes are not working.
Thanks
Surya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 05:55 AM