Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Brighton, UK
    Posts
    282
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy error when calling an array element

    hi I have the code below, in a linking js page from my html page.. but when I link to it from my html page it comes up woth an error

    var messages = new Array();
    get_link[0] = "home.htm";
    get_link[1] = "news.htm";
    get_link[2] = "enquiries.htm";
    get_link[3] = "http://www.streetmap.co.uk/streetmap.dll?G2M?X=558128&Y=104766&A=Y&Z=1";
    get_link[4] = "mailto:stringtownsupplies@btopenworld.com?subject="enquiry from the web site";
    }
    function urgent() {
    window.alert('for urgent deliveries we charge, next day: 24 hours £6.50, 2-3 days: 48 hours £28.50, saturday: £23.50');
    }

    my link to it is

    javascript:window.open(link[2])


    whats happening team, will my link work to open the page I want ?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When you define array elements that are called "get_link", you shouldn't call them "link" when you refer to them...
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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