cagali
Posts: 10
|
Posted: 03/18/2014, 2:36 AM |
|
Hi,
I try to add action to my delete button. However, when I pop over to my dev server, there is no message prompt. Instead it throw me jQuery not defined.
I had modified the code to include the source where the jquery.js is located, like below:
<script src="../js/jquery/jquery.js" type="text/javascript">
//End Include User Scripts
//Common Script Start @1-8BFA436B
jQuery(function ($) {
var features = { };
var actions = { };
var params = { };
//End Common Script Start
//NewRecord1Button_InsertOnClick Event Start @-15C4F73E
actions["NewRecord1Button_InsertOnClick"] = function (eventType, parameters) {
var result = true;
//End NewRecord1Button_InsertOnClick Event Start
//Confirmation Message @10-42B667F8
return confirm('Add record?');
//End Confirmation Message
//NewRecord1Button_InsertOnClick Event End @-A5B9ECB8
return result;
};
//End NewRecord1Button_InsertOnClick Event End
//Event Binding @1-A18C3A75
$('*:ccsControl(NewRecord1, Button_Insert)').ccsBind(function() {
this.bind("click", actions["NewRecord1Button_InsertOnClick"]);
});
//End Event Binding
//Plugin Calls @1-00453011
$('*:ccsControl(NewRecord1, Button_Cancel)').ccsBind(function() {
this.bind("click", function(){ $("body").data("disableValidation", true); });
});
//End Plugin Calls
//Common Script End @1-562554DE
});
//End Common Script End
//End CCS script
</script>
And still no window prompt to me.
And I found that there is a missing file called https://localhost:8080/dir/ClientI18N.jsp?file=Globaliz...le=CCS_LocaleID which I can't find it in my published folder.
Is there something to do with this file?
Thanks.
|
|
|
eratech
Posts: 513
|
Posted: 03/18/2014, 8:53 PM |
|
cagali - are you sure you added a Client action of 'Confirmation' to the Delete button?
I can't see any jQuery/javascript in the above code that relates to the Delete button (I would expect something like the 'new record button, but for something like "NewRecord1Button_Delete"
The 'ClientI18N.js' is for multilingual stuff, and not the simple confirmation.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
cagali
Posts: 10
|
Posted: 03/18/2014, 10:34 PM |
|
sorry, typo. It is a Add button instead of Delete button.
|
|
|
eratech
Posts: 513
|
Posted: 03/19/2014, 11:30 PM |
|
So when you click the button, does any error appear in your browser, or Firebug/Web Developer toolbar?
Why did you need to change the reference to the jquery.js file? Is the above page in a sub folder of the root folder? The reference to '../js/jquery/jquery.js' implies it is off the parent folder of the page.
In that case, Firebug / Wed Dev or javascript console would show a resource not found for jquery.js.
Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |
|
|
cagali
Posts: 10
|
Posted: 03/21/2014, 3:56 AM |
|
Yes, it is showing the jquery is undefined or not an object. So, in my jsp page, i had included the jquery source in the script. The error message for undefined or not an object is gone. But the confirmation is not prompted out.
Still finding the solutions for this.
|
|
|
|