Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Martinsrj

Inserir uma imagem dentro de uma testarea

Recommended Posts

Olá pessoal, beleza?

Tenho um código javascript em uma pagina onde o usuario seleciona um item na combobox e aparece a descrição em uma textarea.

A minha dúvida é como inserir uma imagem do lado esquerdo da palavra SLA: window.document.sistemas1.descrição.value += "\n • >>inserir a imagem aqui<< SLA: Até 2hs corridas para AR - JOB TERMINADO EM ABEND, BILLING - JOB TERMINADO EM ABEND, INDISPONIBILIDADE DE SISTEMA e LENTIDÃO AMDOCS.";

 

O código está funcionando perfeitamente. Exemplo:

<script language="JavaScript" type="text/JavaScript">
<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function P7_JumpMenu(selObj,restore){ //v1.7 by Project Seven
	var theFullString = selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
	var theLength = theFullString.length;
	var endPos = theFullString.lastIndexOf("~");
	var theUrl, theTarget, theParent;
	if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
	else {theUrl = theFullString;}
	endPos++
	if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
	else {theTarget = "window:Main";}
	if (theTarget == "window:New") {window.open(theUrl);}
	else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
	else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7_JumpMenuGo(selName,restore){ //v1.7 by Project Seven
  var selObj = MM_findObj(selName); if (selObj) P7_JumpMenu(selObj,restore);
}
//-->
</script>
<script type="text/javascript" src="menu/stlib.js"></script>
</head><script language="javascript"> 

	var doit = true

	function showm(ob) {
	  
	  if(ob == "newspanel")
	  {
		TAM = "3000"; 
	  }
	  else
	  {
		TAM = "6000";
	  }
	
	  if(doit) {
		document.getElementById(ob).style.height = TAM;
		//document.getElementById(pict).src = 'imagens/arrowl.gif'
		doit = false
	  }
	  else {
		document.getElementById(ob).style.height = '20'
		//document.getElementById(pict).src = 'imagens/arrowd.gif'
		doit = true
	  }
	}

	
	function teste(valor)
	{
		//alert(valor);
		
		switch(valor)
		{
			case "AMDOCS - SGC":
				window.document.sistemas1.descrição.value = "Sistema responsável pelo gerenciamento de todos os clientes Claro.";
				window.document.sistemas1.descrição.value += "\n";
				window.document.sistemas1.descrição.value += "\n •  SLA: Até 2hs corridas para AR - JOB TERMINADO EM ABEND, BILLING - JOB TERMINADO EM ABEND, INDISPONIBILIDADE DE SISTEMA e LENTIDÃO AMDOCS.";
				
				break;
				
			case "AMDOCS":
				window.document.sistemas1.descrição.value = "Sistema responsável pelo gerenciamento de todos os clientes Claro.";
				window.document.sistemas1.descrição.value += "\n";
				window.document.sistemas1.descrição.value += "\nSLA: Até 2hs corridas para AR - JOB TERMINADO EM ABEND, BILLING - JOB TERMINADO EM ABEND, ERRO CONEXÃO METAFRAME, HLR - LENTIDÃO DE PROCESSAMENTO, INDISPONIBILIDADE DE SISTEMA (TODOS OS USUÁRIOS), LENTIDÃO AMDOCS.";
				break;
</select>
<select name="sistemas_crit1" size="1" class="campos77" onChange="java script:teste(this.value);">
   <option value="">Selecione um Sistema de Criticidade 1</option>
   <option value="AMDOCS - SGC">AMDOCS - SGC</option>
   <option value="AMDOCS">AMDOCS</option>
</select>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.