Re: Javascript: is it possible to pass a parameter to a function inside a document write?



Using a pointed stick and pebbles, rf scraped:

>> document.write('<span onclick="myfunction(' + parameter + ')"></span>');
>
> or perhaps:
>
> document.write('<span onclick="myfunction(\"parameter\")"><span>');

Hmm, I was reading the OP as something else, ie. how to dynamically add
a parameter value using JavaScript to write the actual value based on a
variable named "parameter" which needed to be inserted into the function
call.

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
.



Relevant Pages

  • Re: Javascript: is it possible to pass a parameter to a function inside a document write?
    ... Dylan Parry wrote: ... > Using a pointed stick and pebbles, ... > Hmm, I was reading the OP as something else, ie. how to dynamically add ...
    (alt.html)
  • Re: Happy New Year
    ... Apparently it hasn't helped my reading neither, ... >> Hmm... ... >> Silk Quit. ... Prev by Date: ...
    (rec.outdoors.fishing.bass)
  • Re: A Must See: Challenge Arcade in Reading, PA
    ... Hmm, now there's a first - somewhere i COULD pheasably visit in the US ... I work for a US company that's based in Reading (US, ... Martin. ... Prev by Date: ...
    (rec.games.video.arcade.collecting)
  • Re: Weird PCI interrupt delivery problem (resolution, sort of)
    ... > Reading the lapic before the write has no effect. ... Hmm, perhaps the read forces the write to post? ... Scott? ... Prev by Date: ...
    (freebsd-hackers)
  • Re: Nose Rings
    ... One thing that's obvious from reading Genesis is that the stories were obviously told orally before some little Jew wrote them down in the bible Why should the illustrations of a great artist like Crumb make the words in Genesis any less real? ... Hmm, but little they know ... One rich man in ten with a satisfied mind. ... when my life is over and my time has run out ...
    (rec.music.dylan)