Results 1 to 5 of 5

Thread: HTML Codeing

  1. #1
    Join Date
    Nov 2005
    Location
    NSW, Australia
    Posts
    199

    HTML Codeing

    i have to put this in the head

    <style type="text/css">
    .a1{
    position:relative;
    font-family:Verdana;
    font-size:20px;
    color:#888888;
    }
    </style>

    <script language="JavaScript">

    /*****************************************
    * Lottery Picker (By Kurt at [email protected])
    * Featured on/available at http://www.dynamicdrive.com/
    * Modified by DynamicDrive.com for below config options
    * This notice must stay intact for use.
    *****************************************/

    var totalnumbers=4 //input total numbers to generate
    var lowerbound=1 //input lower bound for each random number
    var upperbound=80 //input upper bound for each random number

    function lotto(){
    B=' ';
    LottoNumbers=new Array();
    for (i = 1; i <= totalnumbers; i++)
    {
    RandomNumber = Math.round(lowerbound+Math.random()*(upperbound-lowerbound));
    for (j = 1; j <= totalnumbers; j)
    {
    if (RandomNumber == LottoNumbers[j])
    {
    RandomNumber=Math.round(lowerbound+Math.random()*( upperbound-lowerbound));
    j=0;
    }
    j++;
    }
    LottoNumbers[i]=RandomNumber;
    }
    LottoNumbers=LottoNumbers.toString();
    X=LottoNumbers.split(',');
    for (i=0; i < X.length; i++)
    {
    X[i]=X[i]+' ';
    if (X[i].length==2)
    X[i]='0'+X[i];
    }
    X=X.sort();
    for (i=0; i < X.length; i++)
    {
    OutPut=B+=X[i];
    }
    if (document.all)document.all.layer1.innerHTML=OutPut ;
    if (document.getElementById)document.getElementById(" layer1").innerHTML=OutPut;
    if (document.layers){
    document.layers.layer1.document.open();
    document.layers.layer1.document.write("<span style='position:absolute;top:0px;left:0px;font-family:Verdana;font-size:20px;color:#888888;text-align:center'> "+OutPut+"</span>");
    document.layers.layer1.document.close();
    }
    T=setTimeout('lotto()',20);
    //window.status=OutPut;
    }
    function StOp(){
    setTimeout('clearTimeout(T)',1000);
    }
    //-->
    </script>

    & put this in the body


    <table border='0' width=250 height=50>
    <tr valign='middle'>
    <td align='center'>
    <form name=form>
    <input type=button value='Lottery Number Picker' onClick="lotto();StOp()">
    </form>
    <span id=layer1 class=a1>Result</span>
    </td>
    </tr>
    </table>


    i done that & it doesn't work can some plase help me
    you're Lord & Master............. Foamy

  2. #2
    Join Date
    Feb 2004
    Location
    Western Sydney, Australia
    Posts
    11,112
    well, ive had a look, and so has my father (internet projects manager at Rural press limited - so he knows what he is doing) and as far as we can work out in about 5 min of looking at your code is that you havent given any values to the javascript.. though to be 100% sure we would need to have a real look at your codes...
    Last edited by whiteballz; 02-07-2006 at 02:42 AM.
    Weekly Quote -

    Dick

  3. #3
    Join Date
    Dec 2003
    Location
    nr Edinburgh, Whisky-soaked Scotland
    Posts
    27,775
    "doesnt work"

    First lesson on development debugging.

    Be specific

    Are you getting the button ?
    Does ut altar action when clicked, what about button down, button up ?
    ANY spinning nubmers shown ?
    Do they stop
    ARE there any numbers shown ?
    Are the numbers shwon outside of the range of lottery numbers ?

    You have to report AS MUCH AS possible on a fault when expectiing code debugging activities.

    It might NOT be the code --- what browser are you using ? What java machine ? What version ??

    HINT: Try it on FireFox, you'll find it will work THEN you ahve to decide which browser you want to support
    Last edited by Matra et Alpine; 02-07-2006 at 05:32 AM.
    "A woman without curves is like a road without bends, you might get to your destination quicker but the ride is boring as hell'

  4. #4
    Join Date
    Nov 2005
    Location
    NSW, Australia
    Posts
    199
    i got that from a website
    you're Lord & Master............. Foamy

  5. #5
    Join Date
    Dec 2003
    Location
    nr Edinburgh, Whisky-soaked Scotland
    Posts
    27,775
    Quote Originally Posted by Lord & Master
    i got that from a website
    We can see from teh comments it was freeware.
    But to help you DEBUG we need you to answer the questions.
    BTW, if you're struggling with it, I generally recommend first time web creators not to add things they don't understand. It usually comes back to bite - like now
    If you coudl answer the question please -- oh and check it on FF on tyrou comp too.
    "A woman without curves is like a road without bends, you might get to your destination quicker but the ride is boring as hell'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quicktime movies in HTML.. or whatever..
    By PsychoChimp22 in forum Miscellaneous
    Replies: 11
    Last Post: 10-21-2005, 02:32 AM
  2. HTML Help Wanted
    By PsychoChimp22 in forum Miscellaneous
    Replies: 13
    Last Post: 07-17-2005, 08:55 AM
  3. We need HTML code in the forum
    By Swissbeatz in forum Website discussion
    Replies: 11
    Last Post: 02-15-2004, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •