Alpha Video Training
Results 1 to 7 of 7

Thread: unsure of how to proceed...

  1. #1
    martin robert
    Guest

    Default unsure of how to proceed...

    hi all,

    firstly: this is my first attempt at making a db.

    ok, here's what i'd like to do:

    i read a book a few years ago, that was made up of 300 'maxims.'
    i'd like to randomly display them on my website.
    they're formatted like this: number, title, maxim.
    some of the maxims are quite long (up to around 350 words.)

    i'm thinking a db is the easiest way to achieve this, but i'm certainly open to suggestions. i'm unsure of how to put the large maxims into a db, though.

    i'd appreciate any suggestions you might have for me.

    cheers,

    marty

  2. #2
    Former Alpha Employee Edward Larrabee's Avatar
    Real Name
    Edward Larrabee
    Join Date
    Nov 2002
    Location
    New Hampshire
    Posts
    1,385

    Default RE: unsure of how to proceed...

    Martin,

    Alpha Five supports a field type named "Memo", which can store long text elements. This would be appropriate for your maxim field.

    Edward Larrabee
    Technical Documentation

  3. #3
    martin robert
    Guest

    Default RE: unsure of how to proceed...

    thanks for that one, i'll try it this afternoon....
    will post again soon to let you know how i went

    :)

    marty

  4. #4
    Member
    Real Name
    Marc King
    Join Date
    Dec 2002
    Location
    California
    Posts
    702

    Default RE: unsure of how to proceed...

    Hi Martin,

    If all you want to do is diplay a web page that randomly shows a different maxim with each visit.

    All you need is a simple Javascript that is freely avalilable at

    http://javascript.internet.com/messages/rqt-puns.html

    Complete with instructions. Just add your text maxims to the script and post. I have set this up for several companies that want a random quote to show on thier homepage. This works great and is free.

    Let me know if you need assistance.

    Marc
    www.kingsrealm.com

  5. #5
    VAR davej's Avatar
    Real Name
    Dave Jampole
    Join Date
    Apr 2000
    Location
    Haughton, LA ( just east of Shreveport, Louisiana)
    Posts
    2,524

    Default RE: unsure of how to proceed...

    Martin,

    Here is an option from the other angle - including the maxims in the web page. First, include this between the HEAD tags on your web page:





    NOTE: replace 'maxim #' with the actual text of your maxim. Leave the single and double quotes in the script. There is an offset between 'Maxims[#]' and what is between the double quote marks. DON'T change it!

    Place this script in the BODY of your page where you want the maxims to appear (probably in the TD element of a table):





    Change the number in this line -'var RandValue=RandInt(4);' to the actual number of maxims you have included in the first script.

    Baring any typing errrors on my part, this should work as advertised. Let me know if it doesn't.

    Good luck,

    Dave

  6. #6
    VAR davej's Avatar
    Real Name
    Dave Jampole
    Join Date
    Apr 2000
    Location
    Haughton, LA ( just east of Shreveport, Louisiana)
    Posts
    2,524

    Default RE: unsure of how to proceed...

    Martin,

    I'll rework this and try again. Obviously the messageboard tried to interpret the code I included rather than just displaying it.

    Dave

  7. #7
    VAR davej's Avatar
    Real Name
    Dave Jampole
    Join Date
    Apr 2000
    Location
    Haughton, LA ( just east of Shreveport, Louisiana)
    Posts
    2,524

    Default RE: unsure of how to proceed...

    Martin,

    I think I got it. Since we can't preview a message before we post it, let me hedge my bet in the off change the code gets interpreted again rather than just displayed, and say that if you see '"' and '"', replace '"' with a less than sign, and '"' with a greater than sign.
    ------
    this is the first script (don't include this line)

    "SCRIPT"
    "!--- Hide from older browsers
    function MMaxim(Mnum) {
    var Maxims = new Array();
    Maxims[0]='"maxim 1."';
    Maxims[1]='"maxim 2."';
    Maxims[2]='"maxim 3."';
    Maxims[3]='"maxim 4."';
    Maxims[4]='"maxim 5."';
    return Maxims[Mnum];
    }

    function RandInt(Size) {
    var Mnum=Math.round(Math.random()*Size);
    return Mnum;
    }
    //Stop hiding --"
    "/SCRIPT"

    --------------
    this is the second script (don't include this line)

    "SCRIPT"
    "!--- Hide from older browsers
    //document.write(MQuote(RandInt(4)));
    var RandValue=RandInt(4);
    var MaximText=MQuote(RandValue);
    document.write(MaximText);
    //Stop hiding --"
    "/SCRIPT"

    Okay, let's try this.

    Dave

Similar Threads

  1. Suggestions required on how to proceed with a prob
    By Graham Wickens in forum Alpha Five Version 5
    Replies: 1
    Last Post: 04-04-2005, 04:24 AM

Bookmarks

Posting Permissions

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