Be a Supporter!

Like my html script?

  • 728 Views
  • 5 Replies
New Topic Respond to this Topic
QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Like my html script? 2001-11-02 15:21:26 Reply

I just finished a html script that helps for websites in topsite list. You know how sites have pop-ups that say "please vote for us in our topsite" that have a ok and cancel button? WELL.... I have made this html script so that if they click cancel they still have to vote! Well heres the script. You just have to do minor adjustments to the window.open script area.

<script><!--

var ok;
ok = confirm("Please Be Kind And Vote For Us In Our Topsite(s)");
if(ok == "1")
{
window.open("URL Here","Vote1",'toolbar=0,location=0,directories=0,status=minimized,menubar= 0,scrollbars=1,resizable=0,width=1000,height=800');
}
if(ok == "0")
{
alert("I'll say it again. YOU WILL VOTE FOR US!")
}
window.open("URL Here","Vote1",'toolbar=0,location=0,directories=0,status=minimized,menubar= 0,scrollbars=1,resizable=0,width=1000,height=800');
// -->
</script>

QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Like my html script? 2001-11-03 13:13:21 Reply

Heres some more scripts:
<script LANGUAGE="JavaScript">
<!-- Hide from old browsers

// All you have to do is put another text in the variable message.
// Don't forget to break all lines with a ^
// When you do not place a ^ at the end of all the message, the
// message will not repeat

message = "Message Here^" +
"Message Here^" +
"<essage Here^" +
scrollSpeed = 30
lineDelay = 1500

// Do not change the text below //

txt = ""

function scrollText(pos) {
if (message.charAt(pos) != '^') {
txt = txt + message.charAt(pos)
status = txt
pauze = scrollSpeed
}
else {
pauze = lineDelay
txt = ""
if (pos == message.length-1) pos = -1
}
pos++
setTimeout("scrollText('"+pos+"')",pauze)
}

// Unhide -->
scrollText(0)
</script>

QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Like my html script? 2001-11-03 13:17:03 Reply

Heres A right click gaurd:
<script language=JavaScript>

var message="That Function Has Been Disabled.";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>

QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Like my html script? 2001-11-03 13:18:43 Reply

Heres a color scroll bar:

<style type="text/css">
BODY {scrollbar-face-color: black; scrollbar-shadow-color: black; scrollbar-highlight-color: black; scrollbar-3dlight-color: sliver; scrollbar-darkshadow-color: silver; scrollbar-track-color: #000000; scrollbar-arrow-color: teal;}
</style>

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to Like my html script? 2001-11-03 21:54:48 Reply

At 11/2/01 03:21 PM, Ghost-Puppet wrote: I just finished a html script that helps for websites in topsite list. You know how sites have pop-ups that say "please vote for us in our topsite" that have a ok and cancel button? WELL.... I have made this html script so that if they click cancel they still have to vote! Well heres the script. You just have to do minor adjustments to the window.open script area.

First of all, this kind of thing really pisses me off. Not only does it perform something I don't want it to do (i.e. open a window I haven't opted to open), it alerts me to the fact that I'm doing it regardless of what I click. Not only that, you're opening a window with a screen resolution greater than I have - if I didn't know about Alt And F4 to close a window, I'd be even more pissed.

However, since it works, let me point out some bad programming practices....

First of all, confirm() works on boolean true/false (1/0) values... so you're assigning a value to a variable where you really don't need to.

Secondly, you're opening a window, but you're making the same call to the values you've sent to the window twice - you'd be better off doing it once.

<SCRIPT LANGUAGE="JavaScript">
<!--

function win_to_open() {
window.open("URL Here","Vote1",'toolbar=0,location=0,directories=0,status=minimized,menubar= 0,scrollbars=1,resizable=0,width=1000,height=800');
}

if (!confirm("Please Be Kind And Vote For Us In Our Topsite(s)") {
alert("I'll say it again. YOU WILL VOTE FOR US!");
win_to_open();
} else {
win_to_open();
}

//-->
</SCRIPT>

Finally, this isn't an html script. It's JavaScript. And I don't think I'll visit any site you publish on the web if I know something like this is going to be on it.

QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Like my html script? 2001-11-05 23:15:11 Reply

thanks for pointing that out but i would probably do that to strawberry clock if he came across my site. hehehe, other than that i have had that script for a while.