TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,019
  • Total Topics: 21,332
  • Online today: 1,232
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 463
  • Total: 463

Check For Javascript, Etc.?

Started by anunlike, August 31, 2006, 03:11:20 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

anunlike

I think something that would be pretty cool to have would be the ability for TP to check see if Javascript, etc. is enabled / installed in the browser.

Since certain SMF / TP functions use it, it'd be neat for it to automatically check, and if not enabled / installed, give a text message (or whatever) somewhere in a pretty obvious place stating so.

It's something that would be neat.

anunlike

I'm going to ask this at the SMF community forums and see what they say.

Jpg

#2
Actually I think someone came out with something like that...brb with a snippet.


Here ya go.

<SCRIPT LANGUAGE="JavaScript">


<!--Edited By Alan S--!>
<!-- Begin
var xy = navigator.appVersion;
xz = xy.substring(0,4);
document.write("<center><table border=1 cellpadding=2><tr><td>");

document.write("<center><table border=1 cellpadding=2><tr>");
document.write("<td>Browser: </td><td><center>");
document.write("<b>", navigator.appCodeName,"</td></tr>");
document.write("<tr><td>Version: </td><td><center>");
document.write("<b>",xz,"</td></tr>");
document.write("<tr><td>Platform: </td><td><center>");
document.write("<b>", navigator.platform,"</td></tr>");
document.write("<tr><td>Pages Viewed: </td><td><center>");
document.write("<b>", history.length," </td></tr>");
document.write("<tr><td>Java enabled: </td><td><center><b>");
if (navigator.javaEnabled()) document.write("Yes!</td></tr>");
else document.write("Nope!</td></tr>")
document.write("<tr><td>Screen Resolution: </td><td><center>");
document.write("<b>",screen.width," x ",screen.height,"</td></tr>");
document.write("</table></tr></td></table></center>");
// End -->
</script>


It shows their Screen resolution, if java is enabled, Pages viewed, their platform, what browser they are using, and version they are using..

Jpg

The section you would want for Javascript.


<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var xy = navigator.appVersion;
xz = xy.substring(0,4);
document.write("<center><table border=1 cellpadding=2><tr><td>");

document.write("<tr><td>Java enabled: </td><td><center><b>");
if (navigator.javaEnabled()) document.write("Yes!</td></tr>");
else document.write("Nope!</td></tr>")

// End -->
</script>


I haven't tested it so don't get mad at me if it doesn't work.

anunlike

Thanks.

I was just wanting to throw it out as a feature.

Jpg


eldacar

<noscript>You don't have javascript!</noscript>

akulion

correction eldÊÅ'ka

Quote

<noscript>Stop living in the cave ages and get a real browser that works</noscript>

lol

IchBin

lmao Aku! That is so true. But you have to admit, eldÊÅ'kaː is right!

anunlike

#9
Quote from: akulion on September 01, 2006, 03:44:34 AMcorrection eldÊÅ'ka
Quote

<noscript>Stop living in the cave ages and get a real browser that works</noscript>
lol

LMAO

But, some people may have the browser to support it, but they may have it turned off, have something that prevents it, etc. It'd be neat to have it built in, IMO.

For example, I've got the NoScript extension for FF and set to where I allow it on an indvidual basis. It's always cool to see the page telling me I have to allow it, so I don't have to remember.

This website is proudly hosted on Crocweb Cloud Website Hosting.