function fp_get_js_prompt_link
Search API
7.x misc.inc | fp_get_js_prompt_link($question, $default, $action_if_yes, $link_text, $extra_class = "") |
6.x misc.inc | fp_get_js_prompt_link($question, $default, $action_if_yes, $link_text, |
4.x misc.inc | fp_get_js_prompt_link($question, $default, $action_if_yes, $link_text) |
5.x misc.inc | fp_get_js_prompt_link($question, $default, $action_if_yes, $link_text) |
Creates a javascript "prompt" link, which will ask the user a question.
Similar to the fp_get_js_confirm_link function, but this is a prompt box which lets the user type in a response.
See also
fp_get_js_confirm_link
2 calls to fp_get_js_prompt_link()
- schools_administer_schools_form in modules/
schools/ schools.module - 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 2761 - This file contains misc functions for FlightPath
Code
function fp_get_js_prompt_link($question, $default, $action_if_yes, $link_text, $extra_class = "") {
$rtn = "";
$question = fp_reduce_whitespace($question);
$question = htmlentities($question, ENT_QUOTES);
$question = str_replace("\n", "\\n", $question);
$rtn .= "<a href='javascript: var response = prompt(\"$question\", \"$default\");
if (response != null)
{
$action_if_yes ;
}
' class='$extra_class'>$link_text</a>";
return $rtn;
}