Alpha DevCon 2018
Results 1 to 5 of 5

Thread: Use variable in HTML Img src=

  1. #1
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default Use variable in HTML Img src=

    I am trying to control the image that appears at the top of a page by using variables.

    dim sourcename as C
    sourcename = "images/pomanager.jpg"

    what is the correct syntax for scr= using variables.

    <td><img src=??????????? ><a href="login.a5w"></a></td>

  2. #2
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default Use variable in HTMl Img src=

    example
    <img src="image.gif">

    vimage = "/images/image.gif"
    <img src = vimage

    What is the correct syntax

    Can this be done?

    Thanks
    Charlie Crimmel

  3. #3
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,575

    Default Re: Use variable in HTMl Img src=

    Yes. Here's an example from one of my reusable pages:

    Code:
     
    <div id="header">
    <img id="toppic" height="<%a5 ?session.section.logohigh %>" src="<%a5 ?session.section.logoname %>.jpg"
     width="<%a5 ?session.section.logowide %>" alt="<%a5 ?session.section.logoalt %>" />
    </div><!-- end header -->
    Logohigh and logowide are, for example, "360px", and I've found I can't include the extension in logoname.

    Pat

  4. #4
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default Re: Use variable in HTMl Img src=

    Thanks Pat
    That worked

    thanks
    charlie
    crimmel

  5. #5
    Member
    Real Name
    Syed Irfan Ahmed
    Join Date
    Mar 2015
    Posts
    22

    Default Re: Use variable in HTMl Img src=

    Thanks man it worked.....

Similar Threads

  1. Binding HTML Element ID with a HTML Form field/variable in a Desktop Application
    By porcadilla.johnpatrick in forum Windows Desktop Applications
    Replies: 0
    Last Post: 10-23-2015, 04:41 AM
  2. Passing a Javascript variable from one Html to another
    By Billy29 in forum Windows Desktop Applications
    Replies: 1
    Last Post: 08-13-2014, 08:50 AM
  3. Variable In Html
    By Alan Lee in forum Alpha Five Version 10 - Desktop Applications
    Replies: 14
    Last Post: 05-14-2013, 12:48 PM
  4. HTML Mail Script - Can Field Variable Values be included
    By Softpraxis in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 01-12-2012, 06:25 PM
  5. get session variable from grid to html page
    By richard2007 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 20
    Last Post: 06-29-2011, 12:58 PM

Bookmarks

Posting Permissions

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