how to simulate "return key" using jQuery?

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

I use CodeMirror and jscl.

CodeMirror is a javascript library to implement a code editor on a browser, and jscl is a console for common lisp on browsers.

I'm trying to send the code on CodeMirror's editting area to jscl's console and evaluate it.

Now I can send the code to the cosole using the code below:

$('iframe').contents().find('span.jqconsole-prompt:last-child span span:last-child').append([url removed, login to view]())

But I cannot evaluate the code on jscl's REPL.

I tried the code bellow:

$('iframe').contents().find('span.jqconsole-prompt:last-child span span:last-child').trigger({type: 'keypress', which: 13, keyCode: 13});

But I couldn't simulate "return key" using jQuery.

I'll upload the zip code.

I'd like you to write a code to evaluate the code on REPL using jQuery.

If you're good at javascript, you'll be able to deal with this issue.

I'd appreciate your help.

In the webpage, I use iframe.

And the task is to send a event triggering "return key" from the main site to iframe's different domain. So you will need to use "cross domain messaging".

Please refer to the document below if you need.
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

HTML5 JavaScript Lisp Node.js

Project ID: #13493678

About the project

8 proposals Remote project Active 7 years ago

Awarded to:

barron9

5 minutes fixx

¥3000 JPY in 1 day
(5 Reviews)
2.7

8 freelancers are bidding on average ¥2560 for this job

RubyOnRail

Hello, It's a pleasure to let you know that I've Completed and Delivered similar project before. All I need to work on customization part if we can proceed towards more discussion. I have gone through your project More

¥2500 JPY in 1 day
(3 Reviews)
3.9