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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2003
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting Dynamic Text/HTML into a Paragraph

    Hi all! Im back :P
    (anyways :P)
    Ive been trying to get this stupid javascript working for the past 20 hours but I cant seem to figure it out. (not literally 20 hours, but oh well ).
    First off, heres the URL: http://68.185.139.62/Test/gallery.php
    (Im working on the javascript first, I know it doesnt show right with IE...)
    When you click a thumbnail on the left, it is supposed to change the image on the right, and the contents of the p (_idesc), and the h1 (_ititle). I cant figure out the right javascript to use to change the innertext though. Ive tried _idesc.innerHTML="whatever" but that never works...

    Any help???

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    okay i made the neccessary changes, only problem is its not displaying two out of the 4 images im not sure why it may be a server issue on ur side, but attached is a zip file with your page, i added the function that writes the image and the description into the proper places u will see this function above the head tags, i also made it to where u can use the functions over again as neccessary

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    document.getElementById('_idesc').innerHTML
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    Regular Coder
    Join Date
    Jan 2003
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh wow thanks alot! BTW, the two images arent displaying becuase they are REALLY big files (the images they display are just thumbnails)...

    BTW, I actually tried document.getElementByID("_idesc").innerHTML and that never worked for me... In the javascript console (In firefox) it sayed that _idesc didnt have any properties...

    Update:
    And it works
    Last edited by l3vi; 02-03-2005 at 06:24 PM.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    lowercase Id in document.getElementById


  •  

    Posting Permissions

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