Click here to Skip to main content
15,890,897 members
Home / Discussions / Java
   

Java

 
AnswerRe: Simple java programming Pin
toxcct15-Jan-09 4:29
toxcct15-Jan-09 4:29 
GeneralRe: Simple java programming Pin
Michael Monin15-Jan-09 10:11
Michael Monin15-Jan-09 10:11 
GeneralYou are pimping your article in the help section. Pin
Naruki9-Feb-09 15:30
Naruki9-Feb-09 15:30 
GeneralRe: You are pimping your article in the help section. Pin
Michael Monin13-Feb-09 7:17
Michael Monin13-Feb-09 7:17 
JokeWhen I think back to my USENET days... Pin
Naruki15-Feb-09 17:21
Naruki15-Feb-09 17:21 
QuestionNeed to add links to changing image within iframe, Is this possible? Any help greatly appreciated!! [modified] Pin
bluedog286814-Jan-09 6:04
bluedog286814-Jan-09 6:04 
Answer[Message Deleted] Pin
bluedog286814-Jan-09 8:36
bluedog286814-Jan-09 8:36 
QuestionI have problem with bookmark(Javascript) in opera.It works in other browser. Pin
bhatted13-Jan-09 14:32
bhatted13-Jan-09 14:32 
HI,


I am using Javascript for bookmark in my project.Here is the code


function prepBookmarkLink() {
if (window.sidebar && window.opera && window.print) {
var bkmkLink = document.getElementById('bookmarkLink');
// bkmkLink.rel = 'sidebar';
// bkmkLink.href = location.href;
// bkmkLink.title = document.title;
// bkmkLink.setAttribute('href',document.URL);
// bkmkLink.setAttribute('title',document.title);
// bkmkLink.setAttribute('rel','sidebar');
// bkmkLink.click();
}
}


function bookmark(){
var title = document.title;
var url= document.URL;
var ua=navigator.userAgent.toLowerCase();
var isKonq=(ua.indexOf('konqueror')!=-1);
var isSafari=(ua.indexOf('webkit')!=-1);
var isMac=(ua.indexOf('mac')!=-1);
var buttonStr=isMac?'Command/Cmd':'CTRL';


if(window.sidebar){

window.sidebar.addPanel(title,url,"");
}

else if(window.opera && window.print) {
prepBookmarkLink();

// (document.write('<a href ="javascript:bookmark()");">Add Bookmark</a>'));
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
// var a=document.createElement('a');
// a.href=location.href;



//
//
// a.rel='sidebar'; // this makes it work in Opera 7+
// a.click();
//
// a.title=document.title;
// return cont.appendChild(a);
// //
document.write('<a href = "'+url+'" title="'+title+'" rel="sidebar">Bookmark Site</a>');



alert('test');
}

else if(window.external && (!document.createTextNode ||
(typeof(window.external.AddFavorite)=='unknown'))) {

// IE4/Win generates an error when you
// execute "typeof(window.external.AddFavorite)"
// In IE7 the page must be from a web server, not directly from a local
// file system, otherwise, you will get a permission denied error.
window.external.AddFavorite(url, title); // IE/Win
} else if(isKonq) {
alert('You need to press CTRL + B to bookmark our site.');
} else if(window.opera) {
alert("dfsdf");
void(0); // do nothing here (Opera 7+)
//return true;
} else if(window.home || isSafari) { // Firefox, Netscape, Safari, iCab
alert('You need to press '+buttonStr+' + D to bookmark our site.');
} else if(!window.print || isMac) { // IE5/Mac and Safari 1.0
alert('You need to press Command/Cmd + D to bookmark our site.');
} else {
alert('In order to bookmark this site you need to do so manually '+
'through your browser.');
}
}
AnswerRe: I have problem with bookmark(Javascript) in opera.It works in other browser. Pin
toxcct15-Jan-09 4:24
toxcct15-Jan-09 4:24 
QuestionNeed help with parameterized class or method Pin
David Crow13-Jan-09 7:36
David Crow13-Jan-09 7:36 
AnswerRe: Need help with parameterized class or method Pin
toxcct15-Jan-09 4:28
toxcct15-Jan-09 4:28 
GeneralRe: Need help with parameterized class or method Pin
David Crow15-Jan-09 4:51
David Crow15-Jan-09 4:51 
GeneralRe: Need help with parameterized class or method Pin
toxcct15-Jan-09 4:55
toxcct15-Jan-09 4:55 
QuestionRe: Need help with parameterized class or method Pin
David Crow15-Jan-09 5:01
David Crow15-Jan-09 5:01 
AnswerRe: Need help with parameterized class or method Pin
toxcct15-Jan-09 5:04
toxcct15-Jan-09 5:04 
GeneralRe: Need help with parameterized class or method Pin
David Crow15-Jan-09 5:16
David Crow15-Jan-09 5:16 
GeneralRe: Need help with parameterized class or method [modified] Pin
Naruki9-Feb-09 15:18
Naruki9-Feb-09 15:18 
Questionneed source code for our project Pin
Lakshmi4108712-Jan-09 4:33
Lakshmi4108712-Jan-09 4:33 
QuestionHello World Java Program Pin
prithaa11-Jan-09 6:10
prithaa11-Jan-09 6:10 
AnswerRe: Hello World Java Program Pin
tamour12-Jan-09 0:49
tamour12-Jan-09 0:49 
GeneralRe: Hello World Java Program Pin
prithaa15-Jan-09 18:06
prithaa15-Jan-09 18:06 
GeneralThe best starting point tutorial... Pin
Naruki9-Feb-09 15:01
Naruki9-Feb-09 15:01 
QuestionAm i converting the code right ? Pin
tamour9-Jan-09 11:49
tamour9-Jan-09 11:49 
GeneralRe: Am i converting the code right ? Pin
itsmani27-Jan-09 22:13
itsmani27-Jan-09 22:13 
QuestionCannot access database Pin
tamour9-Jan-09 3:19
tamour9-Jan-09 3:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.