Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Open web page from yes button in pop-up

New Here ,
Sep 18, 2018 Sep 18, 2018

I have been trying to get this javascript to work. I need a pop up to come up and give a warning, then if yes is clicked, it will open a web page. If no is clicked, the window will close. I am going nuts trying to get the link to open the web page. Any help would be great!


var cMsg = "You will be linking to another website not owned or operated by First National Bank of Louisburg.  First National Bank of Louisburg is not responsible for the availability or content of this website and does not represent either the linked website or you, should you enter into a transaction. The inclusion of any hyperlink does not imply any endorsement, investigation, verification or monitoring by  First National Bank of Louisburg of any information in any hyperlinked site. We encourage you to review their privacy and security policies which may differ from  First National Bank of Louisburg.";
cMsg += "\n\nDo you want to continue?";

var nRtn = app.alert(cMsg,2,2,"Question Alert Box");
if(nRtn == 4)
{// A yes Response
  // app.launchURL("https://get.adobe.com/reader", true);
  console.println("The Response Was Yes");
}
else if(nRtn == 3)
{ // No Response
  console.println("The Response Was No");
}
else  
{ //Unknown Response
  console.println("The Response Was somthing other than Yes/No: " + nRtn);
}

545
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 18, 2018 Sep 18, 2018

You have added // before app.launch...

Translate
Community Expert ,
Sep 18, 2018 Sep 18, 2018

What happens when you use the code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 18, 2018 Sep 18, 2018

The pop up comes up when I click on the button on the form, if I click "no" the Window Closes", if I click "yes" the window also just closes and does nothing else. I would like it to open a web browser window and go to the specified link when "yes" is selected. Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 18, 2018 Sep 18, 2018

You have added // before app.launch...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 18, 2018 Sep 18, 2018
LATEST

That fixed it! Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines