The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Help finishing a code to creat a topic

View previous topic View next topic Go down

Help finishing a code to creat a topic

Post by Cronos.h on February 17th 2011, 11:21 am

Hello

first of all i thank you for you time you spend to read my post, and i sorry for my writing errors on the post and for my bad inglish.

i m trying to creat a code to make topics on a spcefic forum i have alredy a part of the code but i cant make it work i need help to finish it and optimize it so i can put it to work on my forum.

on the next two spoiler i have two codes
and i need a a peace of code that have a option to show the rest of the code,

example

option 1 it shows the first spoiler
option 2 it shows the second spoiler

i have tryed but i don´t know how to build the query to place the variable on it to make it work correctly i have all ready place the variables near the place to build the query

i hope that i expressed my sell in order that you can help me



Spoiler:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>function radio(nameObtido,valObtido){jQuery('[name="'+nameObtido+'"]').val( valObtido );}
function gerarf() {
<!-- -->

/*NUMERO DO FORUM*/
jQuery('[name="f"]').val( '7' );

<!-- No Titulo fica a variavel "theItems" SE NAO FOR ESCOLHIDO A OPTION VALUE "OUTRO"CASO SEJA ESCOLHIDA É "otherField" + "theItems1" SE NAO FOR ESCOLHIDO A OPTION VALUE "OUTRO"CASO SEJA ESCOLHIDA É "otherField1" + "sform_euro"-->

/*VALOR TITULO*/
jQuery('[name="subject"]').val( 'VALOR DO TITULO' );

<!-- NOT USED-->
/*VALOR DESCRIÇAO*/
jQuery('[name="description"]').val( 'VALOR DA DESCRIÇAO' );

<!-- Na mensagem ficam as variaveis pela seguinte ordem
"theItems" SE FOR ESCOLHIDO A OPTION VALUE "OUTRO" colocar tb "otherField"
"theItems1" SE FOR ESCOLHIDO A OPTION VALUE "OUTRO" colocar tb "otherField1"
"sform_euro"
"sform_dia"
"sform_mes"
"sform_ano"
"sform_descricao"
"sform_foto"
-->

/*VALOR MENSAGEM*/
jQuery('[name="message"]').val( 'VALOR DA MENSAGEM' );

}</script>
<form action="/posting.forum" method="post" enctype="multipart/form-data">

<!-- Inicio do formulario de material relacionado com o resto do material -->

<script type="text/javascript">
function otherSelect() {
var other = document.getElementById("otherBox");
if (document.forms[0].theItems.options[document.forms[0].theItems.selectedIndex].value == "other")
{other.style.visibility = "visible";}
else {other.style.visibility = "hidden";}
}
</script>
<form action="" method="">
<font size=3><b>Tipo de Material</b></font>
<select name="theItems" onchange="otherSelect()">
<option value=”Empty”>Escolha o tipo de material</option>
<option value=”calca”>Calças</option>
<option value=”camisola”>Camisola \ Jersey</option>
<option value=”mascara”>Mascara</option>
<option value=”batlepack”>Porta Potes \ Batlepack</option>
<option value=”sapatos”>Sapatos</option>
<option value=”malas”>Malas</option>
<option value="other">Outro</option>
</select>
<div id="otherBox" style="visibility: hidden;">
Outro : <input name="otherField" type="text" value="Insira o Material Aqui" />
</div>
<!-- So aparece uma caixa de preenchimento manual no caso de ser selecionado <option value=”outro”>-->

<script type="text/javascript">
function outroSelect() {
var outro = document.getElementById("outroBox");
if (document.forms[0].theItems1.options[document.forms[0].theItems1.selectedIndex].value == "outro")
{outro.style.visibility = "visible";}
else {outro.style.visibility = "hidden";}
}
</script>
<form action="" method="">
<font size=3><b>Escolha a Marca</b></font>
<select name="theItems1" onchange="outroSelect()">
<option value=”Empty1”>Escolha o Fabricante</option>
<option value=”dye”>Dye</option>
<option value=”proto”>Proto</option>
<option value=”planet”>Planet Eclipse</option>
<option value=”smart”>Smart Parts</option>
<option value=”jt”>JT</option>
<option value=”valken”>Valken</option>
<option value="outro">Outro</option>
</select>
<div id="outroBox" style="visibility: hidden;">
Outro : <input name="outroField1" type="text" value="Insira a Marca Aqui" />
</div>

<!-- So aparece uma caixa de preenchimento manual no caso de ser selecionado <option value=”outro”>-->

<font size=3><b>Modelo</b></font>
<input type="text" name="sform_modelo" value="Insira o modelo" />
<br><br>
<font size=3><b>Data de Aquisição</b></font>
<input type="text" name="sform_dia" size="2" value="DD" />
<font size=3><b>/</b></font>
<input type="text" name="sform_mes" size="2" value="MM" />
<font size=3><b>/</b></font>
<input type="text" name="sform_ano" size="4" value="AAAA" />
<br><br>
<!-- Se o valor nao for preenchido o botão de publicação de Formulario fica Inactivo-->

<font size=3><b>Valor</b></font>
<input type="text" name="sform_euro" size="7" value="" />
<font size=3><b>&euro;</p></b></font>
<br><br>
<font size=3><b>Inserir URL da Fotografia</p></b></font>
<br><br>
<input type="text" name="sform_foto" size="100" value="" />
<!-- BEGIN switch_upload_imageshack-->

<br><br>
<script src="http://imageshack.us/scripts/syndicate/widget.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">new ImageShackSyndicateWidget({width: "300",height: "110",theme: {shell: {buttonColor: "#3cbbfa",color: "#111111",backgroundColor: "#cccccc",backgroundImage: "",text: "Selecione%20as%20suas%20imagens%20ou%20videos"}}}).render();</script>
<!-- END switch_upload_imageshack-->

<br><br>
<font size=3><b>Descrição do Material</p></b></font>
<br><br>
<textarea name="sform_descricao" rows="7" cols="80"></textarea>
<br><br>
<!-- Pré Visualizar -->
<input type="submit" name="preview" class="button2" value="Pré-visualizar" onClick="gerarf();" />
<br><br>

<input type="hidden" name="mode" value="newtopic" />
<input type="hidden" name="lt" value="0" />

<input value="Publicar formulário" type="submit" class="button1" name="post" />

<!-- Ocultos -->

<input type="hidden" name="f" value="7" />
<input type="hidden" name="subject" value="O script não enviou o título" />
<input type="hidden" name="description" value="O script não enviou a descrição" />
<input type="hidden" name="message" value="O script não enviou a mensagem" />

</form>


Spoiler:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>function radio(nameObtido,valObtido){jQuery('[name="'+nameObtido+'"]').val( valObtido );}
function gerarf() {
<!-- -->

/*NUMERO DO FORUM*/
jQuery('[name="f"]').val( '7' );

<!-- No Titulo fica a variavel "theItems" SE NAO FOR ESCOLHIDO A OPTION VALUE "OUTRO"CASO SEJA ESCOLHIDA É "otherField" + "theItems1" SE NAO FOR ESCOLHIDO A OPTION VALUE "OUTRO"CASO SEJA ESCOLHIDA É "otherField1" + "sform_euro"-->

/*VALOR TITULO*/
jQuery('[name="subject"]').val( 'VALOR DO TITULO' );

<!-- NOT USED-->
/*VALOR DESCRIÇAO*/
jQuery('[name="description"]').val( 'VALOR DA DESCRIÇAO' );

<!-- Na mensagem ficam as variaveis pela seguinte ordem
"theItems" SE FOR ESCOLHIDO A OPTION VALUE "OUTRO" colocar tb "otherField"
"theItems1" SE FOR ESCOLHIDO A OPTION VALUE "OUTRO" colocar tb "otherField1"
"sform_euro"
"sform_dia"
"sform_mes"
"sform_ano"
"sform_descricao"
"sform_foto"
-->

/*VALOR MENSAGEM*/
jQuery('[name="message"]').val( 'VALOR DA MENSAGEM' );

}</script>
<form action="/posting.forum" method="post" enctype="multipart/form-data">

<!-- Inicio do formulario de material relacionado com o marcador -->

<script type="text/javascript">
function otherSelect() {
var other = document.getElementById("otherBox");
if (document.forms[0].theItems.options[document.forms[0].theItems.selectedIndex].value == "other")
{other.style.visibility = "visible";}
else {other.style.visibility = "hidden";}
}
</script>
<form action="" method="">
<font size=3><b>Tipo de Material</b></font>
<select name="theItems" onchange="otherSelect()">
<option value=”Empty”>Escolha o tipo de material</option>
<option value=”vl”>Alimentador de Bolas (VL) e acessorios</option>
<option value=”cano”>Cano/s</option>
<option value=”garrafa”>Garrafa ou acessorios da mesma</option>
<option value=”marcador”>Marcador</option>
<option value=”placas”>Placas Eletronicas</option>
<option value=”limpa”>Limpa canos</option>
<option value="other">Outro</option>
</select>
<div id="otherBox" style="visibility: hidden;">
Outro : <input name="otherField" type="text" value="Insira o Material Aqui" />
</div>
<!-- So aparece uma caixa de preenchimento manual no caso de ser selecionado <option value=”outro”>-->

<script type="text/javascript">
function outroSelect() {
var outro = document.getElementById("outroBox");
if (document.forms[0].theItems1.options[document.forms[0].theItems1.selectedIndex].value == "outro")
{outro.style.visibility = "visible";}
else {outro.style.visibility = "hidden";}
}
</script>
<form action="" method="">
<font size=3><b>Escolha a Marca</b></font>
<select name="theItems1" onchange="outroSelect()">
<option value=”Empty1”>Escolha o Fabricante</option>
<option value=”dye”>Dye</option>
<option value=”proto”>Proto</option>
<option value=”planet”>Planet Eclipse</option>
<option value=”luxe”>Luxe</option>
<option value=”tadao”>Tadao</option>
<option value=”virtue”>Virtue</option>
<option value=”smart”>Smart Parts</option>
<option value=”element”>7 Element</option>
<option value="outro">Outro</option>
</select>
<div id="outroBox" style="visibility: hidden;">
Outro : <input name="outroField1" type="text" value="Insira a Marca Aqui" />
</div>

<!-- So aparece uma caixa de preenchimento manual no caso de ser selecionado <option value=”outro”>-->

<font size=3><b>Modelo</b></font>
<input type="text" name="sform_modelo" value="Insira o modelo" />
<br><br>
<font size=3><b>Data de Aquisição</b></font>
<input type="text" name="sform_dia" size="2" value="DD" />
<font size=3><b>/</b></font>
<input type="text" name="sform_mes" size="2" value="MM" />
<font size=3><b>/</b></font>
<input type="text" name="sform_ano" size="4" value="AAAA" />
<br><br>
<!-- Se o valor nao for preenchido o botão de publicação de Formulario fica Inactivo-->

<font size=3><b>Valor</b></font>
<input type="text" name="sform_euro" size="7" value="" />
<font size=3><b>&euro;</p></b></font>
<br><br>
<font size=3><b>Inserir URL da Fotografia</p></b></font>
<br><br>
<input type="text" name="sform_foto" size="100" value="" />
<!-- BEGIN switch_upload_imageshack-->

<br><br>
<script src="http://imageshack.us/scripts/syndicate/widget.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">new ImageShackSyndicateWidget({width: "300",height: "110",theme: {shell: {buttonColor: "#3cbbfa",color: "#111111",backgroundColor: "#cccccc",backgroundImage: "",text: "Selecione%20as%20suas%20imagens%20ou%20videos"}}}).render();</script>
<!-- END switch_upload_imageshack-->

<br><br>
<font size=3><b>Descrição do Material</p></b></font>
<br><br>
<textarea name="sform_descricao" rows="7" cols="80"></textarea>
<br><br>
<!-- Pré Visualizar -->
<input type="submit" name="preview" class="button2" value="Pré-visualizar" onClick="gerarf();" />
<br><br>

<input type="hidden" name="mode" value="newtopic" />
<input type="hidden" name="lt" value="0" />

<input value="Publicar formulário" type="submit" class="button1" name="post" />

<!-- Ocultos -->

<input type="hidden" name="f" value="7" />
<input type="hidden" name="subject" value="O script não enviou o título" />
<input type="hidden" name="description" value="O script não enviou a descrição" />
<input type="hidden" name="message" value="O script não enviou a mensagem" />

</form>


thank you for you time
cronos.h

Cronos.h
New Member

Posts : 2
Reputation : 0
Language : portuguese

Back to top Go down

Re: Help finishing a code to creat a topic

Post by Cronos.h on March 2nd 2011, 1:16 pm

can someone help me please

Cronos.h
New Member

Posts : 2
Reputation : 0
Language : portuguese

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum