Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26625

Re: quick question: how to dynamically an image source file?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: quick question: how to dynamically an image source file?
Date Mon, 19 Jan 2015 21:15:17 +0000 (UTC)
Organization A noiseless patient Spider
Lines 30
Message-ID <m9js54$les$1@dont-email.me> (permalink)
References <9607d1f5-10c0-4703-901c-bab1932cb04a@googlegroups.com> <XnsA427734C3E58Ceejj99@194.109.133.133> <m9iue0$bah$1@speranza.aioe.org> <6abe327d-c487-4e03-8a6f-f7f65ebc8bb0@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Mon, 19 Jan 2015 21:15:17 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="21980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hoGbc09Yj1P0hdryFbDmHtZu1+Gr85n4="
User-Agent Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)
Cancel-Lock sha1:TpOEgjg5LrgJgsZm7JJQs6eTf3Q=
Xref csiph.com comp.lang.javascript:26625

Show key headers only | View raw


On Mon, 19 Jan 2015 07:52:19 -0800, justaguy wrote:

> Now, I'm having trouble to load the js function.
> Please see code below.

> function f1() {
>   // in case var b is not available from parent page 
>   if (!b) {
>       b = 0;
>   }
>   alert(b);
>   // dynamim image code below ...
>   // just run the function
>   f1();
> }

> html code:
> to load the js <div id="myD">
> ...
> </div>

> outcome:
> The alert failed to alert, which indicates that the function is not run.
>  What could be wrong?

In the code you posted, the only place f1 is called from seems to be 
inside f1.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-18 19:39 -0800
  Re: quick question: how to dynamically an image source file? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-19 11:20 +0100
    Re: quick question: how to dynamically an image source file? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-01-19 10:48 -0200
      Re: quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-19 07:52 -0800
        Re: quick question: how to dynamically an image source file? JJ <jj4public@vfemail.net> - 2015-01-20 02:47 +0700
          Re: quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-19 14:24 -0800
            Re: quick question: how to dynamically an image source file? JJ <jj4public@vfemail.net> - 2015-01-20 07:31 +0700
              Re: quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-20 02:26 -0800
            Re: quick question: how to dynamically an image source file? Tim Streater <timstreater@greenbee.net> - 2015-01-20 12:08 +0000
              Re: quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-20 12:20 -0800
          Re: quick question: how to dynamically an image source file? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-20 14:06 +0100
            Re: quick question: how to dynamically an image source file? Tim Streater <timstreater@greenbee.net> - 2015-01-20 14:52 +0000
              Re: quick question: how to dynamically an image source file? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-20 20:47 +0100
        Re: quick question: how to dynamically an image source file? Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-19 21:15 +0000
          Re: quick question: how to dynamically an image source file? justaguy <lichunshen84@gmail.com> - 2015-01-19 14:25 -0800

csiph-web