Author |
Topic |
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 18 November 2003 : 20:12:50
|
for other browsers you could have it just popup either a javascript alert box showing the URL, or a javascript prompt box showing the URL (like the way that IPB does it):
go here: http://forums.invisionpower.com/index.php?showtopic=102233
and click on the Posted: link right before where it shows the date/time the message was posted. |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 November 2003 : 21:51:40
|
nice. |
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 18 November 2003 : 22:41:36
|
quote: Originally posted by RichardKinser
for other browsers you could have it just popup either a javascript alert box showing the URL, or a javascript prompt box showing the URL (like the way that IPB does it):
go here: http://forums.invisionpower.com/index.php?showtopic=102233
and click on the Posted: link right before where it shows the date/time the message was posted.
Done! |
- Kevin |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 19 November 2003 : 10:16:24
|
How come you are using the javascript prompt method in IE? I would only use that for non-IE users and use the other method Richard posted for IE users. |
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 19 November 2003 : 11:01:41
|
You're testing me, right dayve? I'll play with it later this afternoon to see if I can get it to work.
Patience. I'm a "code by error" coder. |
- Kevin |
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 19 November 2003 : 11:43:55
|
Okay so this afternoon came a little early. Would someone with a non-IE browser go here and click on the . I hope the alert box appears. |
- Kevin |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 19 November 2003 : 12:00:31
|
quote: Originally posted by kwhipp
Okay so this afternoon came a little early. Would someone with a non-IE browser go here and click on the . I hope the alert box appears.
works just fine in Netscape, Opera and Mozilla Firebird. I assumed you had a browser check in your code so figured it would be a simple modification. |
|
Edited by - dayve on 19 November 2003 12:01:06 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 19 November 2003 : 12:02:36
|
wooops, not in Opera. I can provide the browser check for that if you want. |
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 19 November 2003 : 12:25:27
|
dayve this may be a "simple modification" for some, this is my first time messing with javascript. Here is the script. Any suggestions for Opera?<script language="JavaScript" type="text/javascript">
function ReplyURL(cpyurl){
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
{
window.clipboardData.setData("Text", cpyurl);
}
else
{
txt=prompt("Copy the direct link to this reply below to store the link in your computer's clipboard.", cpyurl);
}
}
</script> |
- Kevin |
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 19 November 2003 : 17:14:33
|
Okay, I went ahead installed each of the following: Netscape 7.1, Opera 7.22, Mozilla 1.5 and Mozilla Firebird 0.7. It did work in all of them except Mozilla Firebird. I will go ahead and update the download to include the new script. |
- Kevin |
Edited by - kwhipp on 19 November 2003 17:43:40 |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 19 November 2003 : 20:40:26
|
quote: Originally posted by RichardKinser
quote: Originally posted by Ez4arab
Demo does not work
sure it does, just place your mouse pointer over the and then right click and choose "Copy Shortcut".
If it works like you say, how come I get this link: javascript:ReplyURL('http://whipp.us/topic.asp?TOPIC_ID=42#51'); (the whole line) if I right-click the ? Wasn't it supposed to only give me this: http://whipp.us/topic.asp?TOPIC_ID=42#51 if I say right-click and copy shortcut?
regards Macho |
Edited by - macho on 19 November 2003 20:42:17 |
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 19 November 2003 : 20:44:13
|
macho -
That was the first release. Now you just have to do is left-click the globe. |
- Kevin |
|
|
macho
Junior Member
Denmark
150 Posts |
Posted - 19 November 2003 : 20:51:01
|
quote: Originally posted by kwhipp
macho -
That was the first release. Now you just have to do is left-click the globe.
kwhipp - I must have been sleeping - sorry for my mistake. When will I ever learn to read through all the posts before making questions ?
regards Macho |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 26 November 2003 : 01:59:02
|
Your browser check still doesn't seem to work right with Opera. Here is a javascript browser check I always use that works like a champ. Include this in your inc_header.asp
function lib_bwcheck(){
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.opera6=this.agent.indexOf("Opera 6")>-1
this.opera7=this.agent.indexOf("Opera 7")>-1
this.opera = (this.opera5 || this.opera6 || this.opera7)
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.opera6 || this.opera7)
return this
}
var bw=new lib_bwcheck()
you can then change your code from this:
if ((navigator.appName == ""Microsoft Internet Explorer"") && (parseInt(navigator.appVersion) >= 4))" & vbNewLine & _
to this:
if (bw.ie && !bw.opera)" & vbNewLine & _
I just tested it and it works perfectly. The problem is that Opera will register as Microsoft Internet Explorer and the version will be greater than 4. You have to check the actual index of the agent for the word Opera which is what the browser check script I provided does. |
|
|
|
kwhipp
Junior Member
USA
407 Posts |
Posted - 26 November 2003 : 09:52:39
|
dayve, I've updated my page with your code suggestions. Before I update the ZIP file, would you check it out(http://whipp.us/topic.asp?TOPIC_ID=42).
Thanks. |
- Kevin |
|
|
Topic |
|