Welcome Guest, Not a member yet? Register   Sign In
CI and JS
#1

[eluser]sehummel[/eluser]
I'm not sure if this is more of a CodeIgniter question or a Javascript question.

Here is my [removed] (JS tags removed by forum)

Code:
[removed]
function con(message) {
var answer = confirm(message);
if (answer) {
  return true;
}

return false;
}
[removed]

Here is my CI:

Code:
echo form_submit('submit', 'Login', 'onclick="return con("Are you sure you don\'t have a configuration to submit? Please check the checkbox if you do.")');

Why am I not getting a confirmation dialog box? The JS is in my view. The CI renders the submit button correctly.
#2

[eluser]cideveloper[/eluser]
Try this.
Code:
echo form_submit('submit', 'Login', 'onclick="return con(\'Are you sure you don\\\'t have a configuration to submit? Please check the checkbox if you do.\')"');




Theme © iAndrew 2016 - Forum software by © MyBB