function fp_get_js_confirm_link
Search API
| 7.x misc.inc | fp_get_js_confirm_link($question, $action_if_yes, $link_text, $extra_class = "", $link_title = "") | 
| 6.x misc.inc | fp_get_js_confirm_link($question, $action_if_yes, $link_text,  | 
| 4.x misc.inc | fp_get_js_confirm_link($question, $action_if_yes, $link_text) | 
| 5.x misc.inc | fp_get_js_confirm_link($question, $action_if_yes, $link_text) | 
Creates a javascript "confirm" link, so when clicked it asks the user a question, then proceeds if they select OK. The main reason I want to do this is so I can pass the $question through my t() function. (do it when you call this function)
5 calls to fp_get_js_confirm_link()
- advise_display_popup_change_term in modules/advise/ advise.module 
- This popup allows the advisor to change the advising term.
- advise_display_popup_change_track in modules/advise/ advise.module 
- Lets the user change the track for this major.
- content_render_content in modules/content/ content.module 
- Return the HTML rendering the content we have in the database.
- system_modules_form in modules/system/ system.module 
- This is the form which an admin may use to manage the modules in the system.
- user_user_roles_form in modules/user/ user.module 
- This form allows the user to manage the roles in the system.
File
- includes/misc.inc, line 1371 
- This file contains misc functions for FlightPath
Code
function fp_get_js_confirm_link($question, $action_if_yes, $link_text) {
  $rtn = "";
  $question = fp_reduce_whitespace($question);
  $question = htmlentities($question, ENT_QUOTES);
  $question = str_replace("\n", "\\n", $question);
  $rtn .= "<a href='javascript: if(confirm(\"$question\")) { $action_if_yes;  }'>$link_text</a>";
  return $rtn;
}
