Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //function used to check all information is in a for that can be sent to the server so that no errors are returned. Data validation is also carryed out on the server
- function submitForVerification(){
- strBuild="";
- //put the elements array into a form that can be sent to the server
- for(i=0;i<elements.length;i++){
- //don't put a comma at the beggining but do put one in between each element
- if(i==0){
- strBuild = strBuild + elements[i].title;
- }else{
- strBuild = strBuild + "," + elements[i].title;
- }
- }
- //write into the form
- var formToBeWrittenTo = document.getElementById('headings')
- formToBeWrittenTo.value = strBuild;
- strBuild="";
- for(i=0;i<elements.length;i++){
- //don't put a comma at the beggining but do put one in between each element
- if(i==0){
- strBuild = strBuild + elements[i].type;
- }else{
- strBuild = strBuild + "," + elements[i].type;
- }
- }
- formToBeWrittenTo = document.getElementById('columnsToGo')
- formToBeWrittenTo.value = strBuild;
- //submit to form to the server
- document.formSubmit.submit();
- }
Advertisement
Add Comment
Please, Sign In to add comment