HELP! using Replace function to replace letters with images
-
Hey how is everyone doing today? This is a ASP VBS question, I wasnt sure if I should post in here or in the visual basic forum so I apologize if this is the wrong place for this question. I am trying to create a asp page that will take the text from an input and for each letter change it into a specified image. I am creating a generator so I can make a ton of animated letter images and they will be displayed instead of regular text depending on what the user enters. Here is what I have tried already. The problem is, it replaces the c's in the "b" ") sGlitter = Replace(sGlitter, "c", "
") Glitter = sGlitter End Function Response.Write Glitter(sGlitter) %>
-
Hey how is everyone doing today? This is a ASP VBS question, I wasnt sure if I should post in here or in the visual basic forum so I apologize if this is the wrong place for this question. I am trying to create a asp page that will take the text from an input and for each letter change it into a specified image. I am creating a generator so I can make a ton of animated letter images and they will be displayed instead of regular text depending on what the user enters. Here is what I have tried already. The problem is, it replaces the c's in the "b" ") sGlitter = Replace(sGlitter, "c", "
") Glitter = sGlitter End Function Response.Write Glitter(sGlitter) %>
icecandy wrote:
question, I wasnt sure if I should post in here or in the visual basic forum so I apologize if this is the wrong place for this question.
Neither. Outdated and dead web technologies belong in the web development forum. Why on earth would you use ASP ? Do you hate yourself ? ASP was a nightmare.
Christian Graus Driven to the arms of OSX by Vista.
-
Hey how is everyone doing today? This is a ASP VBS question, I wasnt sure if I should post in here or in the visual basic forum so I apologize if this is the wrong place for this question. I am trying to create a asp page that will take the text from an input and for each letter change it into a specified image. I am creating a generator so I can make a ton of animated letter images and they will be displayed instead of regular text depending on what the user enters. Here is what I have tried already. The problem is, it replaces the c's in the "b" ") sGlitter = Replace(sGlitter, "c", "
") Glitter = sGlitter End Function Response.Write Glitter(sGlitter) %>
So does each letter have a unique image then? I would build your image string separately and not use Replace. I'm not a VB coder so here's some pseudo code:
sGlitter = Request.Form("text") imageString = "" For Each Letter ltr in sGlitter imageString = imageString & "<img src=http://www.icecandyeffects.com/glitter2/pink1/" & ltr & ".gif>" End For
Sorry for the inexact code, but you get the idea???