Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 软件时空 > 软件相关 > HowTo Adding images to e-point
【标  题】:HowTo Adding images to e-point
【关键字】:HowTo,Adding,images,to,e-point
【来  源】:http://www.cublog.cn/u/16182/showart.php?id=125429

HowTo Adding images to e-point

Your Ad Here

Adding images to e-point

Summary

This document describes how to add dynamic images to e-point.  This is a simple combination of a couple of standard techniques and can be achieved in minutes.

 

Images can be used to jazz up those rather flat e-point screens.  The screen shot below from a recent demo for estate agents.

 

 

HTML and XML

The XML for adding an image to the screen in e-point is

<img src=”images/mypicture.jpg”></img>

 

where you have added a jpeg picture (mypicture.jpg ), in your images directory.  Any web browser will support .jpg and .gif images (at least).  Photographs are best stored as jpegs and gifs are best for icons and any type of drawings.  Gifs can also be animated, imagine changing a boring choice of setting a lead as hot or cold to an animated roaring fire or shivering polar bear (maybe not!).

Database based Images

The next problem is constructing the XML for an image in e-point.  There are three basic approaches.  The most simple approach is to put the XML in a prompt.  That works and is a good basic way to check the layout etc.

 

The other two approaches are used for dynamic images where the image is based on the contents of the database.  The core method is the standard MERGECODE command.

 

If you enter a database record containing the correct XML, i.e.

Property.image = <img src=”images/mypicture.jpg”></img>

 

Then you can display the image in e-point using

 

<MERGECODE VARIABLE=”Property” FIELD=”Image”/>

 

in a standard prompt.

 

The alternative is to store the name of the image in the database and then construct the XML in POP.

 

This means the database holds just the image name, i.e.

Property.image = images/mypicture.jpg

 

The propery demo used EvaluateCodeBlock to build the image using the following code block

@(ImageName) {begin

local myXML="<img src='" + ImageName + "'></img>";

return (myXML);

end}

 

The image name from the database was passed as a parameter and the destination was a variable svImageName so the image was displayed using

 

<MERGECODE VARIABLE=”svImageName”/>

 

NOTE: Construct the image in a node before the display node to avoid the post processing problem.

 

ANOTHER NOTE:  You can also use this method to convert text fields into pictures, for example, to show an image for the Contact Type.  Just create images with the same names as your Contact Types

 

Contact Type               Image Name

Prospect                        images/ContactType/Prospect.gif

Customer                      images/ContactType/Customer.gif

Etc

 

Now change the code block to build the appropriate names passing the Contact Type as a parameter

 

@(ContactType) {begin

local myXML="<img src='images/ContactType/" + ContactType + ".gif'></img>";

return (myXML);

end}

 

This means you can convert any e-point choices to an appropriate picture.
偶尔写了几行ASP代码, 顺便丰满一下对javascript的知识:【上一篇】
HowTo Call Guide Context Images.pdf:【下一篇】
【相关文章】
  • HowTo Use webframe Debugging Point
  • 公钥密码标准(Public-Key Cryptography Standards)
  • gcc HOWTO中译版
  • The Linux MTD, JFFS HOWTO
  • gentoo学习笔记
  • I/O-Programming-HOWTO完整版(zt)
  • Kernel Korner - Why and How to Use Netlink Socket
  • Torque引擎最精简的torque程序建立环境[含源代码下载](Most Simple&Base Torque Mod Framework)
  • 加上了Projector frustum
  • Torque Game Engine最高价值插件之Water Upgrade介绍(Most valued Plug-in: Water Upgrade)
  • 【随机文章】
  • 论ARPG发展之操作和技能 陈忾
  • Best Practices in Software Test Automation
  • 实例讲解JSP Model2体系结构(中)
  • Web测试的经验
  • 在 Linux 中使用 ReiserFS 文件系统
  • 100个优秀实用性网站
  • 看望恩师九方老师
  • 交通道路监控系统
  • asp.net 2.0 Profile 的一些注意事项(序列化)
  • WebPage类的源代码
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.