Parsing <IMG> tags using ASP

Results 1 to 2 of 2

Thread: Parsing <IMG> tags using ASP

  1. #1
    Michael Fleet Guest

    Default Parsing <IMG> tags using ASP

    I am working on a web app that allows users to upload new content to their site using the SAFileUp component. I want to parse the uploaded HTML page for images and either (1) prompt the user for the images to upload, then replace the location in the &#060;IMG&#062; tag to reflect the new location on the web server or (2) automatically upload the images based on the location on the client machine (as defined in the &#060;IMG&#062; tag), then replace the reference in the &#060;IMG&#062; with the new location info.<BR><BR>Anyone ever attempt something like this? Any suggestions? I have part (1) almost working, but I am up to my ears in a regular expression mess. I would like a simpler solution if possible. Part (2) sounds a bit crazy to me, but it was posed by client, and I figured, what the heck, I&#039d ask.<BR><BR>BTW - I am familiar with writing my own DLLs, so if that&#039s what is needed, I can handle it. I just need some fresh insight into how the tackle the problem (tunnel vision is kicking in).<BR><BR>Thanks!!<BR>mike fleet

  2. #2 Guest

    Default RE: Parsing <IMG> tags using ASP

    I&#039ve just started working with SAFileUp/SAJ-File. <BR><BR>What you&#039re doing sounds cool. If you&#039ve got the image filename from the &#060;IMG&#062; src= "...", and maybe a relative path (which it sounds like you&#039re getting in part 1), try using SAJFile on the client side to upload and and rename it if you want in the upload. I&#039ve had good luck getting the files to upload once I&#039ve passed the name. (I am having trouble with the progress meter and some other stuff -- the sample code doesn&#039t seem to work.) <BR><BR>My first cut approach for both would be to use the SAFileManager&#039s text file manipulation properties to read the file, like <BR> <BR>Set oFM = Server.CreateObject("SoftArtisans.FileManager")<BR >Set oTS = oFM.OpenTextFile( fileName ) <BR><BR>Question for you: If you&#039re using SAFileUp 3.1, can you see the UseMemory property? I can&#039t and I&#039m wondering whether I&#039ve got an old version still registered.<BR><BR> <BR><BR>

Posting Permissions

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