I just started using UI last week. I have my first project almost done. In order to demo it to managment, I need to have a .pdf pop up in a seperate window that can be moved and resized. Also I have images I want the user to be able to resize, now they are fixed. These are scanned a/p invoices, so some of the them are hard to read unless to can expand them.
Thanks
-dan
PDF in a new pop up window
-
- Profound User
- Posts: 35
- Joined: Fri Jul 12, 2013 12:58 pm
- First Name: Dan
- Last Name: Pankowski
- Company Name: Sinclair Services
- Phone: 8015242956
- Address 1: 550 E South Temple
- City: Salt Lake City
- State / Province: Utah
- Zip / Postal Code: 84102
- Country: United States
- Contact:
-
- Profound User
- Posts: 35
- Joined: Fri Jul 12, 2013 12:58 pm
- First Name: Dan
- Last Name: Pankowski
- Company Name: Sinclair Services
- Phone: 8015242956
- Address 1: 550 E South Temple
- City: Salt Lake City
- State / Province: Utah
- Zip / Postal Code: 84102
- Country: United States
- Contact:
Re: PDF in a new pop up window
I was able to use an onClick
for the hyperlink:
{
window.open("http://socadmin:8090/profoundui/userdata/rvi/pcard.pdf");
}
This works but, I need to change the url it's opening. The hyperlink will be in a grid, so the url will be different in each sfl record.
Thanks
for the hyperlink:
{
window.open("http://socadmin:8090/profoundui/userdata/rvi/pcard.pdf");
}
This works but, I need to change the url it's opening. The hyperlink will be in a grid, so the url will be different in each sfl record.
Thanks
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: PDF in a new pop up window
The ID's in a grid are suffixed by the row number. The row is passed in a variable (named 'row') to your onclick code.
Profound UI provides an API named get() that's an easy way to retrieve the value of an element. The parameter to get() is the ID of the element to retrieve. (Note that ID may be different from the bound variable name, depends on how you coded it. Also, ID is case-sensitive.)
So, for example, if you had a button in a subfile that needs to retrieve the contents of a field that has the ID of 'ItemNo" from the same subfile record, you can do this:
Even though you assign the ID 'ItemNo' to the subfile record, Profound UI will automaticalyl add a dot followed by row number, so the first row is "ItemNo.1", the second row is "ItemNo.2", and so forth. So we build the ID name on the fly with "ItemNo." + row to get the same subfile row as the one that has been clicked. Then, we pass that to get() to get the value of the ITemNo field, and use it to build a URL to pass to window.open().
Make sense?
Profound UI provides an API named get() that's an easy way to retrieve the value of an element. The parameter to get() is the ID of the element to retrieve. (Note that ID may be different from the bound variable name, depends on how you coded it. Also, ID is case-sensitive.)
So, for example, if you had a button in a subfile that needs to retrieve the contents of a field that has the ID of 'ItemNo" from the same subfile record, you can do this:
Code: Select all
window.open("/profoundui/userdata/rvi/item" + get("ItemNo." + row) + ".pdf");
Make sense?
-
- Profound User
- Posts: 35
- Joined: Fri Jul 12, 2013 12:58 pm
- First Name: Dan
- Last Name: Pankowski
- Company Name: Sinclair Services
- Phone: 8015242956
- Address 1: 550 E South Temple
- City: Salt Lake City
- State / Province: Utah
- Zip / Postal Code: 84102
- Country: United States
- Contact:
Re: PDF in a new pop up window
Thanks Scott,
That work perfectly!
Thanks again
-dan
That work perfectly!
Thanks again
-dan
Who is online
Users browsing this forum: Bing [Bot] and 1 guest