Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Dynamically setting <img> data representing an SVG image

Dynamically setting <img> data representing an SVG image

Scheduled Pinned Locked Moved Web Development
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Erik Hammar
    wrote on last edited by
    #1

    Hi, What is the best method (if any) to set the picture of an tag using some text string representing an SVG image? That is, I don't want to change the 'src' attribute to point to another file, but to set the actual data somehow... I saw something like ![](javascript: ...) which does not seem to work. Maybe I'm supposed to parse/load the file using some Javascript function? Thanks in advance! /Erik

    L 1 Reply Last reply
    0
    • E Erik Hammar

      Hi, What is the best method (if any) to set the picture of an tag using some text string representing an SVG image? That is, I don't want to change the 'src' attribute to point to another file, but to set the actual data somehow... I saw something like ![](javascript: ...) which does not seem to work. Maybe I'm supposed to parse/load the file using some Javascript function? Thanks in advance! /Erik

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Erik Hammar wrote:

      Maybe I'm supposed to parse/load the file using some Javascript function?

      Maybe as a "Developer" you are supposed to find and "Read" Documentation[^] Having a clear understanding of fundamental concepts is key to being a capable developer.

      led mike

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups