Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Converting bookmarklet to operate on site

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Converting bookmarklet to operate on site

    Hello,

    I'm an artist working on a web-based project, with below basic JAVA knowledge. I have permission to use this code in said project, but unfortunately the programmer who originally wrote it can't spare the time to adjust it for my specific needs. At the moment the code gets saved as a bookmarklet, then applies itself to your currently viewed webpage when the bookmarklet is clicked. I need to convert this code to be saved within a pages source code to take affect automatically, site wide, when the site is visited. Any help, or suggestions on where to find help solving this would be greatly appreciated. Thanks, Jonny.

    javascriptfunction(){fcb=function(d){ktndata=d;var p=document.getElementsByTagName('img');for(var i in p){p[i].width=p[i].width;p[i].height=p[i].height;p[i].src=d.items[Math.floor(Math.random()*(d.items.length))].media.m;}};if(typeof ktndata=='undefined'){var jp=document.createElement('script');jp.setAttribut e('type','text/javascript'); jp.setAttribute('src','http://api.flickr.com/services/feeds/photos_public.gne?tags=kitten&tagmode=any&format=j son&jsoncallback=fcb'); document.getElementsByTagName('head')[0].appendChild(jp);} else{fcb(ktndata);}})()


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,189
    Thanks
    49
    Thanked 2,172 Times in 2,145 Posts

    Default Re: Converting bookmarklet to operate on site

    Try asking on a javascript forum. This one is for java.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,267
    Thanks
    176
    Thanked 821 Times in 764 Posts
    Blog Entries
    5

    Default Re: Converting bookmarklet to operate on site

    Thread moved to Other Programming Languages

Similar Threads

  1. Could you recommend any site?
    By wholegrain in forum The Cafe
    Replies: 2
    Last Post: March 6th, 2012, 03:11 AM
  2. I've got a game .jar - how to put it on my site?
    By TrivialFate in forum Java Applets
    Replies: 7
    Last Post: September 8th, 2011, 07:18 AM
  3. Operate on list`s objects
    By MryJaho in forum Java Theory & Questions
    Replies: 5
    Last Post: February 24th, 2011, 04:44 AM
  4. Regarding an auction site
    By clipod in forum JavaServer Pages: JSP & JSTL
    Replies: 5
    Last Post: October 22nd, 2010, 11:23 AM
  5. Site to site communication (applet)
    By sanyi007 in forum Java Theory & Questions
    Replies: 0
    Last Post: May 16th, 2010, 07:19 AM

Tags for this Thread