Welcome to TalkGraphics.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    17

    Default IE ERROR: Expected Identifier, string or number

    Hi All
    I have a problem which XARA web designer 6 has created for me.
    The script works 100% in Firefox but I get an error when I run it in IE.
    It says Line 35 Char:1

    Here is the script from Line 18

    #18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    #19 <html xmlns="http://www.w3.org/1999/xhtml">
    #20 <head>
    #21 <meta name="XAR Files" content="classifieds_htm_files/xr_files.txt"/>
    #22 <title>My Page</title>
    #23 <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"/>
    #24 <meta name="Generator" content="Xara HTML filter v.3.1.0.373"/>
    #25 <link rel="stylesheet" type="text/css" href="classifieds_htm_files/xr_main.css"/>
    #26 <link rel="stylesheet" type="text/css" href="classifieds_htm_files/xr_text.css"/>
    #27 <script type="text/javascript" src="classifieds_htm_files/roe.js"></script>
    #28 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    #29 <title>Live Character Count with Progress bar using Jquery</title>
    #30 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    #31 <script type="text/javascript">
    #32 $(document).ready(function()//When the dom is ready
    #33 {
    #34 $("#text_area_input").keyup(function()//Detect keypress in the textarea
    #35 {
    #36
    #37 var text_area_box =$(this).val();//Get the values in the textarea
    #38 var max_numb_of_words = 700;//Set the Maximum Number of words
    #39 var main = text_area_box.length*100;//Multiply the lenght on words x 100
    #40
    #41 var value= (main / max_numb_of_words);//Divide it by the Max numb of words previously declared
    #42 var count= max_numb_of_words - text_area_box.length;//Get Count of remaining characters
    #43
    #44 if(text_area_box.length <= max_numb_of_words)
    #45 {
    #46 $("#progressbar").css("background-color","#5fbbde");//Set the background of the progressbar to blue
    #47 $('#count').html(count);//Output the count variable previously calculated into the div with id= count
    #48 $('#progressbar').animate(//Increase the width of the css property "width"
    #49 {
    #50 "width": value+'%',
    #51 }, 1);//Increase the progress bar
    #52 }
    #53 else
    #54 {
    #55 $("#progressbar").css("background-color","yellow");//If More words is typed into the textarea than the specified limit ,Change the progress bar from blue to yellow
    #56
    #57 $("#text_area_input").val(text_area_box.substr(0,m ax_numb_of_words)); //Remove the excess words using substring
    #61 }
    #62 return false;
    #63 });
    #65 });
    #68 $(document).ready(function()
    #69 {
    #71 $("#text_area_input").focus(function()
    #72 {
    #73 $(this).animate({"height": "75px",}, "slow" );//Expand the textarea on clicking on it (75)
    #75 return false;
    #76 });
    #80 });
    #81 </script>
    Last edited by schalkl; 03 December 2010 at 06:27 PM.

  2. #2
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default Re: IE ERROR: Expected Identifier, string or number

    It's probably not the fault of Xara WD you know - the error is within the script from #31 onwards. And as it works in FF perhaps it's IE at fault/not liking the script.

    Just a thought
    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

 

 

Bookmarks

Posting Permissions

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