Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function submitForm(){
- var lang = "java";
- $("[name='lang']").val("java");
- $("[name='code']").val(editors['code'].getValue());
- if( supportcode ){
- $("[name='support']").val(editors['supportcode'].getValue());
- }
- if( utilcode ){
- $("[name='util']").val(editors['utilcode'].getValue());
- }
- if( extracode ){
- $("[name='extra']").val(editors['extracode'].getValue());
- }
- if( inputs ){
- $("[name='inputs']").val(editors['inputs'].getValue());
- }
- $("[name='script']").val("compile_new");
- jQuery.support.cors = true;
- $('#wait').show();
- if ($.browser.webkit || $.browser.mozilla) {
- var url = "http://www.compileonline.com/compile_new.php";
- }else{
- var url = "col_proxy.php";
- }
- if( lang == "swift" ){
- url = "http://208.52.191.109/execute_new.php";
- }
- if( lang == "java8" ){
- url = "http://208.52.191.109/compile_new.php";
- }
- $.ajax({
- type: "POST",
- cache: false,
- crossDomain: true,
- url: url,
- target: "view",
- data: $("#ff").serialize(),
- success:function(data)
- {
- $('#view').contents().find("html").html(data);
- $('#wait').hide();
- return false;
- },
- error:function (data, status, error) {
- alert(error);
- return false;
- }
- });
- return false; // avoid to execute the actual submit of the form.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement