 |
 |
I am in a situation to use http://www.trirand.net/demo/aspnet/mvc/jqgrid/[^] in my project. So i just want to know whether it has MIT license or not? Is there anyone who already uses it in his/her project. Please help me through this.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
 |
Is Google[^] not available in your company?
The first result for "jqgrid license" is:
The jqGrid is dual licensed and is released under GPL or MIT licenses.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Thank you . i will check it out.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
|
 |
Thank you . i will check it out.
So much complexity in software comes from trying to make one thing do two things.
Sibeesh
|
|
|
|
 |
hi,
I have a requirement in the jqgrid data that totally 3 columns in that one is name,date and one column called department where the edit type is select have two options education and humanresources.
for some records like up to this month 10/31 the records should be editable , i mean we can select some thing and we can update. only the current month should be editable and next month data should not editable we can view it but not edit just like should be in read mode.
How to approach this scenario?
$("#grid").jqGrid({
url: 'Handler.ashx',
datatype: 'json',
height: 250,
colNames: ['Name','Department', 'Date'],
colModel: [
{ name: 'Name', index: 'Name', width: 256, stype: 'text', editable: true, sortable: false, editoptions: { disabled: "disabled"} },
{ name: 'Department', index: 'Department', width: 256, stype: 'text', sortable: false, editable: true, edittype: 'select',
formatter: rowColorFormatter,
editoptions: { value: "Education:Education; Humanresource:Humanresource" }},
{ name: 'Date', index: 'Date', width: 256, editable: true, stype: 'text', sortable: true, sorttype: 'date', editoptions: { disabled: "disabled"} }
],
rowNum: 100,
loadonce: true,
rowList: [100, 200, 300],
pager: '#pager',
sortname: 'name',
viewrecords: true,
sortorder: 'asc',
gridview: true,
ignoreCase: true,
caseSensitive: false,
rownumbers: true,
reloadAfterSubmit: false,
width: 1024,
gridComplete: function() {
for (var i = 0; i < rowsToColor.length; i++) {
var Department = $("#" + rowsToColor[i]).find("td").eq(2).html();
if (Department == "Humanresource") {
$("#" + rowsToColor[i]).find("td").css("background-color", "red");
}
}
},
jsonReader: {
repeatitems: false
},
caption: 'Department Update',
editurl: 'Handler.ashx',
onSelectRow: function(id) {
if (id && id !== lastSelectedId) {
$('#grid').restoreRow(lastSelectedId);
$('#grid').editRow(id, true);
lastSelectedId = id;
}
},
afterSubmit: function() {
$(this).jqGrid("setGridParam", { datatype: 'json' });
return [true];
alert("returnvalue");
}
});
function rowColorFormatter(cellValue, options, rowObject) {
if (cellValue == "Humanresources")
rowsToColor[rowsToColor.length] = options.rowId;
return cellValue;
};
$("#grid").setGridParam({ sortname: 'CalDate', sortorder: 'asc' }).trigger('reloadGrid');
$("#grid").jqGrid('navGrid', '#pager',
{
edit: false,
add: false,
del: false,
search: true,
searchtext: "Search",
reloadAfterSubmit: true,
cloneToTop: true,
overlay: false,
beforeRefresh: function() {
$("#grid").setGridParam({ datatype: 'json', page: 1 }).trigger('reloadGrid');
}
}
});
$("#grid").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: true, defaultSearch: "cn" }).navButtonAdd('#pager', {
caption: "Export to Excel",
buttonicon: "ui-icon-disk",
onClickButton: function() {
ExportDataToExcel("#grid");
},
position: "last"
});
$("#grid").jqGrid('editRow', {
aftersavefunc: function() {
onEnterrowdetails('#list');
}
});
});
function ExportDataToExcel(tableCtrl) {
ExportJQGridDataToExcel(tableCtrl, "MKS.xlsx");
}
function onEnterrowdetails() {
$('#<%=lblMessage.ClientID%>').html(" Data Updated");
return true;
}
</script>
</form>
</body>
</html>
|
|
|
|
 |
We have a .Net webservice which runs on one server and a web application (javascript) running on another. The webservice needs to have Windows Authentication.
We keep getting the error 401 Unauthorized on the CORS Preflight call, which preceeds the cross domain webservice call. If we move the webservice on the same machine as the application, the calls run perfectly.
Spent four days now to get it working, hopefully someone here can point me in the right direction...
P.S.: added a JSFiddle which demonstrates the problem. http://jsfiddle.net/mr9Lpbc1/34/[^]
Here is the web.config we use for the webservice
="1.0" ="UTF-8"
<configuration>
<appSettings />
<connectionStrings />
<system.web>
<compilation debug="true" />
<authentication mode="Windows" />
<customErrors mode="Off" />
<webServices>
<protocols>
<add name="HttpSoap" />
<add name="HttpGet" />
<add name="HttpPost" />
</protocols>
</webServices>
<httpRuntime maxUrlLength="9999" relaxedUrlToFileSystemMapping="true" maxQueryStringLength="2097151" requestValidationMode="2.0"/>
<pages validateRequest="false" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<remove value="default.aspx" />
<remove value="Default.asp" />
<remove value="index.html" />
<remove value="iisstart.htm" />
<remove value="index.htm" />
<remove value="Default.htm" />
<add value="webservice.asmx" />
</files>
</defaultDocument>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="http://domain.nl" />
<add name="Access-Control-Allow-Credentials" value="true" />
<add name="Access-Control-Allow-Headers" value="SOAPAction, Content-Type,Authorization" />
<add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxUrl="10999" maxQueryString="9999" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
Here is the peace of javascript we are using
SOAPClientParameters = (function () {
function SOAPClientParameters() {
var self = this;
self.list = new Array();
}
SOAPClientParameters.prototype.add = function (name, value) {
var self = this;
self.list[name] = value;
return self;
};
SOAPClientParameters.prototype._serialize = function (o) {
var s = "";
switch (typeof (o)) {
case "string":
s += o; case "number":
case "boolean":
s += o.toString(); break;
case "object":
if (testNull(o)) { s += ""; }
else if (typeof o === 'Date') {
dateToSqlString(o); }
else if (typeof o === 'Array') {
for (var p in o) {
if (!isNaN(p)) {
(/function\s+(\w*)\s*\(/ig).exec(o[p].constructor.toString());
var type = RegExp.$1;
switch (type) {
case "":
type = typeof (o[p]);
case "String":
type = "string"; break;
case "Number":
type = "int"; break;
case "Boolean":
type = "bool"; break;
case "Date":
type = "DateTime"; break;
}
s += "<" + type + ">" + SOAPClientParameters._serialize(o[p]) + "</" + type + ">"
}
else s += "<" + p + ">" + SOAPClientParameters._serialize(o[p]) + "</" + p + ">"
}
}
else
for (var p in o)
s += "<" + p + ">" + SOAPClientParameters._serialize(o[p]) + "</" + p + ">";
break;
default:
throw new Error(500, "SOAPClientParameters: type '" + typeof (o) + "' is not supported");
}
return s;
}
SOAPClientParameters.prototype.toXml = function () {
var self = this;
var xml = "";
for (var p in self.list) {
if (typeof self.list[p] !== 'function') {
xml += "<" + p + ">" + self._serialize(self.list[p]) + "</" + p + ">";
}
}
return xml;
}
return SOAPClientParameters;
}());
SOAPClient = (function () {
function SOAPClient(url, async) {
var self = this;
self.xmlHttp = null;
if (window.XMLHttpRequest) {
self.xmlHttp = new XMLHttpRequest();
if (self.xmlHttp.readyState == null) {
self.xmlHttp.readyState = 1;
self.xmlHttp.addEventListener("load",
function () {
self.xmlHttp.readyState = 4;
if (typeof self.xmlHttp.onreadystatechange == "function")
self.xmlHttp.onreadystatechange();
},
false);
}
} else {
throw 'This browser is not supported!';
}
self.xmlHttp.async = async;
if (self.xmlHttp !== null) {
self.xmlHttp.open("POST", url, self.xmlHttp.async);
self.xmlHttp.url = url;
self.xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
self.xmlHttp.onerror = function () { if (self.xmlHttp.async) {
var errorClient = new SOAPClient(self.xmlHttp.url, false);
var exception = errorClient.invoke(self.xmlHttp.func, self.xmlHttp.parameters, function () { }, function () { });
self.xmlHttp.errorCallback(isnull(exception.message, 'Unknown error...'));
}
}
self.xmlHttp.onload = function () { if ((self.xmlHttp.readyState === 4) && (self.xmlHttp.status !== 200)) {
self.xmlHttp.errorCallback(self.xmlHttp.statusText);
}
}
}
}
SOAPClient.prototype.result = function (data) {
return data;
};
SOAPClient.prototype.invoke = function (method, parameters, successCallback, errorCallback) {
var self = this;
var ns = 'http://domain.com/';
var sr = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap:Envelope " +
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<soap:Body>" +
"<" + method + " xmlns=\"" + ns + "\">" +
parameters.toXml() +
"</" + method + "></soap:Body></soap:Envelope>";
var soapaction = ((ns.lastIndexOf("/") != ns.length - 1) ? ns + "/" : ns) + method;
self.xmlHttp.function = method;
self.xmlHttp.parameters = parameters;
self.xmlHttp.errorCallback = errorCallback;
self.xmlHttp.setRequestHeader("SOAPAction", soapaction);
if (self.xmlHttp.async) {
self.xmlHttp.onreadystatechange = function () {
if ((self.xmlHttp.readyState == 4) && (self.xmlHttp.status === 200)) {
self.onSuccess();
}
}
}
try {
self.xmlHttp.send(sr);
if (!self.xmlHttp.async) {
self.onSuccess();
}
} catch (ex) {
return ex;
}
}
SOAPClient.prototype.onSuccess = function () {
var self = this;
if ((self.xmlHttp.readyState == 4) && (self.xmlHttp.status === 200)) {
var o = null;
var responseText = self.xmlHttp.response;
}
}
return SOAPClient;
}());
modified 9-Oct-14 8:03am.
|
|
|
|
|
|
 |
struggling to figure out this program. beginner javascript programmer.
My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have).
Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program.
Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt().
Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit".
Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.
|
|
|
|
 |
Post only once please!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
 |
struggling to figure out this program. beginner javascript programmer.
My task is to write a program that does this: Stores the 50 states' names and capitals in two arrays (which I have).
Uses the window.prompt() method to display a state name, asks the user to enter the matching capital name, and tells the user that entering "exit" will stop the program.
Checks the user input and use the window.prompt() method to tell the user if the answer is correct or not. At the same time, the window.prompt() method displays the next state name, and asks the user to enter the next matching capital name. Please note that giving the user feedback and prompting the user to try the next are done with the same window.prompt().
Uses a loop to go through all 50 states until all 50 states have been displayed or the user enters "exit".
Any guidance would be much appreciated. Even just getting pointed in the right direction. I've read through many tutorials and just can't seem to get it. Thank you.
|
|
|
|
 |
Member 11116351 wrote: My task So start do it! Do not wait for us to do it for you! Thing are work a bit differently. YOU came with some (probably imperfect) solution and WE help you make it work...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
 |
Please do not post same question multiple times
|
|
|
|
 |
I tried the ckEditor forum but I was listed as a spammer and denied a post, until they resolve it.
Any body here know much about ckEditor Custom Plugins, and the element ID system?
[SOLVED]
Well the ckEditor forum was no help either. But I figured it out the next day.
modified 26-Sep-14 17:53pm.
|
|
|
|
 |
Hi,
I am gonna start a new web application which gives more importance to client side rather than server side. So we have so many technologies to achieve the client side scripting. eg :- JQuery,JavaScript,Angular JS. Among these which one should i use for my project?
Thanks In Advance
Sibeesh
|
|
|
|
 |
you can start with jQuery.
Vindhyachal Kumar
|
|
|
|
 |
Ok thanks for your reply.
|
|
|
|
 |
0) Forget Javascript.
1) Go with jQuery which is better than Javascript.
2) If you don't believe, do Google search for "Javascript vs jQuery"
3) AngularJs is a javascript library like jQuery but it's also framework. Some people use Angular to create SPA.
Here a CP article. 10 Reasons Web Developers Should Learn Angular[^]
and one more post. 10 Reasons Why You Should Use AngularJS[^]
If you want to perform just client side operations, go with jQuery which is more than enough. And it'd be better to learn jQuery before start learning other javascript libraries like AngularJs, KnockOutJs, etc.,
|
|
|
|
 |
thatraja wrote: Go with jQuery which is better than Javascript. jQuery IS javascript.
But yes, it is an easier way to use JavaScript.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
 |
Thank you Those links are useful
|
|
|
|
 |
Advice like this will get me very confusing. First, JavaScript is a language. Second jQuery and AngularJS are libraries developed using JavaScript.
|
|
|
|
 |
Agree with you. I just suggested OP to go with jQuery instead of javascript. Still there're many people fighting with old javascript code. Hereafter I'll add more details to avoid things like this. Thank you.
|
|
|
|
 |
I suggest at least using the jQuery library but of course you'll want to design out your app first and make sure just the jQuery library can handle it properly.
For example, if you'll have grids then you'll likely want a separate library like jqGrid or something.
The point is your requirements and your current experience combined with your ability to learn new libraries should drive what you end up using.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
I know JQuery, but i dont have much experience in Angular JS. And i can learn new technologies in a faster way. i love to learn those . Thanks a lot for your reply.
|
|
|
|
|
 |
So you master all this client side scripting
|
|
|
|
|
|
 |
I have been using AngularJS for about a month and have put it into a project and i really like it. AngularJS is written using javascript so javascript is something you SHOULD know. The nice thing about AngularJS is that you can incorporate javascript and jQuery (as long as you have a reference to it). When in doubt i use javascript over Jquery. Sure Jquery is easier to use but native javascript is much faster.
|
|
|
|
 |
Yeah you are right . Native javascript is much faster than jquery. Thank you
Please up vote if it helped you
Thanks And Regards
Sibeesh
|
|
|
|
 |
Hello there,
I want to have a function that turns this :
http://examplesite.com/folders/images/myphoto.jpg
to this :
http:\/\/examplesite.com\/folders\/images\/myphoto.jpg
Can any of you help me with that? I'm not that good at JS but I need this : /
Thanks.
|
|
|
|
 |
If all that you want is to replace a '/' with '\/' then I would recommend you look into the String.replace method you get with javascript.
function repl(url) {
return url.replace('/', '\/');
}
But since you mentioned you were trying to turn a URL into JSON I am thinking there is more to what you are asking. In which case I would recommend the following:
http://james.padolsey.com/javascript/parsing-urls-with-the-dom/[^]
|
|
|
|
|
 |
var httpAddress = 'http://examplesite.com/folders/images/myphoto.jpg',
charToRemp = '/',
rempCharWith = '\\/';
function regexp_changeCharsTo(charIn, from, to) {
var regExpFrom = RegExp(from, 'g');
return charIn.replace(regExpFrom, to);
}
function arrMap_changeCharsTo(charIn, from, to) {
return charIn
.split('')
.map(function (chr) {
if (chr === from) {
return to;
}
return chr;
})
.join('');
}
function forIn_changeCharsTo(charIn, from, to) {
var fnString = '';
for (var cr in charIn) {
if (charIn[cr] === from) {
fnString += to;
} else {
fnString += charIn[cr];
}
}
return fnString;
}
var regexp_test = regexp_changeCharsTo(httpAddress, charToRemp, rempCharWith);
var arrMap_test = arrMap_changeCharsTo(httpAddress, charToRemp, rempCharWith);
var forIn_test = forIn_changeCharsTo(httpAddress, charToRemp, rempCharWith);
|
|
|
|
 |
I have a form containing data and a file input fields,
I want to submit and validate this form using jquery and ajax through one script.
Below is my form:
<form id="datas" method="post" enctype="multipart/form-data">
<input type="text" name="firstName" value="" />
<input name="pic" type="file" />
<button>Submit</button>
</form>
Now I have this code to validate the data
$('#datas').validate({
rules: {
firstName:{
required: true,
minlength: 2,
maxlength: 100
}
},
messages: {
firstName: {
required: "Please Enter first name",
minlength: jQuery.format("Enter at least {0} characters"),
maxlength: jQuery.format("Enter atmost {0} characters"),
}
}
});
Then I have a seperate code that could submit the form
$("#datas").submit(function(){
var formData = new FormData($(this)[0]);
$.ajax({
url: sucess.php,
type: 'POST',
data: formData,
async: false,
success: function (data) {
alert(data)
},
cache: false,
contentType: false,
processData: false
});
});
**QUESTION:**
Please how can I combine these two scripts to validate the file and data fields and also submit to the success page.
|
|
|
|
 |
Since you are using the jQuery validation plugin why not read and follow their documentation where it appears they have some answers to questions similar.
http://jqueryvalidation.org/validate[^]
|
|
|
|
 |
Using above code are getting any error?
|
|
|
|
 |
I just happen to be writing this at the moment, you can use it as a template or to simply get some ideas
.onClientClick = load_template; return false;
function load_template() {
var
txtFocus,
txtError,
m_secureToken,
m_template,
m_filePath;
var vFlag = true;
txtFocus = $('[id*="_txt_Focus_Field"]').val();
txtError = $('[id*="_txt_Error_Field"]').val();
m_secureToken = $('[id*="_txt_Secure_Token_Field"]').val();
m_template = $('[id*="_ddl_CE_FI_Template_Field"] option:selected').text();
m_filePath = $('[id*="_ddl_CE_FI_Template_Field"]').val();
if (m_filePath === '--') {
$('[id*="_ddl_CE_FI_Template_Field"]').css('background-color', txtError);
$('[id*="_img_CE_FI_Template_Error"]').css('display', 'inline-block');
vFlag = false;
}
else {
$('[id*="_ddl_CE_FI_Template_Field"]').css('background-color', txtFocus);
$('[id*="_img_CE_FI_Template_Error"]').css('display', 'none');
}
if (true === vFlag) {
var send_Data =
"{" +
"\"p_secureToken\" : \"" + m_secureToken + "\", " +
"\"p_template\" : \"" + escape(m_template) + "\", " +
"\"p_filePath\" : \"" + escape(m_filePath) + "\" " +
"}";
alert(send_Data);
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "broadcastEditor.asmx/preview_Template",
data: send_Data,
dataType: "json",
error: function (xhr, status, error) {
exitCode = 2;
$('[id*="_updateProgress_Unified"]').fadeOut('fast', function () {
alert(xhr.responseText);
});
},
success: function (responseText) {
var objB = jQuery.parseJSON(responseText.d);
exitCode = objB.exitCode;
var p_Stream = unescape(objB.p_Stream.replace(/\+/g, " "));
$('[id*="_panel_CE_Container_XHTML"]').append(p_Stream);
$('[id*="_updateProgress_Unified"]').fadeOut('fast');
$('[id*="_panel_CE_Container_XHTML"]').fadeIn('normal');
}
});
}
}
|
|
|
|
 |
Can you take a look at this http://imgur.com/JdKLgkR,gbRUpjS,P9dV4Za#0
Now,how to write a script from the above example?
And please don't mention google CSE,Chrome personal-blocklist,I have already tried them.
Thank you
modified 30-Aug-14 9:03am.
|
|
|
|
 |
If you are asking how to hack people's systems you will get no assistance on this site. If you have a proper programming question, then please edit your post above and provide the details.
|
|
|
|
 |
I want to exclude torrent sites from Google,cause family members(kids) trying to find torrent sites.I got a warning letter from ISP.
|
|
|
|
 |
Rather than trying to modify their search results, why not try changing the settings on the router to restrict their access? Turn off UPnP and block all outbound ports except 21 (FTP), 80 (HTTP) and 443 (HTTPS).
If it still doesn't work, take their computers away until they learn to follow your rules.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Also have a look at the filtering the search results through Google options settings[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
 |
My requirement is, to focus fancy box pop up as soon as it pops out, and block other opened windows, till the user clicks on it.
Plz help...!!274
Thanks in advance.
|
|
|
|
 |
Where are you stuck? What does you code look like?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
A quick google search for their site then shows there is a modal setting. http://fancybox.net/api[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
|