If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Jhstephenson
Posts: 297 Joined: Wed Apr 22, 2015 11:44 pm
Post
by Jhstephenson » Fri Sep 27, 2019 9:24 pm
I have a form that has a image attribute on it. I have set an HTML attribute so that it shows on the right side of the form.
The html looks like this:
Code: Select all
<div id="imageshadow">
<img src=<<MediaFiles.MediaDocument>> height="300" width="400"/>
</div>
No problem with the display, except I only want to display it if it is not a video file (MP4 or AVI).
How can I condition that attribute for that?
Thanks,
Jim
Jaymer
Posts: 2456 Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:
Post
by Jaymer » Fri Sep 27, 2019 9:27 pm
FILE_EXTENSION()
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jhstephenson
Posts: 297 Joined: Wed Apr 22, 2015 11:44 pm
Post
by Jhstephenson » Fri Sep 27, 2019 9:35 pm
Yeah, I know about that. But how do I put that in the HTML?
customaware
Posts: 2405 Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia
Post
by customaware » Sat Sep 28, 2019 1:10 am
I would try this Jim..
<div id="imageshadow">
<<IF FILE_EXTENSION(MediaFiles.MediaDocument)<>'MP4' AND FILE_EXTENSION(MediaFiles.MediaDocument)<>'AVI' THEN SHOW SECTION_START>>
<img src=<<MediaFiles.MediaDocument>> height="300" width="400"/>
<<SECTION_END>>
</div>
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Jhstephenson
Posts: 297 Joined: Wed Apr 22, 2015 11:44 pm
Post
by Jhstephenson » Tue Oct 01, 2019 5:36 pm
Thanks Mark, that is what I was looking for. I had seen that before but for the life of me could not remember it.