Saturday 10 August 2013

Fllicker like title edit using java

// siddhu vydyabhushana // 25 comments
Flicker like title edit using java, jquery, jsp, is quite little bit confusing so i am interested to teach you something which i know, i hope you like it.same post you can find it in 9lessons in php













                     Download: click here
java script code:
$(function() 
{

$("h4").click(function() 
{
var titleid = $(this).attr("id");
var sid=titleid.split("title");
var id=sid[1];
var dataString = 'id='+ id ;
var parent = $(this).parent();
$(this).hide();
$("#formbox"+id).show();
return false;
});
 
$(".save").click(function() 
{
var A=$(this).parent().parent();
var X=A.attr('id');
var d=X.split("formbox");
var id=d[1];
var Z=$("#"+X+" input.content").val();
var dataString = 'id='+ id +'&title='+Z ;
$.ajax({
type: "POST",
url: "imageajax.jsp",
data: dataString,
cache: false,
success: function(data)
{
A.hide(); 
$("#title"+id).html(Z); 
$("#title"+id).show(); 
}
});
return false;
});
$(".cancel").click(function() 
{
var A=$(this).parent().parent();
var X= A.attr("id");
var d=X.split("formbox");
var id=d[1];
var parent = $(this).parent();
$("#title"+id).show();
A.hide();
return false;
}); 
});
css code:
#container
{
margin:0 auto;
width:900px;
font-family:Arial, Helvetica, sans-serif;

}
td
{
width:100px;
}
h4
{
margin:0px;
padding:0px;
}
h4:hover
{
background-color:#ffffcc;
}
.save
{
background-color:#cc0000;
color:#fff;
padding:4px;
font-size:11px;
border:solid 1px #cc0000;
text-weight:bold;
-moz-border-radius:5px;-webkit-border-radius:5px;
}
.cancel
{
background-color:#dedede;
color:#333;
padding:4px;
font-size:11px;
border:solid 1px #dedede;
-moz-border-radius:5px;-webkit-border-radius:5px;
}
database images

 
imageajax.jsp:
<%@page import="java.sql.*"%>
<%
if(request.getParameter("id")!=null)
{
int id=Integer.parseInt(request.getParameter("id"));
String title=request.getParameter("title");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:flicker");
Statement stmt=con.createStatement();
stmt.executeQuery("update images set title='"+title+"' where id="+id+" ");
con.close();
}
catch(Exception e)
{
out.println(e);
}
}
%>
databse after update:


your likes, shares make me more happy
 

25 comments:

  1. This is a nice tip, and however I like your articles, thanks for give sharing this to all together.
    Regards - Blot Tutorial Supporter

    ReplyDelete
  2. We are offering website service or website design for your company website......

    App Buzz

    ReplyDelete
  3. Nice list of ideas that can help to improve our website designing, when i designing website I will remember these points and make some good designing.service web design

    ReplyDelete
  4. Thanks for sharing this amazing article. I like it very much. Keep posting
    Jai Balaji movers and packers are No. 1 movers and packers in Thane. From packing to unpacking, loading to unloading, home shifting to corporate shifting, Jai Balaji Movers and packers Thane is the one stop shop for all.
    Packers and Movers in thane
    Packers and Movers in mumbai
    Packers and Movers in navi mumbai

    ReplyDelete
  5. Thanks for sharing this amazing article. Keep posting
    Kamal Cargo packers and movers are one of the top service providers with specialization in relocation services. Understanding the needs and requirement of clients, we provide best services at very affordable cost and we prioritize our customer need and serve one by one, best in field of packers and movers.
    Packers and Movers in thane
    Packers and Movers in Mumbai
    Packers and Movers in Mulund

    ReplyDelete
  6. Jai Balaji Packers and Movers are the best packers and movers in Thane. For services like packing and moving, warehousing services, loading and unloading and car carrier services choose Jai Balaji packers and movers Thane.

    ReplyDelete
  7. Thanks for sharing this amazing article. Keep posting
    Packing and moving is a hectic task to do however Kamal Cargo Movers and packers in Thane make it simple for you. Kamal Cargo packers and movers are one of the best specialist co-ops with specialization in relocation services.

    ReplyDelete
  8. A wanderer journaling her travel stories all while journeying and eating her way through the world with her one and only. Aditi is a Dubai based Indian travel blogger whose work and life hasn’t stopped her from aiming to check the entire world off her bucket list. Her travel stories are based around experiencing the culture of a place while highlighting their food and as much as possible jet-setting off to off-beat and usual destinations around the globe with her globetrotter husband . https://bohemianontherun.com

    ReplyDelete
  9. Wonderful article. Thanks for sharing. Keep posting
    Are you planning for the birthday photography for your kid in Delhi, NCR and Gurgaon? My Baby 247 has a professional photographer that create cherished memories photo for you. For more information Visit Us!
    http://www.mybaby247.com/” rel=”nofollow”>birthday-photo-shoot-mybaby247
    http://www.mybaby247.com/” rel=”nofollow”>new-born-photography-mybaby247
    http://www.mybaby247.com/” rel=”nofollow”>toddlers-photoshoot-new-delhi-gurgaon-noida-faridabad

    ReplyDelete

  10. The best five packers and movers Chandigarh you will get different movers and packers under which you can choose different options according to your budget and choice.
    The options we offers to add on tasks in the process are- cost estimation of movers in Chandigarh, relocation surveys, transporting , packing and unpacking entire things , loading and unloading.
    http://www.thebest5.in

    ReplyDelete
  11. This is a very nice blog. Keep Posting Thanks for sharing these with us. Are you planning for the Wedding photography for your Princess or Prince in Delhi, New Delhi, NCR and Gurgaon? Everyone is looking to capture wedding moments. Click here to find out the best Wedding photography NCR for your big day!

    ReplyDelete
  12. Excellent Post...I must thank you for this informative news....
    Packers and Movers Delhi

    ReplyDelete
  13. contact norton is made available around the clock and can Allow you to make the most within your antivirus Computer system program method. They are occasionally really effortlessly attained by dialing norton antivirus customer service number and may tutorial you download and generate Norton Antivirus, obtain its solution desired, get hold of or renew your assist, scan and get absent a myriad of security warnings, and maintenance troubles which may be hampering the efficiency with the Norton Antivirus application plan. check here should you have any problem dial norton server error lets you unravel your inquiries. Visit Here: https://www.ihelplinenumber.com/Norton-Antivirus-Customer-Support/

    ReplyDelete
  14. QuickBooks, acclaimed accounting Laptop program Laptop or computer application equipped by Intuit that makes as an alternative answerable for obligations and difficulties with Every single and every Among the many prospective potential buyers to mend solutions it in excess of a straightaway Basis. Quickbooks customer support phone number just isn't really something which regularly could make you depressing any time you seem pursuing the accounting Site trustworthiness in your organization. Visit Here: https://quickbookssupportphonenumbers.us/

    ReplyDelete
  15. There are many youtube videos everyone sees every time on youtube so we create a channel and upload videos on youtube next you interested to see our videos on Business Promotion which helps you to promote your business with us.

    ReplyDelete
  16. A Specific natural beauty cure on your nerve-racking lifestyle by your choice Heartily, a heat welcome to Rentadolls excellent national amount esthetic most lovely Female Banglore Escorts Services. Without a doubt, our Bangalore Call Girl, designs, volunteer beauty butterfly Woman angels are marvelous and they're elite to serve our VIPs, visitors, and shoppers. How would you select your dream angels?. These are stylish, special, very website well educated, effectively tamed, formed as well as the healthiest attractive Fantastically groomed Get in touch with Bangalore Call Girl. We respect your privateness. Which is us at most precedence. You'll be able to directly communicate with your Bangalore Escorts. Visit Here: https://tinyurl.com/ycpoapu3

    ReplyDelete
  17. Looking for QuickBooks Technical Support Phone Number. Contact with us at +1-888-323-1555, we giving technical support services at toll-free QuickBooks tech support number in the USA regarding your issue and any other problem.

    ReplyDelete
  18. Such a great post thanks for sharing this with us Really So Amazing information. 


    Packers and movers in Dwarka
    Movers and Packers in Dwarka

    ReplyDelete
  19. This is very much great and hopefully nice blog. Everybody can easily found her need to able information.

    Packers and Movers in Thane
    Packers and Movers Thane
    Movers and Packers in Thane
    Movers and Packers Thane

    ReplyDelete