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