download jquery-1.9.1.js file search for event.returnvalue(***.returnvalue) and replace with event.preventDefault(***.preventDefault) and save this js file and place in supporting file.
Wednesday, 20 November 2013
$ is not defined
$ is not defined while running jquery script code , replace header file with below links
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
it will work
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
it will work
Saturday, 16 November 2013
error adding setOnKeyListener in android
myEditText.setOnKeyListener(new OnKeyListener() {
public boolean onKey(View v, int keyCode, KeyEvent event) {
Above code in android gets compiling error because it uses View's V so
replace with below code
myEditText.setOnKeyListener(new View.OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) {
Wednesday, 13 November 2013
window.alert bold text
we cannot change inbuilt window.alert functionality but below code customizes window.alert for example we can get bold text etc.
copy paste the code in your notepad and save with .html and check.
<html>
<style type="text/css">
#modalContainer {
position:absolute;
width:100%;
height:100%;
top:0px;
left:0px;
z-index:10000;
}
#alertBox {
position:relative;
width:350px;
min-height:150px;
margin-top:0px;
border:1px solid LightGray;
background-repeat:no-repeat;
background-position:20px 30px;
}
#modalContainer > #alertBox {
position:fixed;
}
#alertBox p {
font:0.8em verdana,arial;
height:50px;
padding-left:5px;
}
#alertBox #closeBtn {
display:block;
position:relative;
left:125px;
top:30px;
margin:5px auto;
padding:5px 0 8 0;
border:1px solid blue;
width:70px;
font:bold 0.7em verdana,arial;
text-decoration:none;
text-align:center;
color:black;
}
</style>
<script language="javascript">
if(document.getElementById) {
window.alert = function(txt) {
createCustomAlert(txt);
}
}
function createCustomAlert(txt) {
d = document;
if(d.getElementById("modalContainer")) return;
mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
mObj.id = "modalContainer";
mObj.style.height = document.documentElement.scrollHeight + "px";
alertObj = mObj.appendChild(d.createElement("div"));
alertObj.id = "alertBox";
if(d.all && !window.opera) alertObj.style.top = document.documentElement.scrollTop + "px";
alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth)/2 + "px";
msg = alertObj.appendChild(d.createElement("p"));
msg.innerHTML = txt;
btn = alertObj.appendChild(d.createElement("a"));
btn.id = "closeBtn";
btn.appendChild(d.createTextNode("OK"));
btn.href = "#";
btn.onclick = function() { removeCustomAlert();return false; }
}
function removeCustomAlert() {
document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
}
</script>
<body>
<input type="button" value = "Test the alert" onclick="alert('<b>This</b> is a custom alert dialog that was created by over-riding the window.alert method.');" />
</body>
</html>
how to get google android developer account without credit card
Follow below steps for getting google android publisher account without credit card by using virtual credit card from entropay.
step 1)
log in to https://www.entropay.com/ and register
step 2)
wire transfer money from bank account to entropay virtual credit card
step3)
note the number generated virtual credit card and cvv number
step4)
login to ANDROID developer account and follow the steps and enter virtual credit card number for payment and your account is ready for submit android apps
Monday, 11 November 2013
how to show uiactionsheet from UIwindow in ios
Invoking UIActionSheet from UIWindow other than UIView by using below code in iPhone programming.
[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
Friday, 8 November 2013
html input file accept attribute
For Input file type opening window with particular file type using below code in html
for image files
Example:<input type="file" accept="image/jpeg,image/gif">
for pdf files
Example:<input type="file" accept="application/pdf">
for doc,docx,xls,xlsx
Example:<input type="file" accept=".doc/.docx/.xls/.xlsx">
these accept attributes work for all browsers.
for image files
Example:<input type="file" accept="image/jpeg,image/gif">
for pdf files
Example:<input type="file" accept="application/pdf">
for doc,docx,xls,xlsx
Example:<input type="file" accept=".doc/.docx/.xls/.xlsx">
these accept attributes work for all browsers.
Subscribe to:
Posts (Atom)