vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Posting Template Error - View Topic
Topic Rating: *****
Printable View
dog199200
Guest
[F] Posting Template Error (21st Jan 08 at 10:16pm UTC)
Can someone tell me whats wrong with the code, it wont work..i have looked over it several times and i'm clueless on what could be wrong with it.

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. /* Predefined Posting Template/Form
  5.     Created by Ross of vForums
  6.     http://virtualforums.co.uk
  7.     Please do not repost outside of
  8.     vForums support without permission */
  9.  
  10. var _title = 'Character Profile';
  11.  
  12. var _description = 'Fill this out and post it to make your characters profile.';
  13.  
  14. var _fields = new Array(); var _f = 0;
  15.     _fields[_f++] = new Array('input', 'Character Full Name', ['size', 40, 'maxLength', 50], '', 'Your characters full name, first and last.', true);
  16.     _fields[_f++] = new Array('input', 'Character NickName', ['size', 40, 'maxLength', 50], '', 'Character Nickname (If Doesnt Got One Just Put * )', true);
  17.     _fields[_f++] = new Array('input', 'Character Age', ['size', 40, 'maxLength', 50], '', 'Put Your characters age here.', true);
  18.     _fields[_f++] = new Array('input', 'Character Height', ['size', 40, 'maxLength', 50], '', 'Whats the height of your character?', true);
  19.     _fields[_f++] = new Array('select', 'Character Gender', false, ['Male', 'Female'], 'Whats your characters Gender?', true);
  20.     _fields[_f++] = new Array('select', 'Character Time', false, ['Japan', 'Feudal Japan'], 'What time is your character from? *Keep in mind that this sets where you can RP*', true);
  21.     _fields[_f++] = new Array('input', 'Character Eye Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters eye color?', true);
  22.     _fields[_f++] = new Array('input', 'Character Hair Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters hair color?', true);
  23.     _fields[_f++] = new Array('input', 'Character Skin Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters skin color?', true);
  24.     _fields[_f++] = new Array('input', 'Character Race', ['size', 40, 'maxLength', 200], '', 'Whats your characters Class?', true);
  25.     _fields[_f++] = new Array('select', 'Character Ailment', false, ['Good', 'Neutral', 'Evil'], 'Whats your characters Aliment?', true);
  26.     _fields[_f++] = new Array('input', 'Character Weapon', ['size', 40, 'maxLength', 50], '', 'Whats your characters Weapon?', true);
  27.     _fields[_f++] = new Array('textarea', 'Character Weapon Description', ['cols', 40, 'rows', 100], false, 'Whats the description of your characters weapon?', true);
  28.     _fields[_f++] = new Array('textarea', 'Character Skillz', ['cols', 40, 'rows', 10], false, 'What's your characters skillz?', true);
  29.     _fields[_f++] = new Array('input', 'Character Description', ['size', 40, 'maxLength', 50], false, 'Whats your character looks like. (Pics allowed)', true);
  30.     _fields[_f++] = new Array('textarea', 'Character Bio', ['cols', 40, 'rows', 100, false, 'Whats the story behind your character?', true);
  31.     _fields[_f++] = new Array('input', 'Password', ['size', 40, 'maxLength', 50], '', 'If you read the rules youd know what this means. (Most be filled in with the right password or your profile will not be accepted.', true);
  32.  
  33. var _widths = ['100%', '20%', '40%', '40%'];
  34.  
  35. var _posting_form = {
  36.  
  37.     errors: new Array(),
  38.  
  39.     init: function() {
  40.         this.create_form();
  41.     },
  42.     
  43.     create_form: function() {
  44.         // Create new post layout
  45.         var _holder = document.createElement('table');
  46.         _holder.setAttribute('className', 'border');
  47.         _holder.setAttribute('class', 'border');
  48.         _holder.setAttribute('cellSpacing','1');
  49.         _holder.setAttribute('cellPadding', '4');
  50.         _holder.setAttribute('align', 'center');
  51.         _holder.setAttribute('width', _widths[0]);
  52.         _holder.setAttribute('id', 'post_form_holder');
  53.         _holder.appendChild(document.createElement('tbody'));
  54.         _holder.firstChild.appendChild( document.createElement('tr') ).appendChild( document.createElement('td') ).appendChild( document.createElement('font') );
  55.         _holder.firstChild.lastChild.lastChild.className = 'title1';
  56.         _holder.firstChild.lastChild.lastChild.colSpan = '3';
  57.         _holder.firstChild.lastChild.lastChild.lastChild.size = '2';
  58.         _holder.firstChild.lastChild.lastChild.lastChild.appendChild(document.createTextNode(_title));
  59.         if(_description) {
  60.             _holder.firstChild.appendChild( document.createElement('tr') ).appendChild( document.createElement('td') ).appendChild( document.createElement('font') );
  61.             _holder.firstChild.lastChild.lastChild.setAttribute('className', 'window1');
  62.             _holder.firstChild.lastChild.lastChild.setAttribute('class', 'window1');
  63.             _holder.firstChild.lastChild.lastChild.setAttribute('colSpan', '3');
  64.             _holder.firstChild.lastChild.lastChild.lastChild.setAttribute('size', '2');
  65.             _holder.firstChild.lastChild.lastChild.lastChild.innerHTML = _description;
  66.         }
  67.         
  68.         for(_f=0; _f<_fields.length; _f++) {
  69.             switch(_fields[_f][0]) {
  70.                 case 'textarea' :
  71.                     var _tmp = document.createElement('textarea');
  72.                 break;
  73.                 
  74.                 case 'select' :
  75.                     var _tmp = document.createElement('select');
  76.                     for(_o=0; _o<_fields[_f][3].length; _o++) {
  77.                         _tmp.options[_o] = new Option(_fields[_f][3][_o], _fields[_f][3][_o]);
  78.                     }
  79.                 break;
  80.                 
  81.                 default :
  82.                     var _tmp = document.createElement('input');
  83.                     _tmp.type = 'text';
  84.                     if("undefined" != typeof _fields[_f][3] && _fields[_f][3] != "")
  85.                         _tmp.setAttribute('value', _fields[_f][3]);
  86.                 break;
  87.             }
  88.             _tmp.setAttribute('id', _f);
  89.             if("undefined" != typeof _fields[_f][2] && _fields[_f][2].length > 0) {
  90.                 for(_a=0; _a<_fields[_f][2].length; _a++) {
  91.                     _tmp.setAttribute(_fields[_f][2][_a++], _fields[_f][2][_a]);
  92.                 }
  93.             }
  94.             var _class = 'window' + ((_f % 2 == 0)? '2' : '1');
  95.             var _row = document.createElement('tr');
  96.             _row.appendChild(document.createElement('td'));
  97.             _row.lastChild.setAttribute('class', _class);
  98.             _row.lastChild.setAttribute('className', _class);
  99.             _row.lastChild.setAttribute('vAlign', 'top');
  100.             _row.lastChild.setAttribute('width', _widths[1]);
  101.             _row.lastChild.appendChild(document.createElement('font'));
  102.             _row.lastChild.lastChild.setAttribute('size', '2');
  103.             _row.lastChild.lastChild.style.fontWeight = 'bold';
  104.             _row.lastChild.lastChild.appendChild(document.createTextNode(_fields[_f][1] + ':'));
  105.             _row.appendChild(document.createElement('td'));
  106.             _row.lastChild.setAttribute('class', _class);
  107.             _row.lastChild.setAttribute('className', _class);
  108.             _row.lastChild.setAttribute('width', _widths[2]);
  109.             _row.lastChild.appendChild(document.createElement('font'));
  110.             _row.lastChild.lastChild.setAttribute('size', '2');
  111.             _row.lastChild.lastChild.appendChild(_tmp);
  112.             _row.appendChild(document.createElement('td'));
  113.             _row.lastChild.setAttribute('class', _class);
  114.             _row.lastChild.setAttribute('className', _class);
  115.             _row.lastChild.setAttribute('vAlign', 'top');
  116.             _row.lastChild.setAttribute('width', _widths[3]);
  117.             _row.lastChild.appendChild(document.createElement('font'));
  118.             _row.lastChild.lastChild.size = '1';
  119.             _row.lastChild.lastChild.appendChild(document.createTextNode(_fields[_f][4]));
  120.             _holder.firstChild.appendChild(_row);
  121.         }
  122.         var _submit = document.createElement('tr');
  123.         _submit.appendChild(document.createElement('td'));
  124.         _submit.lastChild.setAttribute('class', 'window' + (((_f+1) % 2 == 0)? '1' : '2'));
  125.         _submit.lastChild.setAttribute('className', 'window' + (((_f+1) % 2 == 0)? '1' : '2'));
  126.         _submit.lastChild.setAttribute('align', 'center');
  127.         _submit.lastChild.setAttribute('colSpan', 3);
  128.         var _button = document.createElement('input');
  129.         _button.setAttribute('type', 'button');
  130.         _button.setAttribute('value', 'Post Message');
  131.         _button.onclick = function() { _posting_form.post_it(); };
  132.         _submit.lastChild.appendChild(_button);
  133.         _holder.firstChild.appendChild(_submit);
  134.         document.post_form.style.display = 'none';
  135.         document.post_form.parentNode.insertBefore(_holder,  document.post_form);
  136.     },
  137.     
  138.     post_it: function() {
  139.         // create message and attempt to post it
  140.         this.errors = new Array();
  141.         document.post_form.message.value = document.post_form.subject.value = '';
  142.         var _sub = document.getElementById('0').value;
  143.         _fields[0][5] = true;
  144.         document.post_form.subject.value    = _sub;
  145.         for(_f=0; _f<_fields.length; _f++) {
  146.             if(document.getElementById(_f)) {
  147.                 _value = document.getElementById(_f).value;
  148.                 if(!_value || _value.match(/^s*$/)) {
  149.                     if(_f > 0 && _fields[_f][5])
  150.                         this.show_error('You have left the ' + _fields[_f][1] + ' option empty. This is a required field and as such must contain a value.');
  151.                     else
  152.                         _value = '[i]None[/i]';
  153.                 }
  154.                 document.post_form.message.value += '[b]' + _fields[_f][1] + ':[/b] ' + _value + 'nn';
  155.             }
  156.         }
  157.         if(this.errors.length == 0)
  158.             document.post_form.post.click();
  159.         else
  160.             this.show_error();
  161.     },
  162.     
  163.     show_error: function() {
  164.         if("undefined" != typeof arguments[0] && arguments[0]) {
  165.             this.errors.push(arguments[0]);
  166.         } else {
  167.             // Show Errors
  168.             if(document.getElementById('status_holder')) {
  169.                 document.getElementById('status_holder_title').innerHTML = "An Error Has Occured";
  170.                 document.getElementById('status_holder_message').innerHTML = this.errors.join("<br />");
  171.                 document.getElementById('status_holder').style.display = 'block';
  172.             }
  173.         }
  174.     }
  175. }
  176.  
  177.  
  178. if(document.post_form && location.href.match(/action/post/?$/) && vf_username != 'Guest') {
  179.     _posting_form.init();
  180. }
  181.  
  182. //-->
  183. </script>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Posting Template Error (21st Jan 08 at 10:20pm UTC)
What happens when you use it? {Smile}
dog199200
Guest
Re: Posting Template Error (21st Jan 08 at 10:34pm UTC)
nothing at all..it comes up as a normal posting form
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Posting Template Error (21st Jan 08 at 11:17pm UTC)
Line 28: _fields[_f++] = new Array('textarea', 'Character Skillz', ['cols', 40, 'rows', 10], false, 'What's your characters skillz?', true);

You cannot have apostrophes in your question. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Posting Template Error (21st Jan 08 at 11:24pm UTC)
Replace it with this:

_fields[_f++] = new Array('textarea', 'Character Skillz', ['cols', 40, 'rows', 10], false, 'What\'s your characters skillz?', true);
dog199200
Guest
Re: Posting Template Error (21st Jan 08 at 11:37pm UTC)
changed it and it still wont work also i edited the code above because i added this to it

Code:
 
  1. _fields[_f++] = new Array('input', 'Password', ['size', 40, 'maxLength', 50], '', 'If you read the rules youd know what this means. (Most be filled in with the right password or your profile will not be accepted.', true);
 
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Posting Template Error (21st Jan 08 at 11:52pm UTC)
Can we get a link to your board, please?

rroll.to— Shorten a link, rickroll your friends.
dog199200
Guest
Re: Posting Template Error (22nd Jan 08 at 12:46am UTC)
http://dog1992.proboards20.com/

the posting template is under Character Profiles
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Posting Template Error (22nd Jan 08 at 1:34am UTC)
I don't see Ross' code; I see California's. {Unsure}

rroll.to— Shorten a link, rickroll your friends.
dog199200
Guest
Re: Posting Template Error (22nd Jan 08 at 2:05am UTC)
...
dog199200
Guest
Re: Posting Template Error (22nd Jan 08 at 2:06am UTC)
oops i sent you the wrong board... i sent your the proboards version...

http://inuyashasworld.virtualforums.co.uk/
dog199200
Guest
Re: Posting Template Error (26th Jan 08 at 9:27pm UTC)
bump..still getting the error, but not on the inuyasha site anymore, but on my fma site..

http://fmaadvanced.virtualforums.co.uk/
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Posting Template Error (26th Jan 08 at 9:44pm UTC)
I Should've realized what the error was from the start. {Tongue Out}

Here you go:

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. /* Predefined Posting Template/Form
  5.     Created by Ross of vForums
  6.     http://virtualforums.co.uk
  7.     Please do not repost outside of
  8.     vForums support without permission */
  9.  
  10. var _title = 'Character Profile';
  11.  
  12. var _description = 'Fill this out and post it to make your characters profile.';
  13.  
  14. var _fields = new Array(); var _f = 0;
  15.     _fields[_f++] = new Array('input', 'Character Full Name', ['size', 40, 'maxLength', 50], '', 'Your characters full name, first and last.', true);
  16.     _fields[_f++] = new Array('input', 'Character NickName', ['size', 40, 'maxLength', 50], '', 'Character Nickname (If Doesnt Got One Just Put * )', true);
  17.     _fields[_f++] = new Array('input', 'Character Age', ['size', 40, 'maxLength', 50], '', 'Put Your characters age here.', true);
  18.     _fields[_f++] = new Array('input', 'Character Height', ['size', 40, 'maxLength', 50], '', 'Whats the height of your character?', true);
  19.     _fields[_f++] = new Array('select', 'Character Gender', false, ['Male', 'Female'], 'Whats your characters Gender?', true);
  20.     _fields[_f++] = new Array('select', 'Character Time', false, ['Japan', 'Feudal Japan'], 'What time is your character from? *Keep in mind that this sets where you can RP*', true);
  21.     _fields[_f++] = new Array('input', 'Character Eye Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters eye color?', true);
  22.     _fields[_f++] = new Array('input', 'Character Hair Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters hair color?', true);
  23.     _fields[_f++] = new Array('input', 'Character Skin Color', ['size', 40, 'maxLength', 50], '', 'Whats your characters skin color?', true);
  24.     _fields[_f++] = new Array('input', 'Character Race', ['size', 40, 'maxLength', 200], '', 'Whats your characters Class?', true);
  25.     _fields[_f++] = new Array('select', 'Character Ailment', false, ['Good', 'Neutral', 'Evil'], 'Whats your characters Aliment?', true);
  26.     _fields[_f++] = new Array('input', 'Character Weapon', ['size', 40, 'maxLength', 50], '', 'Whats your characters Weapon?', true);
  27.     _fields[_f++] = new Array('textarea', 'Character Weapon Description', ['cols', 40, 'rows', 100], false, 'Whats the description of your characters weapon?', true);
  28.     _fields[_f++] = new Array('textarea', 'Character Skillz', ['cols', 40, 'rows', 10], false, 'Whats your characters skillz?', true);
  29.     _fields[_f++] = new Array('input', 'Character Description', ['size', 40, 'maxLength', 50], false, 'Whats your character looks like. (Pics allowed)', true);
  30.     _fields[_f++] = new Array('textarea', 'Character Bio', ['cols', 40, 'rows', 100], false, 'Whats the story behind your character?', true);
  31.     _fields[_f++] = new Array('input', 'Password', ['size', 40, 'maxLength', 50], '', 'If you read the rules youd know what this means. (Most be filled in with the right password or your profile will not be accepted.', true);
  32.  
  33. var _widths = ['100%', '20%', '40%', '40%'];
  34.  
  35. var _posting_form = {
  36.  
  37.     errors: new Array(),
  38.  
  39.     init: function() {
  40.         this.create_form();
  41.     },
  42.     
  43.     create_form: function() {
  44.         // Create new post layout
  45.         var _holder = document.createElement('table');
  46.         _holder.setAttribute('className', 'border');
  47.         _holder.setAttribute('class', 'border');
  48.         _holder.setAttribute('cellSpacing','1');
  49.         _holder.setAttribute('cellPadding', '4');
  50.         _holder.setAttribute('align', 'center');
  51.         _holder.setAttribute('width', _widths[0]);
  52.         _holder.setAttribute('id', 'post_form_holder');
  53.         _holder.appendChild(document.createElement('tbody'));
  54.         _holder.firstChild.appendChild( document.createElement('tr') ).appendChild( document.createElement('td') ).appendChild( document.createElement('font') );
  55.         _holder.firstChild.lastChild.lastChild.className = 'title1';
  56.         _holder.firstChild.lastChild.lastChild.colSpan = '3';
  57.         _holder.firstChild.lastChild.lastChild.lastChild.size = '2';
  58.         _holder.firstChild.lastChild.lastChild.lastChild.appendChild(document.createTextNode(_title));
  59.         if(_description) {
  60.             _holder.firstChild.appendChild( document.createElement('tr') ).appendChild( document.createElement('td') ).appendChild( document.createElement('font') );
  61.             _holder.firstChild.lastChild.lastChild.setAttribute('className', 'window1');
  62.             _holder.firstChild.lastChild.lastChild.setAttribute('class', 'window1');
  63.             _holder.firstChild.lastChild.lastChild.setAttribute('colSpan', '3');
  64.             _holder.firstChild.lastChild.lastChild.lastChild.setAttribute('size', '2');
  65.             _holder.firstChild.lastChild.lastChild.lastChild.innerHTML = _description;
  66.         }
  67.         
  68.         for(_f=0; _f<_fields.length; _f++) {
  69.             switch(_fields[_f][0]) {
  70.                 case 'textarea' :
  71.                     var _tmp = document.createElement('textarea');
  72.                 break;
  73.                 
  74.                 case 'select' :
  75.                     var _tmp = document.createElement('select');
  76.                     for(_o=0; _o<_fields[_f][3].length; _o++) {
  77.                         _tmp.options[_o] = new Option(_fields[_f][3][_o], _fields[_f][3][_o]);
  78.                     }
  79.                 break;
  80.                 
  81.                 default :
  82.                     var _tmp = document.createElement('input');
  83.                     _tmp.type = 'text';
  84.                     if("undefined" != typeof _fields[_f][3] && _fields[_f][3] != "")
  85.                         _tmp.setAttribute('value', _fields[_f][3]);
  86.                 break;
  87.             }
  88.             _tmp.setAttribute('id', _f);
  89.             if("undefined" != typeof _fields[_f][2] && _fields[_f][2].length > 0) {
  90.                 for(_a=0; _a<_fields[_f][2].length; _a++) {
  91.                     _tmp.setAttribute(_fields[_f][2][_a++], _fields[_f][2][_a]);
  92.                 }
  93.             }
  94.             var _class = 'window' + ((_f % 2 == 0)? '2' : '1');
  95.             var _row = document.createElement('tr');
  96.             _row.appendChild(document.createElement('td'));
  97.             _row.lastChild.setAttribute('class', _class);
  98.             _row.lastChild.setAttribute('className', _class);
  99.             _row.lastChild.setAttribute('vAlign', 'top');
  100.             _row.lastChild.setAttribute('width', _widths[1]);
  101.             _row.lastChild.appendChild(document.createElement('font'));
  102.             _row.lastChild.lastChild.setAttribute('size', '2');
  103.             _row.lastChild.lastChild.style.fontWeight = 'bold';
  104.             _row.lastChild.lastChild.appendChild(document.createTextNode(_fields[_f][1] + ':'));
  105.             _row.appendChild(document.createElement('td'));
  106.             _row.lastChild.setAttribute('class', _class);
  107.             _row.lastChild.setAttribute('className', _class);
  108.             _row.lastChild.setAttribute('width', _widths[2]);
  109.             _row.lastChild.appendChild(document.createElement('font'));
  110.             _row.lastChild.lastChild.setAttribute('size', '2');
  111.             _row.lastChild.lastChild.appendChild(_tmp);
  112.             _row.appendChild(document.createElement('td'));
  113.             _row.lastChild.setAttribute('class', _class);
  114.             _row.lastChild.setAttribute('className', _class);
  115.             _row.lastChild.setAttribute('vAlign', 'top');
  116.             _row.lastChild.setAttribute('width', _widths[3]);
  117.             _row.lastChild.appendChild(document.createElement('font'));
  118.             _row.lastChild.lastChild.size = '1';
  119.             _row.lastChild.lastChild.appendChild(document.createTextNode(_fields[_f][4]));
  120.             _holder.firstChild.appendChild(_row);
  121.         }
  122.         var _submit = document.createElement('tr');
  123.         _submit.appendChild(document.createElement('td'));
  124.         _submit.lastChild.setAttribute('class', 'window' + (((_f+1) % 2 == 0)? '1' : '2'));
  125.         _submit.lastChild.setAttribute('className', 'window' + (((_f+1) % 2 == 0)? '1' : '2'));
  126.         _submit.lastChild.setAttribute('align', 'center');
  127.         _submit.lastChild.setAttribute('colSpan', 3);
  128.         var _button = document.createElement('input');
  129.         _button.setAttribute('type', 'button');
  130.         _button.setAttribute('value', 'Post Message');
  131.         _button.onclick = function() { _posting_form.post_it(); };
  132.         _submit.lastChild.appendChild(_button);
  133.         _holder.firstChild.appendChild(_submit);
  134.         document.post_form.style.display = 'none';
  135.         document.post_form.parentNode.insertBefore(_holder,  document.post_form);
  136.     },
  137.     
  138.     post_it: function() {
  139.         // create message and attempt to post it
  140.         this.errors = new Array();
  141.         document.post_form.message.value = document.post_form.subject.value = '';
  142.         var _sub = document.getElementById('0').value;
  143.         _fields[0][5] = true;
  144.         document.post_form.subject.value    = _sub;
  145.         for(_f=0; _f<_fields.length; _f++) {
  146.             if(document.getElementById(_f)) {
  147.                 _value = document.getElementById(_f).value;
  148.                 if(!_value || _value.match(/^s*$/)) {
  149.                     if(_f > 0 && _fields[_f][5])
  150.                         this.show_error('You have left the ' + _fields[_f][1] + ' option empty. This is a required field and as such must contain a value.');
  151.                     else
  152.                         _value = '[i]None[/i]';
  153.                 }
  154.                 document.post_form.message.value += '[b]' + _fields[_f][1] + ':[/b] ' + _value + 'nn';
  155.             }
  156.         }
  157.         if(this.errors.length == 0)
  158.             document.post_form.post.click();
  159.         else
  160.             this.show_error();
  161.     },
  162.     
  163.     show_error: function() {
  164.         if("undefined" != typeof arguments[0] && arguments[0]) {
  165.             this.errors.push(arguments[0]);
  166.         } else {
  167.             // Show Errors
  168.             if(document.getElementById('status_holder')) {
  169.                 document.getElementById('status_holder_title').innerHTML = "An Error Has Occured";
  170.                 document.getElementById('status_holder_message').innerHTML = this.errors.join("<br />");
  171.                 document.getElementById('status_holder').style.display = 'block';
  172.             }
  173.         }
  174.     }
  175. }
  176.  
  177.  
  178. if(document.post_form && location.href.match(/action\/post\/?$/) && vf_username != 'Guest') {
  179.     _posting_form.init();
  180. }
  181.  
  182. //-->
  183. </script>
 

rroll.to— Shorten a link, rickroll your friends.
 Printable View

All times are GMT+0 :: The current time is 1:54pm
Page generated in 1.3765 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums