46 users online (0 members and 46 guests)  


  Results 1 to 2 of 2

Related

  1. document.getElementById    Forum: Javascript Forum
    Replies: 0
  2. Retrieve Windows username    Forum: Javascript Forum
    Replies: 6
  3. Retrieve Windows username    Forum: PHP Forum
    Replies: 3
  4. Replies: 0
  1. #1
    Grand Mamamo's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2005
    Posts
    11

    Cool Retrieve 'document.target_name.src'...

    Hi everyone !

    'target_name' is variable. I'd like to retrieve
    'document.target_name.src'. The hereunder way doesn't work. Could you
    let me know an efficient one, please (i know how to do it the getelementbyid way : it's not the way i am looking for) ?

    Code:

    <img
    src="index.jpg"
    name="imageimage"
    >

    <script>

    target_name='imageimage' // NB: 'target_name' is variable; it is fixed
    for the needs of the demonstration.
    alert(document.target_name.src)

    </script>


    Thanx for your help !

  2. #2
    juanmanuel's Avatar
    New User

    Status
    Offline
    Join Date
    May 2005
    Posts
    8

    Re: Retrieve 'document.target_name.src'...

    ?
    what's your goal?
    there is an array of images in the document node, also there is a associative array called all(for ie), both are accesible by the image name. The best way is getElementbyId 'cause it is the standard way!
    Last edited by juanmanuel; 05-16-2005 at 11:27 AM.