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: Insert Contents of .txt file into a .html page
• Re: Perl regular expression problem.
• Re: Problems in login using WWW::Mechanize
• searching for gd::graph guide
• Re: ARRAY OF HASHMAPS
• Adv. Regexp or Otherwise
• Adv. Regexp or Otherwise
• I need help pleasee! My project is about using I/o Stream
• Help Running VB script in Windows 2003


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-2008