Embedd Web page in APPL

BOster

Legendary Poster
Other than CafeOne and the MediaObject control is there any other techniques to embed a web page/url in a JDE APPL? I have used the Media Object control in the past and it works ok. But I am wondering if there is a better way. I could use an E1 page but I really need the URL to be embedded in an APPL or at least have that appearance.
 

craig_welton

Legendary Poster
Hi Brian, We use the text block control and code up an HTML segment that displays a URL in an iFrame. Works pretty well. Let me know if you need an example, not near it right now.

Craig
 

BOster

Legendary Poster
Hi Brian, We use the text block control and code up an HTML segment that displays a URL in an iFrame. Works pretty well. Let me know if you need an example, not near it right now.

Craig

That's a good idea. No hurry but if you can post a simple example that shows the HTML you use for the segment might be helpful. Any advantage over a Media Object control? One issue I have with the MO control is that it is a fixed size and doesn't seem to scale when the window is resized... or I don't know how to make it scale...

Edit:
I think I figured out the TB thing. Didn't realize there was a security setting that had to be set to get this to work.
 
Last edited:

BOster

Legendary Poster
That's a good idea. No hurry but if you can post a simple example that shows the HTML you use for the segment might be helpful. Any advantage over a Media Object control? One issue I have with the MO control is that it is a fixed size and doesn't seem to scale when the window is resized... or I don't know how to make it scale...

Edit:
I think I figured out the TB thing. Didn't realize there was a security setting that had to be set to get this to work.

Ok, I thought I had the text block thing figured out with the security change, but I am still just seeing a text link instead of the web page. Do you have to do this with embedded JS? or is it supposed to be as simple as inserting a text segment like:

Code:
<iframe src="https://webpage.com"></iframe>
 

johndanter

Legendary Poster
If you look at P98220, (OMW) it's doing this with a media object and the Insert URL system function, plus these in the News Status window

Hide the Viewer Icon Panel(FC News/Status Media Object, <Yes>)
Lock the Viewer Splitter Bar(FC News/Status Media Object, <Yes>)
Insert URL(FC News/Status Media Object, " ", VA evt_HTMLFileName)

I've used it before and it works fine
 

BOster

Legendary Poster
Yeah, I have used the media object control in the past. I am looking for something a little better. The media object control doesn't maximize screen real estate efficiently at times. Using the text block control like Craig suggested looks promising. My problem right now is that I can get it to scale to 100% of width, but the height, for what ever reason, is very small... can't get it to take up the full window height.
 

BOster

Legendary Poster
For any that are interested. Ok, finally got the text block control like Craig suggested to work. You have to make a security change and you have to specify pixels for height and width not "100%" in the iframe. As in:

Code:
<iframe src="site.com" height="800" width="1800" frameborder="0"></iframe>

By the way. I didn't fully test it out since a text block control will work, but you can accomplish the same thing (and avoid the security setup) by using a grid with the alternate HTML grid format.

1. Create a grid with one field, DD item URL
2. Under HTML Options select "Use Alternate Grid Format".
3. Under HTML Alternate Grid Format something like "<td>%0%</td>"
4. set GB URL to <iframe src="site.com" height="800" width="1800" frameborder="0"></iframe>
5. Insert the grid buffer row.

I was still having issues with the size of the window which is when I stopped, but I think playing around with the iframe properties and the TD properties you could get it to work.

I have only used the alternate grid format one time - to actually display grid data but I wonder what other "exploits" we could come up with...
 

craig_welton

Legendary Poster
Brian, sorry I was away for a bit. Looks like you've got the text block working as we did, but I wasn't aware of (or forgot about) security setup. Can you explain?

thanks
Craig
 

BOster

Legendary Poster
For our tools release, and later, in security manager (P00950) you have to set "Text Block Control Security" (record type K) to 'N' for the application, or I guess turn it off for all applications. I was simply getting a text segment with the <iframe> tags before our CNC group made the security change.
 

craig_welton

Legendary Poster
Haha. Well now I know why I call the Encode system function after every AddSegment call. That seems to bypass the security need by cleansing the text or something. Funny, IIRC it was needed at 8.98. Anyhoo, you can pass the segment text and need to create another variable to hold the output. I've never debugged to see what the actual output is, just happy it worked.

frm_File is the HTML
evt_String2 is a variable of the same size

00015 Add Segment(FC Text Block 24, VA frm_File, <,Regular,10,Black>, <No>, VA evt_Integer01)
00016 Encode(FC Text Block 24, VA frm_File, VA evt_String2)

Craig
 

BOster

Legendary Poster
LOL. I was calling the Encode BEFORE the Add Segment, then after adding security record had to remove the call since it went back to just outputting the string literal. I was just guessing that the Encode call simply did things like escape characters (&amp, etc.) didn't realize it changed the state of the control... actually seemed weird to me that I had to pass the control as an argument...

Anyway, like you, I am just happy it works now.
 
Top