0n3Liner
Legacy Member
wel, hetvokgende script werkt perfect in IE, maarjah, zoals gewoonlijk weer niet in firefox =D, kan iemand me hier mss mee helpen?
(niet op de php code letten)
(niet op de php code letten)
Code:
<script>
function selectform(f){
var formchoice = f.options[f.selectedIndex].value;
formcreater.formcreate.value += '<form action="http://clients.rdlt.com/form.php?form_id='+formchoice+ '" method="post"><br>\r\n';
}
function buttonR () {
qst = prompt('Question?', '');
formcreater.formcreate.value += ' ' + qst + '<br>\r\n';
count = 0;
while (1) {
count++;
answer = prompt('Answer '+count+' (Press cancel to end).', '');
if (!answer)
break;
formcreater.formcreate.value += ' <input name=\''+qst+'\' type=\'radio\' value=\''+answer+'\'> '+answer+'<br>\r\n';
}
formcreater.formcreate.value += '<br>\r\n';
}
function buttonS() {
qst = prompt('Question?', '');
formcreater.formcreate.value += ' ' + qst + '<br>\r\n';
answer = prompt('Answer:', '');
formcreater.formcreate.value += ' <input name=\''+qst+'\' type=\'radio\' value=\''+answer+'\'> '+answer+'<br>\r\n';
formcreater.formcreate.value += '<br>\r\n';
}
function inputT() {
qst = prompt('Field Name', 'Name');
formcreater.formcreate.value += ' '+qst+'<br>\r\n<input name=\''+qst+'\' type=\'text\'><br>\r\n';
}
function inputPW() {
qst = prompt('Field Name', 'Name');
formcreater.formcreate.value += ' '+qst+'<br>\r\n<input name=\''+qst+'\' type=\'password\'><br>\r\n';
}
function inputTA() {
qst = prompt('TextArea Name', 'Message');
formcreater.formcreate.value += ' '+qst+'<br>\r\n<textarea name=\''+qst+'\' type=\'text\'></textarea><br>\r\n';
}
function finalize() {
formcreater.formcreate.value += ' <input type="submit" value="Submit">\r\n <input type="reset" value="Reset">\r\n</form>';
}
function dropM () {
qst = prompt('Question?', '');
formcreater.formcreate.value += ' ' + qst + '<br>\r\n <select name="'+qst+'">\r\n';
count = 0;
while (1) {
count++;
answer = prompt('Option '+count+' (Press cancel to end).', '');
if (!answer)
break;
formcreater.formcreate.value += ' <option value=\''+answer+'\'> '+answer+'</option>\r\n';
}
formcreater.formcreate.value += ' </select><br>\r\n';
}
</script>
<form>
<b>Select your form</b>
<hr size="1">
<table border="0" width="100%">
<tr>
<td><b>Choose your form</b><br><i>Choose from the dropdown and then press 'select this form'</i></td>
<td>
<form>
<select name="selectmenu">
<?
$sql65 = "SELECT form_id,name,send FROM clients_form_conf WHERE (usr_id='$usr_id') ORDER By form_id";
$result65 = mysql_query($sql65) or die(mysql_error());
$form_nr = 1;
while ($form_all_echo = mysql_fetch_array($result65)) {
if ($form_all_echo['name'] == '') {
$form_all_echo['name'] = 'Unnamed Form Mailer #'.$form_nr;
$form_nr++;
}
?>
<option value="<?echo$form_all_echo['form_id'];?>"><?echo$form_all_echo['name'];?></option>
<?
}
?>
</select>
<input type=button value="Select this form" onClick="selectform(this.form.selectmenu);"></form></td>
</tr>
</table>
<br>
<b>Form Options</b>
<hr size="1">
<input type=button value="Radio Button" onclick="buttonR()"> <input type=button value="Select Button" onclick="buttonS()">
<input type=button value="Input Field" onclick="inputT()"> <input type=button value="Text Area" onclick="inputTA()"> <input type=button value="Password Field" onclick="inputPW()">
<input type=button value="Dropdown Menu" onclick="dropM()">
<br><br>
<b>Form Finalize</b>
<hr size="1">
<table border="0" width="100%">
<tr>
<td><b>!! Before copying the code press the finalize button!!!</b></td>
</tr>
<tr>
<td align="center"><br><br>
<input type=button value="FINALIZE" onClick="finalize()"></td>
</tr>
</table>
<form name="formcreater">
<div align="center"><textarea name="formcreate" cols="90" rows="20"></textarea></div>
</form>