Tag Archives: java

convert password encryption from java to php

Questions: I’m trying to create a PHP version of an existing JSP program, however I’m stuck at the password encryption part. Could you please tell me how to convert this one? I know it tries to get the md5() but after that, I don’t get it. I get lost in the Stringbuffer and for() parts.… Read More »

How do I fix orientation (upload image) before saving in folder (Javascript)?

Questions: I try this reference : https://github.com/blueimp/JavaScript-Load-Image I try like this : https://jsfiddle.net/oscar11/gazo3jc8/ My code javascript like this : $(function () { var result = $(‘#result’) var currentFile function updateResults (img, data) { var content if (!(img.src || img instanceof HTMLCanvasElement)) { content = $(‘<span>Loading image file failed</span>’) } else { content = $(‘<a target=”_blank”>’).append(img)… Read More »

How to insert javascript value into the php session variable

Questions: I want to insert javascript value into the php session variable but inside the javascript function. Here is what I have tried and it is not working: function languageChange() { var lang = $(‘#websites1 option:selected’).val(); <?php $_SESSION[‘SESS_LANGUAGE’]?> = lang; alert(<?php echo $_SESSION[‘SESS_LANGUAGE’]?>); } Answers:

PHP/Java bridge problem

Questions: I am using tomcat 6 on windows. Here is the code I am testing. import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.StringReader; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; /** * Create and run THREAD_COUNT PHP threads, concurrently accessing a * shared resource. * * Create 5 script engines, passing each a shared resource allocated * from… Read More »

before form submit call function javascript

Questions: My program manager is a QR-code in php. I have my list of QR-codes and have (among other options) the option to delete the QR-code. When I click delete, I want to bring up a confirmation message in javascript. When I click save, I do not need confirmation. My form: <form method=”post” enctype=”multipart/form-data”> (…)… Read More »