Re: Javascript: is it possible to pass a parameter to a function inside a document write?
- From: Dylan Parry <usenet@xxxxxxxxxxxxxx>
- Date: Fri, 7 Oct 2005 09:28:58 +0100
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
.
- Follow-Ups:
- References:
- Prev by Date: Re: problems hosting my own website
- Next by Date: Re: feedback greatly appreciated
- Previous by thread: Re: Javascript: is it possible to pass a parameter to a function inside a document write?
- Next by thread: Re: Javascript: is it possible to pass a parameter to a function inside a document write?
- Index(es):
Relevant Pages
|