function fp_get_js_alert_link

6.x fp_get_js_alert_link($message, $link_text = "", $extra_css_class = "")
4.x fp_get_js_alert_link($message, $link_text, $extra_css_class = "")
5.x fp_get_js_alert_link($message, $link_text = "", $extra_css_class = "")

Creates a javascript "alert" link, which tells the user some message with javascript alert().

Similar to the fp_get_js_confirm_link function, but this is a simple alert message, with no user input.

See also


3 calls to fp_get_js_alert_link()
admin_display_groups_popup_edit_definition in modules/admin/
AdvisingScreen::display_popup_substitute in classes/AdvisingScreen.php
This is used to display the substitution popup to a user, to let them actually make a substitution.
fp_render_element in includes/
Returns the HTML to render this form (or content) element to the screen. $name is the HTML machine name. $element is an array containing all we need to render it. If you want default values to be taken from the SESSION (because we had form_errors,…


includes/, line 2731
This file contains misc functions for FlightPath


function fp_get_js_alert_link($message, $link_text = "", $extra_css_class = "") {

  $rtn = "";

  if ($link_text == "") {
    $link_text = "[?]";

  $message = str_replace("\n", " ", $message);
  $message = fp_reduce_whitespace($message);

  //$message = htmlentities($message, ENT_QUOTES);
  //$message = str_replace(""", "\"", $message);
  //$message = str_replace("[NL]", "<br>", $message);

  //$rtn .= "<a href='javascript: alert(\"" . $message . "\");' class='fp-alert-link $extra_css_class'>$link_text</a>";
  $rtn .= "<a href='javascript: fp_alert(\"" . base64_encode($message) . "\",\"base64\");' class='fp-alert-link $extra_css_class'>$link_text</a>";

  return $rtn;