0

Ok I have the following: http://jsfiddle.net/RaWF7/

When I click on Save I want my saveFunction to save the value that is inside the input.

function saveFunction(){
    calculator.result.value
 }

I know i am going to feel stupid after this:)

<li><a href="#" style="text-decoration:none; color:black;" onClick="saveFunction()">Edit</a></li>
5
  • Where you need to save this value? Commented Jan 21, 2013 at 13:09
  • i need it saved... so i can use ctrl+v to display it on another page... i will need the function to work like ctrl+c Commented Jan 21, 2013 at 13:12
  • Do you want to save to clipboard? This is not possible with only JavaScript. Commented Jan 21, 2013 at 13:13
  • possible duplicate of How to copy to the clipboard in JavaScript? Commented Jan 21, 2013 at 13:13
  • yes... well wif not javascript what can i use Commented Jan 21, 2013 at 13:14

1 Answer 1

1

To save the value within the clipboard you can use this library: https://github.com/jonrohan/ZeroClipboard

Currently because if security issues the manipulation of the clipboard using JavaScript is not allowed (at least it's not cross-browser).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.