1. thinmints's Avatar
    This is what I'm working with:
    PHP Code:
    function calendarDate ( )
    {
      var 
    this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
      var 
    this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December")      //predefine month names
        
      
    var this_date_timestamp = new Date()    
      var 
    this_weekday this_date_timestamp.getDay()    
      var 
    this_date this_date_timestamp.getDate()    
      var 
    this_month this_date_timestamp.getMonth()    

      
    document.getElementById("calendar").firstChild.nodeValue this_weekday_name_array[this_weekday] + ", " this_month_name_array[this_month] + " " this_date  //concat long date string
    }

    </
    script
    Now, I'm trying to add a line break on the concat data string, but it's not seem to working... I've tried everything I could think of, including making a new variable and calling that up in between the data calls, but its not working:

    PHP Code:
    function calendarDate ( )
    {
      var 
    this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
      var 
    this_month_name_array = new Array("January","February","March","April","May","June","July","August","September","October","November","December")      //predefine month names
        
      
    var this_date_timestamp = new Date()    
      var 
    this_weekday this_date_timestamp.getDay()    
      var 
    this_date this_date_timestamp.getDate()    
      var 
    this_month this_date_timestamp.getMonth()
      var 
    newLine = <br/>;    

      
    document.getElementById("calendar").firstChild.nodeValue this_weekday_name_array[this_weekday] + newLine this_month_name_array[this_month] + " " this_date  //concat long date string
    }

    </
    script
    I've tried <BR/>, \n, \\n, \r\n, all the &#____; commands... Nothing is working. Can anyone help?
    Last edited by thinmints; 2010-05-11 at 03:56 PM. Reason: still need help
    2010-05-11 12:07 PM
LINK TO POST COPIED TO CLIPBOARD