Bobby500 wrote:
Hey, anyone the Javascript code to make a webpage change, depending on the link used to get into it? And change the page url? I doubt you can do that but still, I am asking. Also, what about those tool bars that change the content on the current page?
1.Don't understand.2.Kinda. Thats just either renaming files so you end up with this: www.yoursitenamegoeshere.com(or whtever extension you bought on your domain name)/name of other page.html(depending on you, you could make it with a bunch of extensions.) 3.That is done with javascript, and can make websites load very,very slow if the content is big enough. Much easier to do with multiple pages.
Offline
Well can you tell me how to do number three anyways?
Offline
Another question.
First off, how can I change a variable by one when a page loads, and then display that number in a text format? Like a counter.
Also, can I make a variable change to a random number between say 1 and 100 when someone loads the page and then have some content appear because of that. Like a random fact or something?
Here is my site that I am working on. www.crimsonking.t35.com
Last edited by Bobby500 (2008-10-11 20:22:51)
Offline
Bobby500 wrote:
Another question.
First off, how can I change a variable by one when a page loads, and then display that number in a text format? Like a counter.
Also, can I make a variable change to a random number between say 1 and 100 when someone loads the page and then have some content appear because of that. Like a random fact or something?
Here is my site that I am working on. www.crimsonking.t35.com
If you're trying to make a counter on your website, it won't work because Javascript is not Server Side. So when the page loads the variable will display 1 even if you show the page five hundred thousand million quadrillion gazillion times.
A random fact:
var randomNumber = Math.floor(Math.random()*101) */ but you can change the 101 to something else. For 10 facts, change it to 11, 7 to 8, etc. /* if (randomNumber==1) { document.write("blah") } if (randomNumber==2) { document.write("blahblah") } etc, etc, until you have the desired number of facts.
Oh, and you can use PHP with T35.
You'll also find life much easier if you use the include() function I mentioned earlier.
Last edited by coolstuff (2008-10-13 17:12:38)
Offline
Okay, then how do I make a counter?
Offline
Anyone? Any ideas for a rating system either?
Offline
keroro645 wrote:
Is html free?
Whats CSS?
you don't download HTML *OR* CSS
Offline
Here's a cool program for all web programming enthusiasts.
http://www.apachefriends.org/en/xampp.html
The program is called xampp. It allows you to host your own web server including mysql.
Once you set it up you can let other people access your web pages by typing out your ip address.
Offline
Offline
Add ASP. It's server-side javascript. I know w3schools has something for it.
Offline
Bobby500 wrote:
Well can you tell me how to do number three anyways?
Look up Ajax.
Offline
Add CGI too. Also on w3schools, And its what was used before ASP-ASP.ET-PHP where used. You basically get any programming language, and make a file that prints html and a declaration of its content, and you can do cool stuff with it.
Offline
This is nothing got to do with scratch. I am good at html my self, but this is a spam...
Offline
dav09 wrote:
This is nothing got to do with scratch. I am good at html my self, but this is a spam...
![]()
A spam that has been left open since 2008... I would say has redeemed itself as not-spam.
Offline
Yeah but most topics are closed, like we cant leave this happen again?
Offline
Look at this CSS file I made! You are free to use.
Copy code into http://htmledit.squarefree.com
<style>
.menu{
position:relative
width:130;background-image:url(http://xtremecarpetcleaning.net/Media/Buttons/button%20background.bmp);
opacity:0.8;filter:alpha(opacity=80)
text-shadow: white 1px 1px 2px;
padding:4; padding-left:10;padding-right:10;
-moz-border-radius: 1em 4em 1em 4em;
border-radius: 1em 4em 1em 4em;text-align:center;display: inline;
-webkit-box-shadow:0px 0px 10px black;
-moz-box-shadow: 0px 0px 10px black;
box-shadow:0px 0px 10px black;
font-family:calibri;
}
a { text-decoration:none; font-size:14; color:#222;}
body {font-family:verdana ,sans-serif; background-image:url(http://profilerehab.com/myspace/images/small/black_stripes_design_10.jpg); color:white; font-size:13;
}
a:hover {font-size:16; color:#555;}
</style>
<div style="background-color:#333; height:60; padding:30; margin:100; -moz-border-radius: 4em 1em 4em 1em;
border-radius: 1em 4em 1em 4em;
-webkit-box-shadow:0px 0px 10px black;
-moz-box-shadow: 0px 0px 10px black;
box-shadow:0px 0px 10px black;
"><a href=""><div class="menu">Home</div></a>
<!-- Start menu -->
<a href=""><div class="menu" style="margin-left:-15px;">About</div></a>
<a href=""><div class="menu" style="margin-left:-15px;">Links</div></a>
<a href=""><div class="menu" style="margin-left:-15px;">Gallery</div></a>
<a href=""><div class="menu" style="margin-left:-15px;">Index</div></a>
<!-- End menu -->
<br>
<br><div style="background-color:#666; padding:20px;-moz-border-radius: 1em 4em 1em 4em;
border-radius: 1em 4em 1em 4em; color: orange;
text-shadow: 0px -1px 0px #999;
-webkit-box-shadow:0px 0px 10px black;
-moz-box-shadow: 0px 0px 10px black;
box-shadow:0px 0px 10px black;"><h3>Content</h3>Here is the content that will be displayed in the page. It can be anything, varying from just text to games and videos. </div><p align=center>Copyright © Company 2011- All rights reserved.</p>
What do you think?
Last edited by Thenuclearduck (2011-08-04 09:56:39)
Offline
coolstuff wrote:
Bobby500 wrote:
Anyone? Any ideas for a rating system either?
For a counter or a rating system, PHP is your friend. I'm not good at PHP so I wouldn't quite know, but I'm sure you can find a tutorial using Google.
You can Make a counter in javascript... Here's the code:
<script type="text/javascript">
var clicks = 0;
function linkClick(){
document.getElementById('clicked').value = ++clicks;
}
</script><a href="#" onclick="linkClick()">Click</a>
<p><input id="clicked" size="2" ;="" value="0" readonly> people have clicked</p>
Offline