insertAdjacentHTML 
Author Message
 insertAdjacentHTML

Could someone show a novice how to insertAdjacentHTML
with VBScript, or use some other VBS approach
to _add_ a window closing button to this HTA.

I have tried many approaches, including several
convoluted ones, but none successful. This JScript
does what I'm looking for, but I'd rather use VBS.

Thanks

   ---...---
   End Sub
   </script>

   <script language="JScript">
   function fnAdd()
   {
      document.body.insertAdjacentHTML("BeforeEnd","<center><BUTTON
onclick=fnBye()>Close window</BUTTON><center>")
   }
   function fnBye()
   {
      close();
   }
   </script>

   </head>
   <body>
   ---...---



Wed, 07 Dec 2005 10:45:54 GMT  
 insertAdjacentHTML
This works for me:

<html><head><title>PHP output result page</title></head>
<body onload="fnAdd()">
<script language="vbScript">
function fnAdd()
    document.body.insertAdjacentHTML "BeforeEnd", _
        "<center><BUTTON onclick=fnBye()>Close window</BUTTON><center>"
end function
function fnBye()
    close
end function
</script>
</body></body></html>

Hope it helps,
Csaba Gabor

Quote:

> Could someone show a novice how to insertAdjacentHTML
> with VBScript, or use some other VBS approach
> to _add_ a window closing button to this HTA.

> I have tried many approaches, including several
> convoluted ones, but none successful. This JScript
> does what I'm looking for, but I'd rather use VBS.

> Thanks

>    ---...---
>    End Sub
>    </script>

>    <script language="JScript">
>    function fnAdd()
>    {
>       document.body.insertAdjacentHTML("BeforeEnd","<center><BUTTON
> onclick=fnBye()>Close window</BUTTON><center>")
>    }
>    function fnBye()
>    {
>       close();
>    }
>    </script>

>    </head>
>    <body>
>    ---...---



Wed, 07 Dec 2005 11:21:53 GMT  
 insertAdjacentHTML
Friends and neighboors,

get it straight.

VB and VB is NOT javascript.

If you walk the original Bernd Eich Model,

window.close()

will work always and in any such browser

or hta.


Quote:
> Could someone show a novice how to insertAdjacentHTML
> with VBScript, or use some other VBS approach
> to _add_ a window closing button to this HTA.

> I have tried many approaches, including several
> convoluted ones, but none successful. This JScript
> does what I'm looking for, but I'd rather use VBS.

> Thanks

>    ---...---
>    End Sub
>    </script>

>    <script language="JScript">
>    function fnAdd()
>    {
>       document.body.insertAdjacentHTML("BeforeEnd","<center><BUTTON
> onclick=fnBye()>Close window</BUTTON><center>")
>    }
>    function fnBye()
>    {
>       close();
>    }
>    </script>

>    </head>
>    <body>
>    ---...---



Wed, 07 Dec 2005 16:40:48 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. write script into another frame with innerHTML/insertAdjacentHTML

2. insertAdjacentHTML and removeChild

3. insertAdjacentHTML Questions...

4. HELP: InsertAdjacentHTML Problem

5. insertadjacenthtml of object to trigger autodownload...

6. insertAdjacentHTML Method

7. Invalid target element for this operation / insertAdjacentHTML

8. Cross Browser insertAdjacentHTML() ??

9. using asp var in "insertAdjacentHtml"

10. insertAdjacentHTML

11. VB6 : insertAdjacentHTML

 

 
Powered by phpBB® Forum Software