Dynamically added images

Discussion in 'Javascript' started by blakebertuccelli@gmail.com, Dec 25, 2007.

  1. Guest

    I'm trying to dynamically load an image into an java button from an
    html page.

    Basically What I have is an HTML page called "samples.html" with the
    following:
    <script>Application.addTitle('<img border=0 src="image.gif"/>',
    'open_window2' )</script>


    I want to get image.gif into the IMAGE GOES HERE area on a page called
    "application.js":
    addTitle: function(title, id) {idButton = id + '_click_button';
    document.write( title + " <span class='title' id='" + title + "'
    href='#' onmouseover=\"$('" + title + "').addClassName('selected')\"
    onmouseout=\"$('" + title + "').removeClassName('selected')\" onclick=
    \"Application.evalCode('" + id + "', true)\"> IMAGE GOES HERE </
    span>")
    },

    Any help would be mucho appreciated. I attached both files.
     
    , Dec 25, 2007
    #1
    1. Advertising

  2. Evertjan. Guest

    wrote on 25 dec 2007 in comp.lang.javascript:

    > I'm trying to dynamically load an image into an java button from an
    > html page.


    This is not a Java NG, and Javascript-buttons so not exist.


    > Basically What I have is an HTML page called "samples.html" with the
    > following:
    > <script>Application.addTitle('<img border=0 src="image.gif"/>',
    > 'open_window2' )</script>


    <script> is a bad way to start javascript use:

    <script type='text/javascript'>

    The rest is not Javascript, please ask in an aprpriate NG.

    > I want to get image.gif into the IMAGE GOES HERE area on a page called
    > "application.js":
    > addTitle: function(title, id) {idButton = id + '_click_button';
    > document.write( title + " <span class='title' id='" + title + "'
    > href='#' onmouseover=\"$('" + title + "').addClassName('selected')\"
    > onmouseout=\"$('" + title + "').removeClassName('selected')\" onclick=
    > \"Application.evalCode('" + id + "', true)\"> IMAGE GOES HERE </
    >span>")
    > },
    >
    > Any help would be mucho appreciated. I attached both files.
    >




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Dec 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bennett Haselton
    Replies:
    1
    Views:
    539
    John M Deal
    Nov 8, 2004
  2. Guest
    Replies:
    4
    Views:
    921
    Eliyahu Goldin
    Jan 4, 2005
  3. Jeffrey Todd
    Replies:
    1
    Views:
    4,148
    Peter Blum
    Jun 2, 2005
  4. antishok
    Replies:
    0
    Views:
    110
    antishok
    Mar 3, 2004
  5. Andrew Poulos

    Mac not showing dynamically added images

    Andrew Poulos, May 15, 2009, in forum: Javascript
    Replies:
    1
    Views:
    118
    Thomas 'PointedEars' Lahn
    May 15, 2009
Loading...

Share This Page