View Full Version : Help! Hacking Up a Tag

12-20-2005, 07:46 PM
I am using a program which dynamically creates content for listings at eBay. This program allows me to upload images to my remote server, and then create listing templates that are dynamically populated. The image call is <<image1inline>> and so forth, however it dumps in a whole img tag: <img src=""> Is there a way to use js to hack off the first x number of characters and the last many so that I can save just the remote address of the picture. Then I can manipulate the images as they are displayed, height, width, border, etc. Please help.

12-21-2005, 03:14 AM
SubStr (http://www.devguru.com/technologies/javascript/10819.asp)

- or -

SubString (http://www.devguru.com/technologies/javascript/10820.asp)

12-21-2005, 11:29 AM
var domain=obj.src.substring(0,lastIndexOf('/'));