CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Dec 2003
    Location
    Gods own country, India
    Posts
    248

    Arrow Executing script inside a dynamicaly created table cell

    Hello gurus,

    My objective is to execute a function when a row is added to a table.
    The row addition is done dynamicaly using JS
    to do this. i dynamicaly create a table cell and embed a <script> tag inside ( as innerHTML) .
    Code:
    "<scr"+"ipt language='javascript'> alert( 'hello'); " + "</scr"+"ipt>"
    i expect to see an alert each time the cell was added.
    but nothing showed up. what could be the problem?

    btw i cannot write
    Code:
    "<script language='javascript'> alert( 'hello'); </script> "
    because the </script> tag inside the string causes conflict with the actual <script> opening tag.

    Thanks in advance
    Last edited by akgalp; September 3rd, 2008 at 02:11 AM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured