Code HTML
4 posters
Page 1 of 1
Code HTML
Good evening, I would like an html page that generates an alert code I already have, how would it work?
A page with place for Name and Position, and with the options "Flood", "invasions" and etc, then with this select would generate the code to copy and paste
A page with place for Name and Position, and with the options "Flood", "invasions" and etc, then with this select would generate the code to copy and paste
Last edited by Miau on August 14th 2018, 9:30 pm; edited 1 time in total
Re: Code HTML
Hello @Miau,
I didn't understand what you want to do. To generate an alert you can use this code:
Now what you want to do, can differ from this code but you have to add more details so I can help you more here. Sorry.
I didn't understand what you want to do. To generate an alert you can use this code:
- Code:
$(function(){
alert('My alert');
});
Now what you want to do, can differ from this code but you have to add more details so I can help you more here. Sorry.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Code HTML
So I have the alert codes I made in html, so I would like an html page that contains the codes I made
are alert, flood, invasion and etc codes, so on the html page would have the options "flood, alerts" I would choose the option there would appear the code I have already created
are alert, flood, invasion and etc codes, so on the html page would have the options "flood, alerts" I would choose the option there would appear the code I have already created
Re: Code HTML
Hey @Miau,
Something like this?
Something like this?
- Code:
<script type="text/javascript">
$(document).ready(function() {
$("#form").on("submit", function(e) {
e.preventDefault();
var form = $(this);
if(validateFields(form)) {
form.find("[name='resultado']").val(form.find("[name='pre-definicoes']").val());
}
});
});
function validateFields(e) {
var result = true;
$(e).find("input, select").each(function() {
if($(this).val() == "" || $(this).val() == null) {
result = false;
}
});
return result;
}
</script>
<form id="form">
<select name="pre-definicoes" required>
<option value="This mensage is law 1">Law 1</option>
<option value="This mensage is to law 2">Law 2</option>
</select>
<button type="submit">Generate</button>
<textarea onmouseover="this.select();" rows="5" name="resultado" placeholder="Select an option to be generated."></textarea>
</form>
Re: Code HTML
this pedxz, almost there, now I want the options
Programmer, manager, administrator, moderator, helper and coordinator.
and the options
Flood
Materials posted
disclosure
Avatar and Signature
Discussions
Topic Invasion
Raise topics
Report Button Misuse
Excessive Alerts
Disrespect to Staff members (forum / server)
Programmer, manager, administrator, moderator, helper and coordinator.
and the options
Flood
Materials posted
disclosure
Avatar and Signature
Discussions
Topic Invasion
Raise topics
Report Button Misuse
Excessive Alerts
Disrespect to Staff members (forum / server)
Re: Code HTML
I didn't realize this part, what do you mean Programmer, manager, administrator, moderator, helper and coordinator.
About the warns:
- Code:
<script type="text/javascript">
$(document).ready(function() {
$("#form").on("submit", function(e) {
e.preventDefault();
var form = $(this);
if(validateFields(form)) {
form.find("[name='resultado']").val(form.find("[name='pre-definicoes']").val());
}
});
});
function validateFields(e) {
var result = true;
$(e).find("input, select").each(function() {
if($(this).val() == "" || $(this).val() == null) {
result = false;
}
});
return result;
}
</script>
<form id="form">
<select name="pre-definicoes" required>
<option value="Attention: [b]Flood[/b]">Flood</option>
<option value="Attention: [b]Materials posted[/b]">Materials posted</option>
<option value="Attention: [b]Disclosure[/b]">Disclosure</option>
<option value="Attention: [b]Avatar and Signature[/b]">Avatar and Signature</option>
<option value="Attention: [b]Discussions[/b]">Discussions</option>
<option value="Attention: [b]Topic Invasion[/b]">Topic Invasion</option>
<option value="Attention: [b]Raise topics[/b]">Raise topics</option>
<option value="Attention: [b]Report Button Misuse[/b]">Report Button Misuse</option>
<option value="Attention: [b]Excessive Alerts[/b]">Excessive Alerts</option>
<option value="Attention: [b]Disrespect to Staff members (forum / server)[/b]">Disrespect to Staff members (forum / server)</option>
</select>
<button type="submit">Generate</button>
<textarea onmouseover="this.select();" rows="5" name="resultado" placeholder="Select an option to be generated."></textarea>
</form>
Re: Code HTML
Try to explain, it would be like this, a place for the name, one to select the position and another to select the type of alert.
Example,
Name: Pedxz
Position: Manager
Type alert: Flood
that would generate this code https://prnt.sc/khpcu6
replacing the nick field that I put in and replacing the "coordinator" with the position that was selected
Example,
Name: Pedxz
Position: Manager
Type alert: Flood
that would generate this code https://prnt.sc/khpcu6
replacing the nick field that I put in and replacing the "coordinator" with the position that was selected
Re: Code HTML
Are you trying to create a report system? If yes, you do know there is already a report system?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Code HTML
Change to:
All you need to do is fill out as you want
- Code:
<script type="text/javascript">
$(document).ready(function() {
$("#form").on("submit", function(e) {
e.preventDefault();
var form = $(this), user = _userdata["username"];
$('#user').val(user);
if(validateFields(form)) {
form.find("[name='resultado']").val('[b]Name[/b]: ' + form.find("[name='name']").val() + '\\\n[b]Position[/b]: ' + form.find("[name='ranks']").val() + '\\\n[b]Type Alert[/b]: ' + form.find("[name='laws']").val());
} else {
alert("You forgot to fill something!");
}
});
});
function validateFields(e) {
var result = true;
$(e).find("input, select").each(function() {
if($(this).val() == "" || $(this).val() == null) {
result = false;
}
});
return result;
}
</script>
<form id="form">
<input type="hidden" name="name" id="user">
<select name="ranks" required>
<option value="Admin">Admin</option>
</select>
<select name="laws" required>
<option value="Flood">Flood</option>
<option value="Materials posted">Materials posted</option>
<option value="Disclosure">Disclosure</option>
<option value="Avatar and Signature">Avatar and Signature</option>
<option value="Discussions">Discussions</option>
<option value="Topic Invasion">Topic Invasion</option>
<option value="Raise topics">Raise topics</option>
<option value="Report Button Misuse">Report Button Misuse</option>
<option value="Excessive Alerts">Excessive Alerts</option>
<option value="Disrespect to Staff members (forum / server)">Disrespect to Staff members (forum / server)</option>
</select>
<button type="submit">Generate</button>
<textarea onmouseover="this.select();" rows="5" name="resultado" placeholder="Select an option to be generated."></textarea>
</form>
All you need to do is fill out as you want
Re: Code HTML
Oh Ok, no problem
Go to test
Now the Flood alert type needs to generate this code
Go to test
Now the Flood alert type needs to generate this code
- Code:
<table style="border-left-width: 3px; border-left-style: solid; border-left-color: #23E605; border-right-width: 3px; border-right-style: solid; border-right-color: #23E605; margin: 10px auto; padding: 5px; border-radius: 4px; box-shadow: #FF0000 0px 5px 9px; max-height: 2500px; max-width: 2500px; z-index: 999; min-width: 1px; min-height: 1px; background: url("http://bit.ly/acLmW9");"><tbody><tr><td><img src="https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Warning.png" alt=""></td><td><strong><font color="red" size="1">A sua <u>Barra de Alerta</u> aumentou em <i><font color="BLUE">10%</i></font> por violar as Regras do Fórum.</strong></font>
<strong><font size="0">Regras Violadas:</strong>
1.1 Flood: É proibido o flood. Caracteriza-se:
-Quando é feito postagens seguidas, ou seja, postagem atrás de postagem;
-Quando o usuário repete mensagens postadas acima em curto espaço de tempo;
-Quando o usuário cita uma mensagem dita acima e não escreve nada mais ou faz uso de smileys;
-Quando o usuário foge do contexto do tópico;
-Quando são feitas postagens em curto intervalo de tempo em diferentes tópicos (clique aqui para ver um exemplo);
-Fazer UP em tópico em menos de 24 horas;</font>
<font color="red" size="1">Evite transtornos, leia as </font><font size="0"><a href="http://www.nwdgames.com/t63857-regras-do-forum" target="_blank"><strong>Regras do Fórum</strong></a></strong></font>
<strong><font size="1">Atenciosamente,</font></strong>
<strong><font color="#ff0aff" size="1">COLOQUE_AQUI_SEU_NICK - Coordenador</font></strong>
</td></tr></tbody></table>
Re: Code HTML
Miau wrote:Oh Ok, no problem
Go to test
Now the Flood alert type needs to generate this codeSubstituting the part "COORDINATOR" for the current position in the forum and his nickname in CHOOSE YOUR NICKNAME
- Code:
<table style="border-left-width: 3px; border-left-style: solid; border-left-color: #23E605; border-right-width: 3px; border-right-style: solid; border-right-color: #23E605; margin: 10px auto; padding: 5px; border-radius: 4px; box-shadow: #FF0000 0px 5px 9px; max-height: 2500px; max-width: 2500px; z-index: 999; min-width: 1px; min-height: 1px; background: url("http://bit.ly/acLmW9");"><tbody><tr><td><img src="https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Warning.png" alt=""></td><td><strong><font color="red" size="1">A sua <u>Barra de Alerta</u> aumentou em <i><font color="BLUE">10%</i></font> por violar as Regras do Fórum.</strong></font>
<strong><font size="0">Regras Violadas:</strong>
1.1 Flood: É proibido o flood. Caracteriza-se:
-Quando é feito postagens seguidas, ou seja, postagem atrás de postagem;
-Quando o usuário repete mensagens postadas acima em curto espaço de tempo;
-Quando o usuário cita uma mensagem dita acima e não escreve nada mais ou faz uso de smileys;
-Quando o usuário foge do contexto do tópico;
-Quando são feitas postagens em curto intervalo de tempo em diferentes tópicos (clique aqui para ver um exemplo);
-Fazer UP em tópico em menos de 24 horas;</font>
<font color="red" size="1">Evite transtornos, leia as </font><font size="0"><a href="http://www.nwdgames.com/t63857-regras-do-forum" target="_blank"><strong>Regras do Fórum</strong></a></strong></font>
<strong><font size="1">Atenciosamente,</font></strong>
<strong><font color="#ff0aff" size="1">COLOQUE_AQUI_SEU_NICK - Coordenador</font></strong>
</td></tr></tbody></table>
Done
- Code:
<script type="text/javascript">
$(document).ready(function() {
$("#form").on("submit", function(e) {
e.preventDefault();
var form = $(this), user = _userdata["username"];
$('#user').val(user);
if(validateFields(form)) {
form.find("[name='resultado']").val(
' <table style="border-left-width: 3px; border-left-style: solid; border-left-color: #23E605; border-right-width: 3px; border-right-style: solid; border-right-color: #23E605; margin: 10px auto; padding: 5px; border-radius: 4px; box-shadow: #FF0000 0px 5px 9px; max-height: 2500px; max-width: 2500px; z-index: 999; min-width: 1px; min-height: 1px; background: url("http://bit.ly/acLmW9");">' +
' <tbody><tr><td><img src="https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Warning.png" alt=""></td><td>' +
' <strong><font color="red" size="1">A sua <u>Barra de Alerta</u> aumentou em <i><font color="BLUE">10%</i></font> por violar as Regras do Fórum, ' + form.find("[name='laws']").val() + '.</strong></font>' +
' <strong><font size="0">Regras Violadas:</strong>' +
' 1.1 Flood: É proibido o flood. Caracteriza-se:\\\n' +
' -Quando é feito postagens seguidas, ou seja, postagem atrás de postagem;\\\n' +
' -Quando o usuário repete mensagens postadas acima em curto espaço de tempo;\\\n' +
' -Quando o usuário cita uma mensagem dita acima e não escreve nada mais ou faz uso de smileys;\\\n' +
' -Quando o usuário foge do contexto do tópico;\\\n' +
' -Quando são feitas postagens em curto intervalo de tempo em diferentes tópicos (clique aqui para ver um exemplo);\\\n' +
' -Fazer UP em tópico em menos de 24 horas;</font>\\\n' +
' <font color="red" size="1">Evite transtornos, leia as </font><font size="0"><a href="http://www.nwdgames.com/t63857-regras-do-forum" target="_blank"><strong>Regras do Fórum</strong></a></strong></font>\\\n' +
' <strong><font size="1">Atenciosamente,</font></strong>' +
' <strong><font color="#ff0aff" size="1">' + form.find("[name='name']").val() + ' - ' + form.find("[name='ranks']").val() + '</font></strong>' +
'</td></tr></tbody></table>'
);
} else {
alert("You forgot to fill something!");
}
});
});
function validateFields(e) {
var result = true;
$(e).find("input, select").each(function() {
if($(this).val() == "" || $(this).val() == null) {
result = false;
}
});
return result;
}
</script>
<form id="form">
<input type="hidden" name="name" id="user">
<select name="ranks" required>
<option value="Admin">Admin</option>
</select>
<select name="laws" required>
<option value="Flood">Flood</option>
<option value="Materials posted">Materials posted</option>
<option value="Disclosure">Disclosure</option>
<option value="Avatar and Signature">Avatar and Signature</option>
<option value="Discussions">Discussions</option>
<option value="Topic Invasion">Topic Invasion</option>
<option value="Raise topics">Raise topics</option>
<option value="Report Button Misuse">Report Button Misuse</option>
<option value="Excessive Alerts">Excessive Alerts</option>
<option value="Disrespect to Staff members (forum / server)">Disrespect to Staff members (forum / server)</option>
</select>
<button type="submit">Generate</button>
<textarea onmouseover="this.select();" rows="5" name="resultado" placeholder="Select an option to be generated."></textarea>
</form>
Re: Code HTML
One question, instead, is how do I add all the alerts at once in ScEditor?
As if it were moderating messages
As if it were moderating messages
Re: Code HTML
Problem solved & topic archived.
|
Guest- Guest
Similar topics
» Would this html code work
» html code
» What is the search html code (Need Help)
» HTML code too long !
» HTML Code Help
» html code
» What is the search html code (Need Help)
» HTML code too long !
» HTML Code Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum