JSHINER Posted April 29, 2007 Share Posted April 29, 2007 I am new to Javascript so please be kind I have the following: document.images.photoslider.src=photos[which] Which updates: document.write(\'<img src="\'+photos[0]+\'" name="photoslider" border=0>\') With the correct # inside of photos[0]. I would like a similar function that would update a link <a href="\'+photos[0]+\"> the same way. Is there a way to do this? Quote Link to comment Share on other sites More sharing options...
emehrkay Posted April 29, 2007 Share Posted April 29, 2007 id go with the id id: add id to your link <a href="\'+photos[0]+\" id="unique id"> after the js code that updates the pic add document.getElementById('link id').setAttribute('href',photos[0]); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.