02-20-2015 06:29 AM
XMLHttpRequest cannot load http://localhost:8085/alfresco/service/hello. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 500
Hello ${args.name}
<webscript>
<shortname>Hello</shortname>
<description>Polite greeting</description>
<url>/hello?name={nameArgument}</url>
<authentication>none</authentication>
</webscript>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script type="text/javascript" src="calendar.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://malsup.github.com/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('form').submit(function(evt) {
// get the data typed into the input field
var name = $(this).find('#name').val();
// submit a new `post` request
$.post('http://localhost:8085/alfresco/service/hello', name);
// ^ indicates the url ^ data you want to send
// prevent the form from submitting the 'normal' way
evt.preventDefault();
}
)});
</script>
</head>
<body id="main_body" >
<img id="top" src="top.png" alt="">
<div id="form_container">
<h1><a>Registration Form</a></h1>
<form id="form_972911" class="appnitro" method="post" action="">
<div class="form_description">
<h2>Registration Form</h2>
<p>This is your form description. Click here to edit.</p>
</div>
<ul >
<li id="li_1" >
<label class="description" for="element_1">Name</label>
<div>
<input id="name" name="element_1" class="element text medium" type="text" maxlength="255" value=""/>
</div>
</li>
<li class="buttons">
<input type="hidden" name="form_id" value="972911" />
<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
<img id="bottom" src="bottom.png" alt="">
</body>
</html>
02-20-2015 06:58 AM
08-13-2015 09:01 AM
03-08-2016 12:00 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.