Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Javascript Help

  1. #1
    Exclamation Javascript Help
    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?

  2. #2
    "<br />"

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •