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

Threaded View

  1. #8
    Join Date
    Sep 2007
    Posts
    28

    Re: Whats the easiest way

    if i do something like this:
    Code:
    <script type="text/javascript">
    var theInteger = 0;
    function addToDiv(){  var theDiv = document.getElementById('newContent');
      theDiv.innerHTML += '<div id="scont">
    						<div class="inner" id="inner">
    							<div class="innertopleft">
    								<div class="innertopright">
    								</div>
    								<div class="flexcroll" id="flexcroll" onmouseover="javascript:insertRemoveP(false)">
    									<div id="dynamic">
    										';
      theInteger++;
    }
    </script>
    it wont work, itll give me an error, but if i place all that code on a single line (backspacing it all), it works fine

    Code:
    <script type="text/javascript">
    var theInteger = 0;
    function addToDiv(){
      var theDiv = document.getElementById('newContent');
      theDiv.innerHTML += '<div id="scont"><div class="inner" id="inner"><div class="innertopleft"><div class="innertopright"></div><div class="flexcroll" id="flexcroll" onmouseover="javascript:insertRemoveP(false)"><div id="dynamic">';
      theInteger++;
    }
    </script>
    btw, for the html code within, i replace all quotations with \"
    Last edited by PeejAvery; September 19th, 2007 at 09:42 PM.

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