Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl>
This commit is contained in:
parent
dcc3bc97d6
commit
951673c9b5
|
|
@ -12,7 +12,7 @@ class ApplicationController < ActionController::Base
|
||||||
def set_headers
|
def set_headers
|
||||||
headers['Access-Control-Allow-Origin'] = 'lvh.me'
|
headers['Access-Control-Allow-Origin'] = 'lvh.me'
|
||||||
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
|
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
|
||||||
headers['Access-Control-Request-Method'] = 'lvh.me'
|
headers['Access-Control-Request-Method'] = '*'
|
||||||
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,19 @@
|
||||||
<%= decimal_to_word(127786.9) %><br />
|
<%= decimal_to_word(127786.9) %><br />
|
||||||
<%= decimal_to_word(599.99) %><br />
|
<%= decimal_to_word(599.99) %><br />
|
||||||
Pellentesque luctus quam quis consequat vulputate. Sed sit amet diam ipsum. <br>
|
Pellentesque luctus quam quis consequat vulputate. Sed sit amet diam ipsum. <br>
|
||||||
|
<input type="text" id="msg" value="hello" /><br />
|
||||||
|
<input type="text" id="domain" value="lvh.me" /><br />
|
||||||
|
<button onClick="return sendToParent()">Zapisz</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function sendToParent() {
|
||||||
|
var msg = $('#msg').val();
|
||||||
|
var domain = $('#domain').val();
|
||||||
|
parent.postMessage(msg,domain);
|
||||||
|
}
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue