Qbasicnews.com

Full Version: Is this possible in HTML?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
When the mouse cursor moves over a link, how do I get that yellow box to pop with info about what's in the link? If I can't do that, then how can I change what the hyperlink status? Usually it'll say something like 'shortcut to qbprograms' but how could I make it says Qb Programs Page instead?

Second Question: When my mouse cursor moves over a link, how to a make it flash different colors?

Can you do this in html, and if so how? Thanks for any replies!!!
When the mouse cursor moves over a link, how do I get that yellow box to pop with info about what's in the link?
Use the "TITLE" element-- like this:
<A HREF="#" TITLE="this">asdads</A>
or
<IMG SRC="#" TITLE="this">


If I can't do that, then how can I change what the hyperlink status?
javascript ONLY.
<A HREF="#" onMouseOver="window.status = 'qb progrs page'">abc</A>
like that I think.


Second Question: When my mouse cursor moves over a link, how to a make it flash different colors?
CSS--
<STYLE>
A {
COLOR: #000000;
}
A:HOVER {
COLOR: #666666;
}
</STYLE>
There's also A:LINK, :VISITED, :ACTIVE
What ever you do, don't use window.status. It's the most annoying javascript after popups: I like to see when my clicking will take me.
Oracle: You use Firefox, right? Turn the permission to change the status bar off Wink
Thanks Potato! Alink will do.

One more question I forgot..

Is there a simple code for saying "This number of visitors have viewed this site since date" in html? Thanks again.
No. You have to use Java, PHP or similar languages to do that.
Sounds good...how do I do it in PHP? :lol:
I use the following functions for HarSoft:
[syntax="PHP"] function getHitCounterStatus ()
{
$hitc = fopen("data/hitcount.dat", "r");
$hits = readLine($hitc, 20);
settype($hits, integer);
settype($hits, string);
fclose($hitc);

$formatteddials = "";
// now convert to image format
for ($temporary=0;$temporary<strlen($hits);$temporary++)
{
$formatteddials = $formatteddials . "<IMG SRC='images/dials/" . substr($hits, $temporary, 1) . ".gif' WIDTH=24 HEIGTH=32>";
}
$formatteddials = $formatteddials . "<BR>\n";

return $formatteddials;
}

function setHitCounterStatus ()
{
$hitc = fopen("data/hitcount.dat", "r+");
$hits = readLine($hitc, 20);
fseek($hitc, 0, SEEK_SET);
fputs($hitc, (++$hits));
fclose($hitc);
/*$hitc = fopen("data/hitcount.dat", "w");
fputs($hitc, $hits);
fclose($hitc);*/
}[/syntax]

What it does is, it opens from a file "data/hitcount.dat", reads a numerical string, increases it by one, and writes this number back in the file (< setHitCounterStatus). getHitCounterStatus reads the number from the file, and converts it to an image sequence (supposed you have the images from "/images/dials/0.gif" up to and including "/images/dials/9.gif").

Change it as you wish Wink
Cheers dude Smile
Oh sorry, I forgot my functions use my own other function readLine. Here it is:

[syntax="PHP"] function readLine ($fhandle, $maxchars)
{
$buffer = fgets($fhandle, $maxchars);
$storage = "";

// trim all \n, \r or \0 characters
for ($i=0;$i<strlen($buffer);$i++)
{
$z = substr($buffer, $i, 1);
if (($z != "\n") && ($z != "\r") && ($z != "\0"))
$storage = $storage . $z;
}

// trim all spaces at the end
for ($i=strlen($storage)-1;$i>=0;$i--)
{
if (substr($storage, strlen($storage) - 1, 1) == " ")
$storage = substr($storage, 0, strlen($storage) - 1);
else
break;
}

// trim all spaces at the beginning
$storlen = strlen($storage);
for ($i=0;$i<$storlen;$i++)
{
if (substr($storage, 0, 1) == " ")
$storage = substr($storage, 1, strlen($storage) - 1);
else
break;
}
return $storage;
}[/syntax]

Have fun! Big Grin

*sleep*
Pages: 1 2 3