Function return

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan

    #1

    Function return

    Is it possible to have a javascript function return a value to set a webpage
    elements property?

    Ie.

    <td bgcolor=get_bac kground_colour( )>

    Thanks for any help,
    Dan.


  • Evertjan.

    #2
    Re: Function return

    Dan wrote on 09 jun 2004 in comp.lang.javas cript:
    [color=blue]
    > Is it possible to have a javascript function return a value to set a
    > webpage elements property?
    >
    > Ie.
    >
    > <td bgcolor=get_bac kground_colour( )>[/color]

    No, there is no trigger.

    if you want to trigger it at the end of page loading:

    ========

    <body
    onload="documen t.getElementByI d('mytd').style .backgroundColo r='blue'"[color=blue]
    >[/color]

    <td id="mytd">...

    =========

    if you want to trigger it on another event, please state the event.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    Working...