I am getting nothing on the web client. No input box display to enter I get error on page. I want to popup input box to enter a reason then set the value to Reason field and save and close.// declare nameVar variable and initialize to null string
var reas =“”;
if (document.forms[0].Reason.value==0);
{
// prompt user for name and assign to nameVar
reas = prompt(“Please provide your reason of change or correcction to the document”, “Enter here”) ;
}
var form = document.forms[0];
form.Reason.value=reas;
form.SaveOptions.value=“1”;
form.submit();
window.close();
What is wrong with my code?
amp
Subject: If IE7 then this is a browser-setting
Are you using IE7 as your web-browser?There is a security setting in IE7 options that allows websites to use the Javascript “Prompt”. This is enabled by default in the “Intranet” and “Trusted Sites” zones but is NOT enabled in the “Internet” zone.
So, the easiest solution may just be to ensure your web-application sits in one of these two zones. To do this, do the following:
-
Identify the zone for your web-application by looking in the browser status-bar (near the right-hand side. I’d guess it will say “Internet”).
-
In IE menus choose Tools–Internet Options and the Security Tab.
-
Select the “Local Intranet” or “Trusted Sites” zone.
-
Click on the “Sites” button and in the dialog enter the top-level domain for your application (e.g. .domain.com) and use the “Add” button.
-
Save your changes by using Close and then OK.
Note: You can check the setting for any zone by following steps 1 and 2 above, selecting the zone you’re interested and then doing the following:
-
Click the “Custom Level” button to view/modify the security settings for the selected zone.
-
In the list of options find the heading “Scripting” and the setting “Allow websites to prompt for information using scripted windows”.
-
If this setting is enabled then “Prompt” will work for sites in this zone. If it is NOT enabled then “Prompt” will not work.
I hope that helps.
Subject: I got prompt working
Prompt message pops up but the does not display the message I input in the box and save the document. Nothing happens again.
Subject: Please help
// declare nameVar variable and initialize to null stringvar reas =“”;
{
// prompt user for name and assign to nameVar
reas = prompt(“Please provide your reason of change or correcction to the document”, “Enter here”);
}
var form = document.forms[0];
form.Reason.value=reas;
form.SaveOptions.value=“1”;
form.submit();
window.close();
I get prompt message to enter into box but document does not get saved and closed.
Please help me…