Alteração no formulário

2 participantes

Ir para baixo

Tópico resolvido Alteração no formulário

Mensagem por GSCode 07.02.16 5:13

Detalhes da questão


Endereço do fórum: http://pxd-nwd.forumeiro.com/
Versão do fórum: PunBB

Descrição


Tenho esse formulário: http://pxd-nwd.forumeiro.com/h1-
Quero que ao selecionar alguma opção gere o titulo do que clicou, exemplo
Quero um avatar... Vou selecionar a opção "Avatar" e automaticamente o Titulo do tópico vai ser [PEDIDO] Avatar
Entenderam? 
Código:
<div id="content"><div id="emptyidleft"></div><div id="main"><div id="main-content"><div class="module main d27353" style="overflow:visible"><div class="main-content" style="padding:0"><div class="zf79e4b0 "><script type="text/javascript">//<![CDATA[
function AT_adFillSlot(){document.write('<scr' + 'ipt type="text/javascript">function FB_adFillSlotR(){document.write(\'<iframe src="//t.mdn2015x4.com/build/9cc5c76f/v1/script/" frameborder="0" width="728" height="90" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>\');}</scr' + 'ipt><scr' + 'ipt language="JavaScript" type="text/javascript">rp_account="11662";rp_site="36492";rp_zonesize="151250-2";rp_adtype="js";rp_smartfile="[SMART FILE URL]";</scr' + 'ipt><scr' + 'ipt type="text/javascript" src="http://ads.rubiconproject.com/ad/11662.js"></scr' + 'ipt>');}//]]>
</script><script type="text/javascript">//<![CDATA[
document.MAX_ct0 ='';var m3_u = (location.protocol=='https:'?'https://cas.criteo.com/delivery/ajs.php?':'http://cas.criteo.com/delivery/ajs.php?');var m3_r = Math.floor(Math.random()*99999999999);var channel = "zoneid=140812&prlog=";document.write("<scr"+"ipt type='text/javascript' src='"+m3_u);document.write(channel);document.write("&nodis=1");document.write('&cb=' + m3_r);if (document.MAX_used != ',') document.write("&exclude=" + document.MAX_used);document.write(document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));document.write("&loc=" + escape(window.location));if (document.referrer) document.write("&referer=" + escape(document.referrer));if (document.context) document.write("&context=" + escape(document.context));if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {document.write("&ct0=" + escape(document.MAX_ct0));}if (document.mmm_fo) document.write("&mmm_fo=1");document.write("'></scr"+"ipt>");//]]>
</script><script type="text/javascript" src="http://cas.criteo.com/delivery/ajs.php?zoneid=140812&prlog=&nodis=1&cb=97306466194&exclude=undefined&charset=UTF-8&loc=http%3A//webgraphic.forumeiro.com/h7-&referer=http%3A//webgraphic.forumeiro.com/f13-javascript-e-jquery"></script><script type="text/javascript">AT_adFillSlot();</script><script type="text/javascript">function FB_adFillSlotR(){document.write('<iframe src="//t.mdn2015x4.com/build/9cc5c76f/v1/script/" frameborder="0" width="728" height="90" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>');}</script><script language="JavaScript" type="text/javascript">rp_account="11662";rp_site="36492";rp_zonesize="151250-2";rp_adtype="js";rp_smartfile="[SMART FILE URL]";</script><script type="text/javascript" src="http://ads.rubiconproject.com/ad/11662.js"></script><script type="text/javascript">rp_requests = new RubiconAdServing.Requests(); rp_requests.sendRequest('151250-2');</script><script type="text/javascript" src="http://optimized-by.rubiconproject.com/a/11662/36492/151250-2.js?&cb=0.6298556795809418&tk_st=1&rp_s=c&p_exp=1&p_pos=atf&p_screen_res=1600x900"></script><div id="sonar-admedium-961DAC02-top"><iframe id="sonar-admedium-961DAC02-iframe" frameborder="0" width="728" height="90" scrolling="no" style="border:0 none transparent;" onload="sociomantic.sonar.ssp['rubicon-us'].onloadBannerIframe( '961DAC02', this )"></iframe></div><div id="sonar-admedium-961DAC02"><script type="text/javascript">var sonar_admedia=sonar_admedia||{};sonar_admedia['961DAC02']={size:3,ref:'forumeiros.com',uid:'13260138598330746789',cid:'8471',aaid:'16004373614630142623',bwa:'43BA9F76219513D0',ssp:'rubicon-us',ts:1454733158,sig:'CJ57UfaJtVIV6PpL7lRd9-EWOLvZ9kQ1szzjfiHICMiLU5p-c-i1cQZm19tWM-NDU0nWViBWcPR-Z0CY9J-LEc0JTww*'};</script></div><script type="text/javascript">(function(){var s=document.createElement('script');var x=document.getElementsByTagName('script')[0];s.type='text/javascript';s.async=true;s.src=('https:'==document.location.protocol?'https://':'http://')+ 'us-sonar.sociomantic.com/js/2010-07-01/adpan/rubicon-us?2013-07-23';x.parentNode.insertBefore(s,x);})();</script><div style="height: 0px; width: 0px; overflow: hidden">
<script>
(function() {var proto = document.location.protocol; var server="http://tap2-cdn.rubiconproject.com"; if (proto == "https:") server="https://tap-secure.rubiconproject.com"; document.write('<iframe src="'+server+'/partner/scripts/rubicon/emily.html?rtb_ext=1&pc=11662/36492&geo=sa&co=br" frameborder="0" marginwidth="0" marginheight="0" scrolling="NO" width="0" height="0" style="height: 0px; width: 0px"></iframe>'); })();
</script><iframe src="http://tap2-cdn.rubiconproject.com/partner/scripts/rubicon/emily.html?rtb_ext=1&pc=11662/36492&geo=sa&co=br" frameborder="0" marginwidth="0" marginheight="0" scrolling="NO" width="0" height="0" style="height: 0px; width: 0px"></iframe>

</div>

<script src="http://s.update.rubiconproject.com/2/873648/analytics.js?si=36492&di=webgraphic.forumeiro.com&ti=3ae3f2b9-0e8a-47ac-8a2b-ee09775aa9d2&dt=8736481428691810142000" async="true"></script>

<div id="beacon_0b4bfdb4eb" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">
<img width="0" height="0" src="http://cat.ny.us.criteo.com/delivery/lg.php?cppv=1&cpp=mnTe%2Fnw5dE9pcHl1dEdJZlVOSjg2RzFhUmdIUGhUa2JzYkg5amQ3bWgwS1pJeDh4enlhY0RpU25kbk1YQXRJNlhlZW5ieWVSYy9NeFhjNkdvN2pvMnV2OUQxU1EybVRkcnVlZVJSblR4MU9FRllyQlQ1MEdWNGtVZFBzT3paNXA0Yk5tYlE5V1djMVhEaGh0NFVhNmE1WnhlTkhxcS9yWkxnL1V5S3dNUGg2ZkVtRjFCWEhVaVNmd1BiY1MydnFmbkI4dE1jUStJSFVlcjR2QVJYMGxqTk04QmowLyt4UnpJN3hFWUZYZzBmWWNjMWZNPXw%3D">
</div>

<br class="clear"></div><div style="clear:both;"></div><style type="text/css">html body .zf79e4b0,html body .zf79e4b0 iframe,html body iframe[name="google_ads_frame"],html body .zf79e4b0 iframe[name="google_ads_frame"],html body #wrap #page-body div.zf79e4b0,html body #page-body .zf79e4b0{display:block!important;visibility:visible!important;float:none!important;position:inherit!important;left:inherit!important;top:inherit!important;right:inherit!important;bottom:inherit!important;margin:0 auto!important;filter:alpha(opacity=100)!important;-moz-opacity:1!important;-khtml-opacity:1!important;opacity:1!important;z-index:9999!important;text-align:center!important}html body .zf79e4b0,html body .zf79e4b0 iframe[name="google_ads_frame"]{width:728px!important;height:90px!important;min-height:90px!important}html body .zf79e4b0 iframe{border:0px!important}html body iframe[name="google_ads_frame"]{width:100%!important;height:inherit!important;min-height:inherit!important}</style></div></div><div style="height:3px"></div><style>
  #right, #content-container div#right {height: 0px;} #content-container #content {margin-right: 0px !important;} 
  .module{display:none;}
  #form-send, .form-info h3 {
  background: #fcfcfc;
  border: 1px solid #ddd;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  }
  #form-send select, .form-info h3 {
  font: 16px bold arial, tahoma, georgia;
  }
  .form-info h3 {padding: 3px;font-weight: bold;text-align: center;}
  #form-send select {
  min-width: 150px;
  padding: 4px;
  cursor: pointer;
  outline: none;
  border: 1px solid #e0e0e0;
  background: white;
  }
  .warn1 {
  background: #f3e3e6 url(http://i55.servimg.com/u/f55/18/71/50/00/highli10.png) repeat-x 0 0;
  border: 1px solid #e599aa;
  margin: 3px 0;
  color: #80001c;
  padding: 1em;
  text-align: center;
  }
  fieldset.form-div dt {
  padding: 5px 0;
  }
  fieldset.form-div dt {
  float: left;
  font: 15px bold arial, tahoma, georgia;
  width: 13em;
  }
  fieldset.form-div dd {
  margin-left: 10em;
  }
  fieldset.form-div dl:nth-child(odd) {
  background: #f5f8fa !important;
  }
  fieldset.form-div dl:nth-child(even) {
  background: #fff;
  }
  fieldset.form-div input {
  -moz-border-radius: 1px;
  -webkit-border-radius: 1px;
  border-radius: 1px;
  outline: none;
  border: 1px solid #f0f0f0;
  padding: 5px;
  }
  #countitle {
  background: white;
  color: #D60B8C;
  border: 1px solid #e0e0e0;
  padding: 5px;
  border-radius: 3px;
  }
  fieldset.form-div dl {padding: 11px;border-bottom: 1px solid #F3F3F3;}
  fieldset.form-div dl:after {
  clear: both;
  content: '.';
  display: block;
  height: 0px;
  visibility: hidden;
  }
  #form-send .area .buttons {
  -moz-background-clip: padding;
  -moz-border-radius: 3px 3px 0 0;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-background-clip: padding-box;
  -webkit-border-radius: 3px 3px 0 0;
  -webkit-user-select: none;
  background: #f7f7f7;
  background-clip: padding-box;
  border: 1px solid silver;
  border-radius: 3px 3px 0 0;
  line-height: 0;
  width: 100%;
  overflow: hidden;
  padding: 3px 5px 2px;
  }
  #form-send .area {
  display: inline-block;
  min-height: 330px;
  z-index: 3;
  width: 63%;
  }
  #form-send .description {
  display: inline-block;
  z-index: 3;
  min-height: 200px;
  position: absolute;
  background: white;
  margin: 0 0 0 20px;
  line-height: 18px;
  color: #000000;
  font-family: Calibri, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  padding: 1em;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid silver;
  width: 17%;
  }
  #form-send .area .buttons .button2 {
  background: white;
  cursor: pointer;
  outline: none;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  padding: 3px;
  }
  #form-send .area .buttons .button2:hover {border-color: #707070;}
  #form-send .textarea_nc #textarea {
  min-height: 200px;
  color: #111;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 13px;
  overflow: auto;
  border: 0;
  outline: none;
  width: 100%;
  }
  #form-send .btns {
  background: #f5f5f5;
  border-top: 1px solid #d7d7d7;
  padding: 10px;
  text-align: center;
  }
  #form-send .area .textarea_nc {
  background: white;
  min-height: 200px;
  cursor: se-resize;
  -moz-border-radius: 0 0 3px 3px;
  -webkit-border-radius: 0 0 3px 3px;
  border-radius: 0 0 3px 3px;
  overflow: hidden;
  padding: 3px 5px 2px;
  border: 1px solid silver;
  border-top: 0;
  width: 100%;
  }
  #pr-modal {
  position: fixed;
  background-color: #3e3e3e;
  height: 100%;
  width: 100%;
  top: 0px;
  left: 0px;
  z-index: 100;
  opacity: 0.5;
  }
  #pr-questao {
  background-color: #464646;
  background-color: rgba(70, 70, 70, 0.6);
  padding: 4px;
  -webkit-box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7);
  -moz-box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7);
  box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7 );
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  position: absolute;
  z-index: 101;
  width: 70%;
  left: 14.5%;
  top: 50%;
  margin-top: -58px;
  }
  #pr-questao .postm {
  background: #fff;
  border: 1px solid #eee;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  }
  #pr-questao .pr-clo {
  background: url(http://i.imgur.com/qRr3WvV.png) no-repeat;
  cursor: pointer;
  height: 16px;
  width: 16px;
  float: right;
  }
</style>
<script>
  $(document).ready(function() {
  $('#send').click(function() {
   if($('#radio').val()!=='' && $('#endereco').val()!=='' && $('#textarea').val()!=='') {
    var radio = $('#radio').val();
    var endereco = $('#endereco').val();
    var texto = $('#textarea').val();
    final = '[b]Meu pedido:[/b]\n[quote]'+texto+'[/quote]\n[hr]\n[b]Imagens à serem usadas:[/b]\n'+endereco+'\n\n';
    $('input[name="subject"]').val(radio);
    $('input[name="message"]').val(final);
    $('#send2').click();
    $('#form-send').slideUp(300);
    $('#enviando').slideDown(500);
   }
   else {
    $('.alert').slideUp(1);
    $('.alert').slideDown(500);
   }
  });
  $('#prevquestion').click(function() {
    var radio = $('#radio').val();
    var endereco = $('#endereco').val();
    var texto = $('#textarea').val();
  final = '<b>Minha questão:</b><br /><blockquote><div>'+texto+'</div></blockquote><br /><hr /><br /><b>Imagens à serem usadas:</b><br />'+endereco+'<br /><br />';
    $('#pr-modal').fadeIn(300);
    $('#pr-questao').slideDown(500);
    $('#pr-questao .entry-content').html(final);
  });
  $('.pr-clo').click(function() {
    $('#pr-modal').fadeOut(800);
    $('#pr-questao').slideUp(500);
  });
  $('#apagar-td').click(function() {
          $('#form-send input[type="text"],#form-send textarea').val('');
  });
  $('#radio').keyup(function() {
     var tvalue = document.getElementById('radio').value.length;
     var icnt = document.getElementById('countitle');
     if(tvalue < 10 && tvalue > 0) {
       var l = tvalue-10;
       icnt.innerHTML='O título necessita mais '+l*-1+' caracteres';
     }
     else {
       icnt.innerHTML='';
     }
  });
  });
</script>
  <script>
function yourFunction(){
      var versao = $('#versao').val();
  if (versao === 'js') {
  $('#forum').attr("value","13");
  }else if (versao === 'css') {
  $('#forum').attr("value","14");
  }else if (versao === 'html') {
  $('#forum').attr("value","12");
  }else if (versao === 'other') {
  $('#forum').attr("value","30");
  }

    setTimeout(yourFunction, 2000);
}

yourFunction();
    </script>
  <div id="pr-modal" style="display: none;"></div>
  <div id="pr-questao" style="display: none;">
      <span class="pr-clo"></span>
      <div class="postm">
        <div class="post-entry">
         <div class="entry-content"></div>
        </div>
      </div>
  </div>
  <div class="warn1 alert" style="display: none">
     É necessário preencher todos os campos em branco.</div>
  </div>
  <div class="warn1">
  <b>Nota:</b> Antes de postar,  verifique se está tudo correto.
  </div>
<form action="/post" method="post" name="post" id="form-send" enctype="multipart/form-data">
  <fieldset class="form-div">  
  &nbsp;&nbsp;&nbsp;<input type="radio" name="opcao" value="[PEDIDO] Assinatura" onclick="radio('subject',this.value);">&nbsp;<font size="2">Assinatura</font>&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;<input type="radio" name="opcao" value="[PEDIDO] Avatar" onclick="radio('subject',this.value);">&nbsp;<font size="2">Avatar</font>&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;<input type="radio" name="opcao" value="[PEDIDO] Avatar + Assinatura" onclick="radio('subject',this.value);">&nbsp;<font size="2">Avatar e Assinatura</font>&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;<input type="radio" name="opcao" value="[PEDIDO] Assinatura PRO" onclick="radio('subject',this.value);">&nbsp;<font size="2">Assinatura PRO</font>&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;<input type="hidden" value="" id="subject" name="subject"><br><br>
  <dl><dt>
  <label>Imagens à serem usadas:</label></dt>
  <dd>
    <input type="text" style="clear: both;width: 400px;" id="endereco" value="">
  </dd>
  </dl>
  <dl><dt>
  <label>Informações sobre o Pedido:</label></dt>
  <dd>
    <div class="area">
     <div class="buttons">
      <button class="button2" onclick="bbcode_tag('[b]','[/b]')" type="button" id="addbbcode0" title="Negrito"><img src="http://imgur.com/z2xtYUE.png" alt="Negrito" title="Negrito"></button>
      <button class="button2" onclick="bbcode_tag('[i]','[/i]')" type="button" id="addbbcode2" title="Itálico"><img src="http://imgur.com/EcEpCJ9.png" alt="Itálico" title="Itálico"></button>
      <button class="button2" onclick="bbcode_tag('[u]','[/u]')" type="button" id="addbbcode4" title="Underline"><img src="http://imgur.com/i6Ergr1.png" alt="Underline" title="Underline"></button>
      <button class="button2" onclick="bbcode_tag('[strike]','[/strike]')" type="button" id="addbbcode5" title="Strike"><img src="http://i.imgur.com/hWWoJSN.png" alt="Strike" title="Strike"></button>
      <button class="button2" onclick="bbcode_tag('[left]','[/left]')" type="button" id="addbbcode52" title="Esquerda"><img src="http://2img.net/i/fa/wysiwyg/text_align_left.png" alt="Esquerda" title="Esquerda"></button>
      <button class="button2" onclick="bbcode_tag('[center]','[/center]')" type="button" id="addbbcode30" title="Centralizar"><img src="http://2img.net/i/fa/wysiwyg/text_align_center.png" alt="Centralizar" title="Centralizar"></button>
      <button class="button2" onclick="bbcode_tag('[right]','[/right]')" type="button" id="addbbcode32" title="Direita"><img src="http://2img.net/i/fa/wysiwyg/text_align_right.png" alt="Direita" title="Direita"></button>
      <button class="button2" onclick="bbcode_tag('[justify]','[/justify]')" type="button" id="addbbcode33" title="Justificado"><img src="http://2img.net/i/fa/wysiwyg/text_align_justify.png" alt="Justificado" title="Justificado"></button>
      <button class="button2" onclick="bbcode_tag('[code]','[/code]')" type="button" id="addbbcode41" title="code"><img src="http://i.imgur.com/LEJ7qoj.png" alt="Code" title="Code"></button>
      <button class="button2" onclick="bbcode_tag('[list][*]','[/list]')" type="button" id="addbbcode10" title="-Lista"><img src="http://2img.net/i/fa/wysiwyg/text_list_bullets.png" alt="-Lista" title="-Lista"></button>
      <button class="button2" onclick="bbcode_tag('[list=1][*]','[/list]')" type="button" id="addbbcode12" title="Lista ordenada"><img src="http://2img.net/i/fa/wysiwyg/text_list_numbers.png" alt="Lista ordenada" title="Lista ordenada"></button>
      <button class="button2" onclick="bbcode_tag('[img]','[/img]')" type="button" id="addbbcode14" title="Imagem"><img src="http://2img.net/i/fa/wysiwyg/picture.png" alt="Imagem" title="Imagem"></button>
      <button class="button2" onclick="bbcode_tag('[url=','][/url]')" type="button" id="addbbcode16" title="Link"><img src="http://2img.net/i/fa/wysiwyg/link.png" alt="Link" title="Link"></button>
     </div>
     <div class="textarea_nc">
      <textarea id="textarea" class="inputbox"></textarea>
     </div>
    </div>
  </dd>
  </dl>
  </fieldset><div class="btns">
    <input type="hidden" name="f" value="1">
    <input type="hidden" name="subject">
    <input type="hidden" name="message">
    <input type="hidden" name="mode" value="newtopic">
    <input type="hidden" name="lt" value="0">
    <input type="button" value="Enviar" id="send" name="post"> <input type="button" value="Pré-visualizar" id="prevquestion"> <input type="button" value="Apagar tudo" id="apagar-td">
    <input type="submit" style="display: none;" id="send2" name="post">
</div>
</form><div id="enviando" style="display:none;">
  <center>
   <img src="http://2img.net/i/fa/admin/wait_preview.gif" alt="carregando" title="enviando..."><br>
   <span class="conteudo_texto">enviando...</span>
  </center>
</div>
<script>
function bbcode_tag(o,c){
var t=jQuery('#textarea');t.val(t.val().substring(0,t[0].selectionStart)+o+t.val()</div></div></div></div></div><div id="right"><div class="module main">
                                 
 <div class="main-head">
                                                   
 <div id="statusTitle" class="h3">
                                 <em class="fa fa-comment-o"> </em>  <span id="statusAtual">Carregando status atual...</span>                              
 </div>
                                         
 </div>
                                 
 <div class="main-content clearfix">
                                                   
 <div id="statusUpdateBody">
                                                                 
 <center>
                                                <input style="width: 100px;" type="text" id="statusUpdate" />                <input type="submit" style=" margin-top: -3px; " value="OK" id="statusUpdateButton" />                <br />Atualize seu status aqui, máximo de 10 carateres, evite texto ofensivo!      
 </center>
                                                         
 </div>
                            <script>
            jQuery(function () {
                jQuery('#statusUpdateButton').click(function () {
                    var USER_ID = _userdata["user_id"];
                    var statusText = jQuery('#statusUpdate').val();
                    var TID = jQuery('input[name="tid"]').val() + '';
                    jQuery.post("/ajax_profile.forum?jsoncallback=?", {
                        id: "1",
                        user: USER_ID,
                        active: "1",
                        content: '[["profile_field_13_1", "' + statusText + '"]]',
                        tid: TID
                    }, function (data) {
                        jQuery('#statusUpdate').val('');
                        jQuery('#statusTitle').html('Carregando novo estado...<span id="statusNovoAtual" style="display:none;"></span>');
                        jQuery('#statusNovoAtual').load('profile?mode=editprofile&page_profil=informations #', function () {
                            jQuery('#statusNovoAtual').hide();
                            var statusTextAtual = jQuery('#statusNovoAtual #profile_field_13_1').val();
                            jQuery('#statusTitle').html('Status atual: <span id="statusAtualText">"' + statusTextAtual + '"</span>');
                            var statusTextChat = jQuery('#statusAtualText').text();
                        });
                        console.log("OK: ajax_profile, userID = " + USER_ID);
                    }, "json").fail(function () {
                        alert("Houve um erro a atualizar o status! Se este problema persistir, contate os administradores.")
                        console.log("error: ajax_profile, userID = " + USER_ID);
                    });
                });
            });
            jQuery(function () {
                jQuery('#statusAtual').load('profile?mode=editprofile&page_profil=informations #profile_field_13_1', function () {
                    jQuery('#statusAtual').hide();
                    var statusText = jQuery('#statusAtual #profile_field_13_1').val();
                    jQuery('#statusTitle').html('Status atual: <br/><span id="statusAtualText">"' + statusText + '"</span>');
                });
            });
        </script>                  
 </div>
</div>
      
<script>function radio(nameObtido,valObtido){jQuery('[name="'+nameObtido+'"]').val( valObtido );}
function gerarf() {
}</script></div></div> 


Última edição por GSCode em 07.02.16 13:18, editado 1 vez(es)
GSCode
GSCode
Membro

Membro desde : 11/10/2013
Mensagens : 591
Pontos : 1031

http://testforumbrasil.forumeiros.com/forum

Ir para o topo Ir para baixo

Tópico resolvido Re: Alteração no formulário

Mensagem por RafaelS. 07.02.16 12:37

Olá!

Troque por este:
Código:
<div id="content"><div id="emptyidleft"></div><div id="main"><div id="main-content"><div class="module main d27353" style="overflow:visible"><div class="main-content" style="padding:0"><div class="zf79e4b0 "><script type="text/javascript">//<![CDATA[
function AT_adFillSlot(){document.write('<scr' + 'ipt type="text/javascript">function FB_adFillSlotR(){document.write(\'<iframe src="//t.mdn2015x4.com/build/9cc5c76f/v1/script/" frameborder="0" width="728" height="90" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>\');}</scr' + 'ipt><scr' + 'ipt language="JavaScript" type="text/javascript">rp_account="11662";rp_site="36492";rp_zonesize="151250-2";rp_adtype="js";rp_smartfile="[SMART FILE URL]";</scr' + 'ipt><scr' + 'ipt type="text/javascript" src="http://ads.rubiconproject.com/ad/11662.js"></scr' + 'ipt>');}//]]>
</script><script type="text/javascript">//<![CDATA[
document.MAX_ct0 ='';var m3_u = (location.protocol=='https:'?'https://cas.criteo.com/delivery/ajs.php?':'http://cas.criteo.com/delivery/ajs.php?');var m3_r = Math.floor(Math.random()*99999999999);var channel = "zoneid=140812&prlog=";document.write("<scr"+"ipt type='text/javascript' src='"+m3_u);document.write(channel);document.write("&nodis=1");document.write('&cb=' + m3_r);if (document.MAX_used != ',') document.write("&exclude=" + document.MAX_used);document.write(document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));document.write("&loc=" + escape(window.location));if (document.referrer) document.write("&referer=" + escape(document.referrer));if (document.context) document.write("&context=" + escape(document.context));if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {document.write("&ct0=" + escape(document.MAX_ct0));}if (document.mmm_fo) document.write("&mmm_fo=1");document.write("'></scr"+"ipt>");//]]>
</script><script type="text/javascript" src="http://cas.criteo.com/delivery/ajs.php?zoneid=140812&prlog=&nodis=1&cb=97306466194&exclude=undefined&charset=UTF-8&loc=http%3A//webgraphic.forumeiro.com/h7-&referer=http%3A//webgraphic.forumeiro.com/f13-javascript-e-jquery"></script><script type="text/javascript">AT_adFillSlot();</script><script type="text/javascript">function FB_adFillSlotR(){document.write('<iframe src="//t.mdn2015x4.com/build/9cc5c76f/v1/script/" frameborder="0" width="728" height="90" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>');}</script><script language="JavaScript" type="text/javascript">rp_account="11662";rp_site="36492";rp_zonesize="151250-2";rp_adtype="js";rp_smartfile="[SMART FILE URL]";</script><script type="text/javascript" src="http://ads.rubiconproject.com/ad/11662.js"></script><script type="text/javascript">rp_requests = new RubiconAdServing.Requests(); rp_requests.sendRequest('151250-2');</script><script type="text/javascript" src="http://optimized-by.rubiconproject.com/a/11662/36492/151250-2.js?&cb=0.6298556795809418&tk_st=1&rp_s=c&p_exp=1&p_pos=atf&p_screen_res=1600x900"></script><div id="sonar-admedium-961DAC02-top"><iframe id="sonar-admedium-961DAC02-iframe" frameborder="0" width="728" height="90" scrolling="no" style="border:0 none transparent;" onload="sociomantic.sonar.ssp['rubicon-us'].onloadBannerIframe( '961DAC02', this )"></iframe></div><div id="sonar-admedium-961DAC02"><script type="text/javascript">var sonar_admedia=sonar_admedia||{};sonar_admedia['961DAC02']={size:3,ref:'forumeiros.com',uid:'13260138598330746789',cid:'8471',aaid:'16004373614630142623',bwa:'43BA9F76219513D0',ssp:'rubicon-us',ts:1454733158,sig:'CJ57UfaJtVIV6PpL7lRd9-EWOLvZ9kQ1szzjfiHICMiLU5p-c-i1cQZm19tWM-NDU0nWViBWcPR-Z0CY9J-LEc0JTww*'};</script></div><script type="text/javascript">(function(){var s=document.createElement('script');var x=document.getElementsByTagName('script')[0];s.type='text/javascript';s.async=true;s.src=('https:'==document.location.protocol?'https://':'http://')+ 'us-sonar.sociomantic.com/js/2010-07-01/adpan/rubicon-us?2013-07-23';x.parentNode.insertBefore(s,x);})();</script><div style="height: 0px; width: 0px; overflow: hidden">
<script>
(function() {var proto = document.location.protocol; var server="http://tap2-cdn.rubiconproject.com"; if (proto == "https:") server="https://tap-secure.rubiconproject.com"; document.write('<iframe src="'+server+'/partner/scripts/rubicon/emily.html?rtb_ext=1&pc=11662/36492&geo=sa&co=br" frameborder="0" marginwidth="0" marginheight="0" scrolling="NO" width="0" height="0" style="height: 0px; width: 0px"></iframe>'); })();
</script><iframe src="http://tap2-cdn.rubiconproject.com/partner/scripts/rubicon/emily.html?rtb_ext=1&pc=11662/36492&geo=sa&co=br" frameborder="0" marginwidth="0" marginheight="0" scrolling="NO" width="0" height="0" style="height: 0px; width: 0px"></iframe>

</div>

<script src="http://s.update.rubiconproject.com/2/873648/analytics.js?si=36492&di=webgraphic.forumeiro.com&ti=3ae3f2b9-0e8a-47ac-8a2b-ee09775aa9d2&dt=8736481428691810142000" async="true"></script>

<div id="beacon_0b4bfdb4eb" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">
<img width="0" height="0" src="http://cat.ny.us.criteo.com/delivery/lg.php?cppv=1&cpp=mnTe%2Fnw5dE9pcHl1dEdJZlVOSjg2RzFhUmdIUGhUa2JzYkg5amQ3bWgwS1pJeDh4enlhY0RpU25kbk1YQXRJNlhlZW5ieWVSYy9NeFhjNkdvN2pvMnV2OUQxU1EybVRkcnVlZVJSblR4MU9FRllyQlQ1MEdWNGtVZFBzT3paNXA0Yk5tYlE5V1djMVhEaGh0NFVhNmE1WnhlTkhxcS9yWkxnL1V5S3dNUGg2ZkVtRjFCWEhVaVNmd1BiY1MydnFmbkI4dE1jUStJSFVlcjR2QVJYMGxqTk04QmowLyt4UnpJN3hFWUZYZzBmWWNjMWZNPXw%3D">
</div>

<br class="clear"></div><div style="clear:both;"></div><style type="text/css">html body .zf79e4b0,html body .zf79e4b0 iframe,html body iframe[name="google_ads_frame"],html body .zf79e4b0 iframe[name="google_ads_frame"],html body #wrap #page-body div.zf79e4b0,html body #page-body .zf79e4b0{display:block!important;visibility:visible!important;float:none!important;position:inherit!important;left:inherit!important;top:inherit!important;right:inherit!important;bottom:inherit!important;margin:0 auto!important;filter:alpha(opacity=100)!important;-moz-opacity:1!important;-khtml-opacity:1!important;opacity:1!important;z-index:9999!important;text-align:center!important}html body .zf79e4b0,html body .zf79e4b0 iframe[name="google_ads_frame"]{width:728px!important;height:90px!important;min-height:90px!important}html body .zf79e4b0 iframe{border:0px!important}html body iframe[name="google_ads_frame"]{width:100%!important;height:inherit!important;min-height:inherit!important}</style></div></div><div style="height:3px"></div><style>
  #right, #content-container div#right {height: 0px;} #content-container #content {margin-right: 0px !important;}
  .module{display:none;}
  #form-send, .form-info h3 {
  background: #fcfcfc;
  border: 1px solid #ddd;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  }
  #form-send select, .form-info h3 {
  font: 16px bold arial, tahoma, georgia;
  }
  .form-info h3 {padding: 3px;font-weight: bold;text-align: center;}
  #form-send select {
  min-width: 150px;
  padding: 4px;
  cursor: pointer;
  outline: none;
  border: 1px solid #e0e0e0;
  background: white;
  }
  .warn1 {
  background: #f3e3e6 url(http://i55.servimg.com/u/f55/18/71/50/00/highli10.png) repeat-x 0 0;
  border: 1px solid #e599aa;
  margin: 3px 0;
  color: #80001c;
  padding: 1em;
  text-align: center;
  }
  fieldset.form-div dt {
  padding: 5px 0;
  }
  fieldset.form-div dt {
  float: left;
  font: 15px bold arial, tahoma, georgia;
  width: 13em;
  }
  fieldset.form-div dd {
  margin-left: 10em;
  }
  fieldset.form-div dl:nth-child(odd) {
  background: #f5f8fa !important;
  }
  fieldset.form-div dl:nth-child(even) {
  background: #fff;
  }
  fieldset.form-div input {
  -moz-border-radius: 1px;
  -webkit-border-radius: 1px;
  border-radius: 1px;
  outline: none;
  border: 1px solid #f0f0f0;
  padding: 5px;
  }
  #countitle {
  background: white;
  color: #D60B8C;
  border: 1px solid #e0e0e0;
  padding: 5px;
  border-radius: 3px;
  }
  fieldset.form-div dl {padding: 11px;border-bottom: 1px solid #F3F3F3;}
  fieldset.form-div dl:after {
  clear: both;
  content: '.';
  display: block;
  height: 0px;
  visibility: hidden;
  }
  #form-send .area .buttons {
  -moz-background-clip: padding;
  -moz-border-radius: 3px 3px 0 0;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-background-clip: padding-box;
  -webkit-border-radius: 3px 3px 0 0;
  -webkit-user-select: none;
  background: #f7f7f7;
  background-clip: padding-box;
  border: 1px solid silver;
  border-radius: 3px 3px 0 0;
  line-height: 0;
  width: 100%;
  overflow: hidden;
  padding: 3px 5px 2px;
  }
  #form-send .area {
  display: inline-block;
  min-height: 330px;
  z-index: 3;
  width: 63%;
  }
  #form-send .description {
  display: inline-block;
  z-index: 3;
  min-height: 200px;
  position: absolute;
  background: white;
  margin: 0 0 0 20px;
  line-height: 18px;
  color: #000000;
  font-family: Calibri, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  padding: 1em;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid silver;
  width: 17%;
  }
  #form-send .area .buttons .button2 {
  background: white;
  cursor: pointer;
  outline: none;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  padding: 3px;
  }
  #form-send .area .buttons .button2:hover {border-color: #707070;}
  #form-send .textarea_nc #textarea {
  min-height: 200px;
  color: #111;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 13px;
  overflow: auto;
  border: 0;
  outline: none;
  width: 100%;
  }
  #form-send .btns {
  background: #f5f5f5;
  border-top: 1px solid #d7d7d7;
  padding: 10px;
  text-align: center;
  }
  #form-send .area .textarea_nc {
  background: white;
  min-height: 200px;
  cursor: se-resize;
  -moz-border-radius: 0 0 3px 3px;
  -webkit-border-radius: 0 0 3px 3px;
  border-radius: 0 0 3px 3px;
  overflow: hidden;
  padding: 3px 5px 2px;
  border: 1px solid silver;
  border-top: 0;
  width: 100%;
  }
  #pr-modal {
  position: fixed;
  background-color: #3e3e3e;
  height: 100%;
  width: 100%;
  top: 0px;
  left: 0px;
  z-index: 100;
  opacity: 0.5;
  }
  #pr-questao {
  background-color: #464646;
  background-color: rgba(70, 70, 70, 0.6);
  padding: 4px;
  -webkit-box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7);
  -moz-box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7);
  box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.7 );
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  position: absolute;
  z-index: 101;
  width: 70%;
  left: 14.5%;
  top: 50%;
  margin-top: -58px;
  }
  #pr-questao .postm {
  background: #fff;
  border: 1px solid #eee;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  }
  #pr-questao .pr-clo {
  background: url(http://i.imgur.com/qRr3WvV.png) no-repeat;
  cursor: pointer;
  height: 16px;
  width: 16px;
  float: right;
  }
</style>
<script>
  $(document).ready(function() {
  $('#send').click(function() {
   if($('#radio').val()!=='' && $('#endereco').val()!=='' && $('#textarea').val()!=='') {
    var radio = $('#radio').val();
    var endereco = $('#endereco').val();
    var texto = $('#textarea').val();
    final = '[b]Meu pedido:[/b]\n[quote]'+texto+'[/quote]\n[hr]\n[b]Imagens à serem usadas:[/b]\n'+endereco+'\n\n';
    $('input[name="subject"]').val(radio);
    $('input[name="message"]').val(final);
    $('#send2').click();
    $('#form-send').slideUp(300);
    $('#enviando').slideDown(500);
   }
   else {
    $('.alert').slideUp(1);
    $('.alert').slideDown(500);
   }
  });
  $('#prevquestion').click(function() {
    var radio = $('#radio').val();
    var endereco = $('#endereco').val();
    var texto = $('#textarea').val();
  final = '<b>Minha questão:</b><br /><blockquote><div>'+texto+'</div></blockquote><br /><hr /><br /><b>Imagens à serem usadas:</b><br />'+endereco+'<br /><br />';
    $('#pr-modal').fadeIn(300);
    $('#pr-questao').slideDown(500);
    $('#pr-questao .entry-content').html(final);
  });
  $('.pr-clo').click(function() {
    $('#pr-modal').fadeOut(800);
    $('#pr-questao').slideUp(500);
  });
  $('#apagar-td').click(function() {
          $('#form-send input[type="text"],#form-send textarea').val('');
  });
  $('#radio').keyup(function() {
     var tvalue = document.getElementById('radio').value.length;
     var icnt = document.getElementById('countitle');
     if(tvalue < 10 && tvalue > 0) {
       var l = tvalue-10;
       icnt.innerHTML='O título necessita mais '+l*-1+' caracteres';
     }
     else {
       icnt.innerHTML='';
     }
  });
  });
</script>
  <script>
function yourFunction(){
      var versao = $('#versao').val();
  if (versao === 'js') {
  $('#forum').attr("value","13");
  }else if (versao === 'css') {
  $('#forum').attr("value","14");
  }else if (versao === 'html') {
  $('#forum').attr("value","12");
  }else if (versao === 'other') {
  $('#forum').attr("value","30");
  }

    setTimeout(yourFunction, 2000);
}

yourFunction();
    </script>
  <div id="pr-modal" style="display: none;"></div>
  <div id="pr-questao" style="display: none;">
      <span class="pr-clo"></span>
      <div class="postm">
        <div class="post-entry">
         <div class="entry-content"></div>
        </div>
      </div>
  </div>
  <div class="warn1 alert" style="display: none">
     É necessário preencher todos os campos em branco.</div>
  </div>
  <div class="warn1">
  <b>Nota:</b> Antes de postar,  verifique se está tudo correto.
  </div>
<form action="/post" method="post" name="post" id="form-send" enctype="multipart/form-data">
  <fieldset class="form-div">  
     <input type="radio" id="radio" name="opcao" value="[PEDIDO] Assinatura" onclick="radio('subject',this.value);"> <font size="2">Assinatura</font>  
     <input type="radio" id="radio" name="opcao" value="[PEDIDO] Avatar" onclick="radio('subject',this.value);"> <font size="2">Avatar</font>  
     <input type="radio" id="radio" name="opcao" value="[PEDIDO] Avatar + Assinatura" onclick="radio('subject',this.value);"> <font size="2">Avatar e Assinatura</font>  
     <input type="radio" id="radio" name="opcao" value="[PEDIDO] Assinatura PRO" onclick="radio('subject',this.value);"> <font size="2">Assinatura PRO</font>  
    &nbsp;<input type="hidden" value="" id="subject" name="subject"><br><br>
  <dl><dt>
  <label>Imagens à serem usadas:</label></dt>
  <dd>
    <input type="text" style="clear: both;width: 400px;" id="endereco" value="">
  </dd>
  </dl>
  <dl><dt>
  <label>Informações sobre o Pedido:</label></dt>
  <dd>
    <div class="area">
     <div class="buttons">
      <button class="button2" onclick="bbcode_tag('[b]','[/b]')" type="button" id="addbbcode0" title="Negrito"><img src="http://imgur.com/z2xtYUE.png" alt="Negrito" title="Negrito"></button>
      <button class="button2" onclick="bbcode_tag('[i]','[/i]')" type="button" id="addbbcode2" title="Itálico"><img src="http://imgur.com/EcEpCJ9.png" alt="Itálico" title="Itálico"></button>
      <button class="button2" onclick="bbcode_tag('[u]','[/u]')" type="button" id="addbbcode4" title="Underline"><img src="http://imgur.com/i6Ergr1.png" alt="Underline" title="Underline"></button>
      <button class="button2" onclick="bbcode_tag('[strike]','[/strike]')" type="button" id="addbbcode5" title="Strike"><img src="http://i.imgur.com/hWWoJSN.png" alt="Strike" title="Strike"></button>
      <button class="button2" onclick="bbcode_tag('[left]','[/left]')" type="button" id="addbbcode52" title="Esquerda"><img src="http://2img.net/i/fa/wysiwyg/text_align_left.png" alt="Esquerda" title="Esquerda"></button>
      <button class="button2" onclick="bbcode_tag('[center]','[/center]')" type="button" id="addbbcode30" title="Centralizar"><img src="http://2img.net/i/fa/wysiwyg/text_align_center.png" alt="Centralizar" title="Centralizar"></button>
      <button class="button2" onclick="bbcode_tag('[right]','[/right]')" type="button" id="addbbcode32" title="Direita"><img src="http://2img.net/i/fa/wysiwyg/text_align_right.png" alt="Direita" title="Direita"></button>
      <button class="button2" onclick="bbcode_tag('[justify]','[/justify]')" type="button" id="addbbcode33" title="Justificado"><img src="http://2img.net/i/fa/wysiwyg/text_align_justify.png" alt="Justificado" title="Justificado"></button>
      <button class="button2" onclick="bbcode_tag('[code]','[/code]')" type="button" id="addbbcode41" title="code"><img src="http://i.imgur.com/LEJ7qoj.png" alt="Code" title="Code"></button>
      <button class="button2" onclick="bbcode_tag('[list][*]','[/list]')" type="button" id="addbbcode10" title="-Lista"><img src="http://2img.net/i/fa/wysiwyg/text_list_bullets.png" alt="-Lista" title="-Lista"></button>
      <button class="button2" onclick="bbcode_tag('[list=1][*]','[/list]')" type="button" id="addbbcode12" title="Lista ordenada"><img src="http://2img.net/i/fa/wysiwyg/text_list_numbers.png" alt="Lista ordenada" title="Lista ordenada"></button>
      <button class="button2" onclick="bbcode_tag('[img]','[/img]')" type="button" id="addbbcode14" title="Imagem"><img src="http://2img.net/i/fa/wysiwyg/picture.png" alt="Imagem" title="Imagem"></button>
      <button class="button2" onclick="bbcode_tag('[url=','][/url]')" type="button" id="addbbcode16" title="Link"><img src="http://2img.net/i/fa/wysiwyg/link.png" alt="Link" title="Link"></button>
     </div>
     <div class="textarea_nc">
      <textarea id="textarea" class="inputbox"></textarea>
     </div>
    </div>
  </dd>
  </dl>
  </fieldset><div class="btns">
    <input type="hidden" name="f" value="1">
    <input type="hidden" name="subject">
    <input type="hidden" name="message">
    <input type="hidden" name="mode" value="newtopic">
    <input type="hidden" name="lt" value="0">
    <input type="button" value="Enviar" id="send" name="post"> <input type="button" value="Pré-visualizar" id="prevquestion"> <input type="button" value="Apagar tudo" id="apagar-td">
    <input type="submit" style="display: none;" id="send2" name="post">
</div>
</form><div id="enviando" style="display:none;">
  <center>
   <img src="http://2img.net/i/fa/admin/wait_preview.gif" alt="carregando" title="enviando..."><br>
   <span class="conteudo_texto">enviando...</span>
  </center>
</div>
<script>
function bbcode_tag(o,c){
var t=jQuery('#textarea');t.val(t.val().substring(0,t[0].selectionStart)+o+t.val()</div></div></div></div></div><div id="right"><div class="module main">
                                
 </div>
</div>
      
<script>function radio(nameObtido,valObtido){jQuery('[name="'+nameObtido+'"]').val( valObtido );}
function gerarf() {
}</script></div></div>

Até mais.

PS: Normalmente não damos suporte a formulários que não sejam gerados pelo nosso gerador de formulários, caso ocorra algum erro sugiro você criar seu próprio formulário.
avatar
RafaelS.
Membro Entusiasta

Membro desde : 26/04/2014
Mensagens : 5746
Pontos : 7156

http://techmais.forumeiros.com/

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos