codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Position a script tag in a DIV probleme with IE  steph2004 at 18:55 on Monday, March 31, 2008
 

Hi,

I'm trying to position a script inside a div. It works fine with IE 7 and FF, but it doesn't with IE 6. The script is printed under the div which is a big red box.

Here's the code:


<script type="text/javascript">
document.write('<div style="margin: 0pt; padding: 0pt; background-color: Red; position: relative; width: 145px; height: 145px;" id="PA_transcon10003">');
document.write('<script style="padding:0; margin:0;" language="JavaScript" type="text/javascript">ord=Math.random()*10000000000000000;document.write(\'<script language="JavaScript" src="http://ad.doubleclick.net/adj/tc.fr.biz.blogues.sguerin;tile=1;sz=145x145;ord=\' + ord + \'?" type="text/javascript"></scr\'+ \'ipt>');</script>');
document.write('</div>');
</script>


Is there a way to force the script tag to be positioned into the DIV not under?

Thanks

Steph

<Added>

Update : It doesn't work on IE 7 as well








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Run a .bat file from VB
•  Handling large datasets in charts quickely
•  Re: How to concatenate a string and a variable using perl?
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Re: Difference between two dates including From & To date
•  Re: Incrementing a date field using javascript via prompt
•  Re: How to know the Control Type in javascript
•  Re: Get all elements with a common name
•  Re: PHP Session Management and Password Protection Class


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010