quinta-feira, 3 de novembro de 2011

Insert Image/Photo

Insert Image/Photo

In this post we'll insert a picture / photo into the database of contacts. The names of any files
images should be the same field name "firstname".
*** This is just one example, we have other alternatives.
In Settings - Customizations, click in  Contact - Forms.

Select the form Main.


After opening the window for editing the form, click Header.


With the header area selected, select the Insert tab and
click Web Resource.

 Click on the icon to select a Web Resource, and click the New button to add.

Fill in the fields, and click the "Text Editor"


In the editing window under Source, type the following code javascript.

<HTML><HEAD>
< META charset=utf-8>
< SCRIPT>
function inserirfoto()
{
var _nome = this.parent.document.getElementById("firstname").value;
if(_nome != null & _nome.length > 0)
{
document.getElementById("foto").src = "/_imgs/"+_nome+".jpg";
}
}
</SCRIPT>
< /HEAD>
< BODY contentEditable=true onload=inserirfoto()>
< DIV style="POSITION: relative; TOP: -14px; LEFT: -9px"><IMG style="WIDTH: 100px; HEIGHT: 150px" id=foto > </DIV>
< /BODY></HTML>

*** Please note: The address / _imgs is where the images published.
 After entering the code above click "OK" (do not forget to save and publish the customization).
Select the created Web Resource.
Enter the required fields, and click "OK".




Leave the screen as beside.
Save, and do not forget to publish the customization.


Among the database of contacts, type the required fields and
 camo "firstname".
*** Archiving the name of the image must be the same type
 firstname field.

Seja o primeiro a comentar 0 comentários

Postar um comentário

Arquivo do blog

Números de Visitas

  

TOPO