 |
 |
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 16 hrs ago.
|
|
|
|
 |
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
|
|
|
|
 |
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
|
|
|
|
|
 |
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/[^]
|
|
|
|
|
 |
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.
|
|
|
|
 |
Have you written any code for that? if yes then pls share with us else first start doing it and then ask for help if u really got stucked.
|
|
|
|
 |
Why don't you share your code if you tried anything? Or search in Google.
|
|
|
|
 |
I am looking over some code that someone else wrote for three.js
The main.js file starts out with this.
var APP = {};
(function () {
"use strict";
/*global VT,THREE,Detector,requestAnimationFrame*/
/*jslint browser: true*/
/***************************************************************************
* Global Variables
*/
// three.js variables
var scene = null;
var renderer = null;
var camera = null;
var controls = null;
var mesh = null;
var clock = new THREE.Clock();
var domContainer = null;
var virtualTexture = null;
/***************************************************************************
* Initialiaze application
*/
function resize() {
renderer.setSize(window.innerWidth, window.innerHeight);
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
}
.
.
.
APP.load = function (geometry, config) {
// create virtual texture
geometry.computeTangents();
geometry.computeVertexNormals();
virtualTexture = new THREE.VirtualTexture(renderer.context, config);
var material = THREE.createVirtualTextureMaterial(virtualTexture);
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
THREE.duplicateGeometryForVirtualTexturing(geometry, virtualTexture);
};
}());
and the code ends like above.
I dont get this line (function () {
How does that work or even get called?
The code actually works and not seeing anything like this before
just made me curious.
Hope someone can shed some light on this.
Thanks,
Bob
|
|
|
|
 |
All of the code is encapsulated inside an anonymous function that starts with the (function () { line and ends with }());
The function is executed straight away - the () on the last line calls it with no arguments. The only variable that this script exposes is "APP", which is an object containing the "load" function (and anything else that was added in the ... part).
|
|
|
|
|
|
 |
Nice explanation
|
|
|
|
 |
(function () {
}());
equal with:
var fn = function(){
};
fn();
look at the following codes:
(function(words){alert(words);}('hello!'));
|
|
|
|
 |
It’s an Immediately-Invoked Function Expression, or shorter: IIFE. It executes immediately after it’s created.
This pattern is often used when trying to avoid polluting the global namespace, because all the variables used in the function are not visible outside its scope.
|
|
|
|
 |
Can someone please help me with this code by looking over it for something obvious? The problem seems to be that the embedded JavaScript code is not being executed and, therefore, the PHP code is also skipped. Both, the HTML and the PHP files are in the root directory.
html/js:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery AJAX test form</title>
<script src="js/jquery.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
-->
<div id="contacts">
<div class="row">
-->
<div class="col-sm-offset-3 col-sm-6">
<p> </p>
<p>Some header message here</p>
<p> </p>
<form name="contact" class="well" id="contact">
<legend>Contact Form</legend>
<div class="control-group">
<div class="controls">
<input type="text" class="form-control" placeholder="Name" id="name" />
<p class="help-block"></p>
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="email" class="form-control" placeholder="Email" id="email" required/>
</div>
</div>
<div class="control-group">
<div class="controls">
<textarea rows="10" cols="100" class="form-control" placeholder="Message" id="message" style="resize:none"></textarea>
</div>
</div>
<div id="success"> </div>
<button type="submit" class="btn btn-primary pull-right" id="submit">Send</button>
<button type="reset" class="btn btn-default pull-right" id="res">Reset</button>
<br />
</form>
</div>
</div>
</div>
</div>
<script>
$(function() {
$("button#submit").click(function(event){
event.preventDefault();
$.ajax({
type: "POST",
url: "process.php",
data: $('form.contact').serialize(),
success: function(){
alert("success");
},
error: function(){
alert("failure");
}
});
});
});
</script>
</body>
</html>
php:
<?php
if (isset($_POST['name'])) {
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['Email']);
$message= strip_tags($_POST['message']);
echo "Name =".$name."</br>";
echo "Email =".$email."</br>";
echo "Message =".$message."</br>";
echo "<span class=\"label label-info\" >your message has been submitted .. Thank you</span>";
}
?>
|
|
|
|
 |
RalfPeter wrote: $("button#submit").click(function(event){
Change your selector from...
$("button#submit").
to.
$("#submit").
|
|
|
|
 |
Nope. It now enters the ajax code, but does not access the php code. Thx for the tip.
|
|
|
|
 |
try debugging your error handler to see what is happening. I would change the error function to receive the three different parameters and then add a breakpoint on the error handler in whatever browser you are using.
error: function(xhr, status, error){
}
|
|
|
|
 |
Hi folks,
I just started working on a very interesting project as part of my university research for 3D visualization of earth's surface in 3D (not 3D modeling but real 3D!) using nVidia 3D vision in browser environment. I'm planning to use one of web-based javascript mapping platforms (like open layers or leafletjs) as a base and develop necessary modules for 3D visualization. I have all necessary data (2 image pairs for a test area created from satellite image and Digital Elevation Model) and looking for information on platform, modules and libraries you might know that can help me build this or even any already developed tool you know. I would also appreciate if you mention any document, resource or guide you can share or if you have any comment, advice or ideas.
In case you are interested in being part of this tiny but fun project, you can contact me on the following Email:
T E Z a-t A B 0 d-o-t O R G (without space! third character after at sign is "0" (zero) and not "O" (the letter))
PS: here is a demo of nVidia's tech on browser for those who have access to 3D glasses and graphics card (you should choose 3D vision tab in gallery and turn your 3D feature ON to see it):
http://photos.3dvisionlive.com/HiTechLegion/image/4d0191b7378501b5010c0000/
Cheers
|
|
|
|
 |
I already made a post at Superuser http://superuser.com/questions/800325/how-to-make-google-search-look-dumb[^]
I will summerize here:
[1] http://i.stack.imgur.com/ZN60B.jpg
My point is i do not want to see torrent sites in the search results,so if someone searches Google or any other search engine this phrase(-torrent-download-watch) should be automatically and invisibly added.
[2] http://i.stack.imgur.com/4mUSt.jpg
And one of the answers was this userscript written by krowe:
function GM_main () {
window.onload = function () {
var targ = window.location;
if(targ && targ.href && targ.href.match('https?:\/\/www.google.com/.+#q=.+') && targ.href.search("/+-torrent/+-watch/+-download")==-1) {
targ.href = targ.href +"+-torrent+-watch+-download";
}
};
}
function addJS_Node(text, s_URL, funcToRun, runOnLoad) {
var D=document, scriptNode = D.createElement('script');
if(runOnLoad) scriptNode.addEventListener("load", runOnLoad, false);
scriptNode.type = "text/javascript";
if(text) scriptNode.textContent = text;
if(s_URL) scriptNode.src = s_URL;
if(funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
var targ = D.getElementsByTagName('head')[0] || D.body || D.documentElement;
targ.appendChild(scriptNode);
}
addJS_Node (null, null, GM_main);
But the script is not working at all. I copied it to tampermonkey , tried it several times no luck.I need some help please.
I will be happy if this script can atleast work in YouTube,Bing and Yahoo.
Thank you in advance.
|
|
|
|
|
 |
My aim is to block torrent sites from google search results.I don't want others(family members) to notice the tampering.
|
|
|
|
 |
You can contact your ISP and ask them to block torrent sites.
|
|
|
|
 |
I am creating java web application using netbeans.
I want to insert Image in to my database (Mysql) , Please suggest me code for this page .
Thank you
Tushar
|
|
|
|
 |
I would suggest you search google for examples.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
I would recommend that you first use the Java[^] forum for this question. You will most likely have to use some form of BLOB.
|
|
|
|
 |
You can use java to serialize the image object and then save it to the database. This link should help
|
|
|
|
 |
Please first try search over internet, if you didn't find help then ask to community.
|
|
|
|
 |