This topic contains 3 replies, has 0 voices, and was last updated by adityasrivalli 7 years, 5 months ago.

  • Author
    Posts
  • #5888 Score: 0

    adityasrivalli
    • Contributions: 0
    • Level 1

    Need help to create a hyperlink in an alert box such as click

    Any ideas please
    This is a cached copy. Click here to see the original post.

  • #5889 Score: 0

    michoel
    • Contributions: 0
    • Level 1

    A standard alert box in JavaScript cannot include a clickable hyperlink.

    You have a couple of other options:

    1) You can use the new SS2.0 N/ui/dialog module to create a popup box with HTML

    Code:
    require([‘N/ui/dialog’], function(dialog) {
    dialog.alert({
    title: “Click on the link”,
    message: “Click here“,
    });
    });
    2) In SuiteScript 1.0 you can use the Ext.js library directly to achieve the same result.

    Code:
    var message = ;
    Ext.MessageBox.show({
    title: ‘Click on the link’,
    msg: “Click here“,
    icon: Ext.MessageBox.INFO,
    buttons: Ext.MessageBox.OK,
    });
    3) You can use any other 3rd party dialog library (such as jQuery UI) if you prefer

    4) Use a built-in confirm() dialog, and redirect one of the buttons to the url

    Code:
    if (window.confirm(‘Click ok to open the link’)) {
    window.location = nlapiResolveURL(‘TASKLINK’, ‘CARD_-10’);
    };

  • #5890 Score: 0

    Vesku1980
    • Contributions: 0
    • Level 1

    var invurl = nlapiResolveURL(‘RECORD’,’invoice’,invid);

    var tranid = resultSet[i].getValue(‘tranid’);

    var content = ‘‘+tranid+’

  • #5891 Score: 0

    adityasrivalli
    • Contributions: 0
    • Level 1

    Thank you Michoel…!

You must be logged in to reply to this topic.