What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Javascript Help

Javascript Help
Author: Message:
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. Javascript Help
I have a site with a boomark link. IE does support bookmark, so displays the link "bookmark this page" text I told it to. But firefox leaves it blank.

I want a code that if viewed in firefox, make it not have a gap like at the moment, but instead display "Press Ctrl + D to bookmark this page" in firefox only. Is this possible??

Something like:
code:
<javascript>
if IE.browser
print: bookmark code here
else
print="Press Ctrl + D to bookmark this page"
</script>
or simalar??
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-04-2004 02:23 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: Javascript Help
http://www.macromedia.com/support/dreamweaver/how...wserinfo_how1.html
tells you how to show a different page depending on what browser the user is using im sure you can modify it to do what you want

This post was edited on 08-04-2004 at 06:17 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
08-04-2004 06:12 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Javascript Help
I can't seem to make it work :/ Any help??
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-04-2004 07:34 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: Javascript Help
code:
<html>
<HEAD>
<SCRIPT language="javascript">
<!--
function getversion(){
if(navigator.appName.indexOf("Netscape")>-1){
document.write("press ctrl+d to bookmark this page");
}
else if((navigator.appName.indexOf("Microsoft")>-1) || (navigator.appName.indexOf("MSIE")>-1)){
document.write("blah firefox owns IE");

}
else if(navigator.appName.indexOf("Opera")>-1){
document.write("if opera write something");
}
else{
document.write("if its anything else");
}

}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT language="javascript">
getversion();
</script>
</BODY>
</HTML>
here you go ive done it for you :) hope thats what you wanted 

This post was edited on 08-04-2004 at 08:56 AM by -dt-.
[Image: dt2.0v2.png]      Happy Birthday, WDZ
08-04-2004 08:53 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Javascript Help
code:
<html>
<HEAD>
<SCRIPT language="javascript">
<!--
function getversion(){
if(navigator.appName.indexOf("Netscape")>-1){
document.write("Press ctrl+d to bookmark this page");
}
else if((navigator.appName.indexOf("Microsoft")>-1) || (navigator.appName.indexOf("MSIE")>-1)){
document.write("<script language="JavaScript" type="text/javascript">
<!--
var version=parseInt(navigator.appVersion)
var isIE=navigator.appVersion.indexOf("MSIE")>0
var isIE4=isIE&&version>=4 
if (isIE4) { document.write('<a href="javascript:window.external.AddFavorite(document.location,document.title)">Bookmark This Site<\/a>');}
// -->
</script>");

}
else if(navigator.appName.indexOf("Opera")>-1){
document.write("Please feel free to bookmark this page");
}
else{
document.write("Please feel free to bookmark this page");
}

}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT language="javascript">
getversion();
</script>
</BODY>
</HTML>
It doesn't work??
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-04-2004 09:01 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: Javascript Help
=/ why are u trying to write javascript into the page?
anyway after i removed where u were trying to write the javascript into the page it worked
code:
<html>
<HEAD>
<SCRIPT language="javascript">
<!--
function getversion(){
if(navigator.appName.indexOf("Netscape")>-1){
document.write("Press ctrl+d to bookmark this page");
}
else if((navigator.appName.indexOf("Microsoft")>-1) || (navigator.appName.indexOf("MSIE")>-1)){

var version=parseInt(navigator.appVersion)
var isIE=navigator.appVersion.indexOf("MSIE")>0
var isIE4=isIE&&version>=4;
if (isIE4) {
document.write('<a href="javascript:window.external.AddFavorite(document.location,document.title)">Bookmark This Site<\/a>')
       }

}
else if(navigator.appName.indexOf("Opera")>-1){
document.write("Please feel free to bookmark this page");
}
else{
document.write("Please feel free to bookmark this page");
}

}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT language="javascript">
getversion();
</script>
</BODY>
</html>
[Image: dt2.0v2.png]      Happy Birthday, WDZ
08-04-2004 09:53 AM
Profile PM Web Find Quote Report
king_of_cool_kids
Full Member
***

Avatar
Im a Cat fan.

Posts: 264
– / Male / –
Joined: Dec 2003
O.P. RE: Javascript Help
Thanks. It works like a charm.
See this thread please:
http://shoutbox.menthix.net/showthread.php?action=lastpost&tid=29609

I am running:
Windows XP Pro
MSN messenger: 6.2.0137
MsgPlus!: 3.01.94
08-05-2004 01:28 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On