473,386 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Why does a script tag under another script tag in FF not work?

Hi guys!

I have a problem with FF:
'<script language="JavaScript1.2">'+editor_generate('answer _'+num,direction)+'<\/script>'; \\work in FF
'<script language="JavaScript1.2">'+editor_generate('explai n_'+num,direction)+'<\/script>';does not work in FF

In IE all works perfect!

Any suggestions?
Oct 21 '10 #1
8 1289
londres9b
106 100+
What is <\/script> for?

Shouldn't it be
Expand|Select|Wrap|Line Numbers
  1. </script>
?
Oct 23 '10 #2
this is my full code of function:
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. var counter=0;
  3.  
  4. function add_line(table_name,initial_count,direction){
  5.     counter++;
  6.  
  7.     var num = eval( eval(counter)+eval(initial_count));
  8.     //target_div =  document.getElementById(name);
  9.     //target_div.innerHTML  += "<tr><td>1<td/><td>2</td><td>3</td><td>4</td></tr>";
  10.     var tab = document.getElementById(table_name);
  11.      var row = document.createElement('tr');
  12.      var cell = document.createElement('td');     
  13.      cell.innerHTML='<input type="checkbox" name="correct_'+num+'" id="correct_'+num+'"  value="1"  />';
  14.      row.appendChild(cell);
  15.      var cell = document.createElement('td');
  16.      cell.innerHTML='<input type="checkbox" name="comment_'+num+'" id="comment_'+num+'"  value="1"  />';
  17.      row.appendChild(cell);
  18.      var cell = document.createElement('td');
  19.      cell.innerHTML='<textarea rows="6" cols="55%" dir="'+direction+'" name="answer_'+num+'" id="answer_'+num+'" ></textarea>';
  20.      row.appendChild(cell);
  21.      var cell = document.createElement('td');      
  22.  
  23.      cell.innerHTML='<div id="feedback_textarea_'+num+'" style="display:none;" align="'+direction+'">'
  24.     +'<textarea rows="5" cols="35" dir="direction" name="explain_'+num+'" id="explain_'+num+'" >'
  25.     +'<s:property value="explain_text" /></textarea></div>'
  26.     +'<input type="button" class="button" value="<s:property value="feedback_button"/>"'
  27.     +'onclick='+"'"+'toggle("feedback_textarea_'+num+'",this,"<s:property value="feedback_button"/>","<s:property value="close_button"/>");'+"' >";
  28.  
  29.  
  30.      row.appendChild(cell);
  31.      tab.appendChild(row);         
  32.      '<script language="JavaScript1.2">'+editor_generate('answer_'+num,direction)+'<\/script>';//Work on FF and IE
  33.      '<script language="JavaScript1.2">'+editor_generate('explain_'+num,direction)+'<\/script>';does not work in FF but works in IE
  34.  
  35.  
  36.  }
  37.  
  38.  
  39. </script>
this is script tag in quotations so i need to write <\/script> otherwise no one of the browsers are not understand the code.

Any suggestions of problem?
Oct 24 '10 #3
drhowarddrfine
7,435 Expert 4TB
In your first example, you have a space in one of the arguments. Also, there is no such thing as Vscript.
Oct 24 '10 #4
Well, space is copy=> paste mistake from my code. Also if you want to use script tag in string quotation you have to use <\/script>!
Oct 25 '10 #5
Plater
7,872 Expert 4TB
I am abit curious why you need the script tags at all? You are already IN a javascript function yes?
Just run the code.
Oct 25 '10 #6
Well you right Plater
I remove script tags:
editor_generate('answer_'+num,direction);
editor_generate('explain_'+num,direction);
The same problem the first row is working in FF and second is not....:((
In IE all work perfect(Of course);
Oct 27 '10 #7
Plater
7,872 Expert 4TB
The good thing about FF is that it has an error console (probably ctrl+shift+j) that will show your error.
Then if you have trouble you can tell us exactly what the error is
Oct 27 '10 #8
Thanks with you help i found an error in my script
Thank a lot Plater!!!
Oct 28 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: cv | last post by:
Hello All, I have used MultipartRequest like the following to upload images. MultipartRequest multi = new MultipartRequest(request, "../webapps/coreprogram/dealerlogos", 1024 * 1024); It...
6
by: Mipe | last post by:
Hello, for a testmodule I need to execute a python script from within a python script. Something like: -- ScriptA --> import whatever RunScript("scriptb.py") RunScript("scriptc.py")
12
by: Apostolis K. | last post by:
I run windows XP and IIS 5.1 and the system doesn't let me to delete or move folders using FileSystemObject.DeleteFolder(path,force) or FileSystemObject.MoveFolder(origin,destination). I allow all...
4
by: tmb | last post by:
I want to do a slide show with a script something like http://www.abiglime.com/webmaster/articles/jscript/021298.htm My Question: Will the client wait on all pic's in the slice show to be...
1
by: Joe Ciaramitaro | last post by:
I have an application that I was trying to convert to vb.net which contains the msscript object to call custom perl scripts which msscript does great. After converting to .net the control doesn't...
5
by: Mirovk | last post by:
The onclick action associated to my formīs radio buttons call to a vbscript were the session values are changed, this happens correctly but with the onclick action associated to my continue button...
1
by: theendisnear | last post by:
I am ready to throw my laptop out of the window of my car! I just can't seem to get to any link associated with javascript. When I click on the link, nothing happens. If I try to hold the shift key...
2
by: tanyali | last post by:
I am using Linux Suse10, php 5 . execute a shell script in a terminal, it works. output is a file with data . when I use it in php like this (code : php) : chdir("../file");...
11
by: Jim | last post by:
Hi, I want to schedule a Python program that reads the command line for input. However, when adding an argument to the command line Python will not pick it up when using Windows scheduled...
0
by: diego72 | last post by:
Hi!, I'm trying to delete some registry keys and subkeys with a vbs script, deploying it through gpo starup script. The Os is Windows 2003 Enterprise Server R2 and the clients are Windows Xp. The...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.