Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Detroit, Michigan, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On controls created on the fly...

    This is the scenario: I have a button on a form. Clicking the button will create and populate a drop-down box and will also add a second button , both on the freshly created page, all this thanks to Javascript functions that reside in between the <script></script> tags of the original page. The question is...if I wanted to bind -different- code to the onclick event of the newly created button, where would that code be located for the new button to see?.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: On controls created on the fly...

    Hi Raul

    Is there a way you could put all your script in a js file and then use the following code between the head tags

    <script src="ExternalFile.js" language="javascript" type="text/javascript"></script>

    You can build all your javascript function is ExternalFile.js....or have I missed your point <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  3. #3
    Star Lounger
    Join Date
    Sep 2002
    Location
    Detroit, Michigan, USA
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On controls created on the fly...

    HmmmmmI could create all the code external. That's possible. I'm still unsure that the new button will be aware of the existance of such external source of code. Let me try it out. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •