Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Javascript for a popup

    My son is writing a Fanfic story that I am posting on my homepage for him. He has aked for the following. At the end of each battle in the story, have a link that opens a popup that show the following:

    Battle Number - Where

    (In a table)
    Person A | Vs | Person B
    WeaponA, WeaponB, etc | Win/Lose/Draw | WeaponA, WeaponB, etc .

    I think I understand this much: The link can feed a value to the script which can open the popup and using case statements, populate the table with the relevant values.

    Optimum would be that the Weapons listed would actually be little pictures.

    I am just starting to dabble with html and javascript.

    If its too much to ask of someone, just say so.
    "Heading for the deep end"

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Javascript for a popup

    I've attached a file with code for a javascript popup and an example of how to trigger it using a hyperlink. I tried posting the code directly but the Lounge Script Cop keeps deleting it...

    You can try creating the tables with pictures in standard HTML and explore how you want to trigger the popup in the application. If you want to get more sophisticated and not write a bunch of separate files, you can use ASP and a data file source (such as a db) to store the images and other info. ASP and data file setup is fun to do once you learn how -- the bit advantages are that ASP can generate html 'on the fly' and you can add/delete your info in the datafile separately. OR just write a bunch of html tables...
    Attached Files Attached Files

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Hornsby Heights, New South Wales, Australia
    Posts
    3,822
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Javascript for a popup

    One of my many to-do things is disabling the uploading of live scripts as it could be used to do all sorts of things. Thus, thanks the "Lounge Script Cop" for doing the job manually and protect all the loungers, just in case....
    Cheers, Claude.

Posting Permissions

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