Can´t display javascript prompt messages (SOLVED)

sadaseba

New member
Hi!, I am actually working with the trial version but if my project works, I’ll need to purchase the full software.

My page isn’t really an eBook, is an DHTML page made with javascript, like an application based on HTML code and javacript.
in some actions, the application prompt for information in order to work with, a numeric quantity. this action works fine on IE7 but doesn’t work with the compiled EXE. what can I do for?
 
Last edited:
when i run this code:
Code:
<script type="text/javascript">
function asking_number(){
var case=prompt("how much?","quantity");
}
</script>
<input type="button" onclick="asking_number()" value="Ask" />
any prompt box was displayed, but i realy need to fix this problem because i repeat this line so many times with another variables.

i hope this will have a solution.
 
Last edited:
You need to verify that your variable names do not clash with Javascript commands.

In your case, you cannot use case as a variable since it used with Javascript’s switch / case statements. Try renaming the case variable to xcase or something else and you will see that the results are more like what you expected.

Later,
 
Last edited:
sorry, I just was trying to explain an example of the sequence, the original is this:
Code:
var caja.debe=];
for(var i=0;i<5;i++){
    caja.debe*=prompt("Ingrese Monto asignado: ",0);
}
and when I run it on HTMLEXE, nothing happen.

do I need HEScript for this commands?*
 
Last edited:
Does your code actually work in a IE browser?

Without verifying, I don’t think you can use a period in a variable, more like you can’t use reserved names, as mentioned above.

I would suggest running your code through a JSlint program or website to eliminate all the coding errors. One example is at http://jslint.com. There are others if you seach for them. Doing this will help you with your Javascript syntax.

Notice the warning on the opening page. Warning! JSLint will hurt your feelings.😉

Good Luck,
 
Last edited:
First step: go to the Script Manager, double click on “UserMain” and copy/paste this code in the existing script:

Code:
Code:
function AskUser: String;
begin
Result := InputBox("Ingrese Monto asignado:", "Query", "");
end;
Click “Save Script” and now replace your JS code with:
Code:
var caja.debe=];
for(var i=0;i<5;i++){
    caja.debe*=window.external.GetHEScriptCom('usermain.AskUser', '0');
}
 
Last edited:
Hi!, I was working with the original code and finnaly i disvover the problem, i can’t call the javascript functions using an

but if i put the same call on a works perfectly.

what can i do?

Thanks
 
Last edited:
Try another JavaScript event to detect when the end user has changed the item in the combobox.
 
Last edited:
Thanks!, finaly I did solve it changing the onclick event on option tag, with the onkeydown event on the select tag and one auxiliary function between.
 
Last edited:
Back
Top