473,399 Members | 3,656 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,399 software developers and data experts.

JS DOC table submit problem

Hi all!
My problem is this:
I`ve got an ASP application with an object clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A element (this is DHTML tool for text editing). There is also a form in my application. When I press the "save" button, the app gets the contents of this "clsid:2D36..." object, assigns them to one of the form`s fields and submits the form. When submitting simple MS Word DOC text (or any other), everything is fine. But when you try to submit a table from a DOC file, an error occurs: "Access denied" at the line when I submit form: document.forms(0).submit();
Here`s some code:

Expand|Select|Wrap|Line Numbers
  1. function partifyDocument( varDocument )
  2. {
  3.     var strRetVal;
  4.  
  5.     strRetVal = varDocument.body.innerHTML;
  6.  
  7.     return strRetVal;
  8.  
  9. }
  10.  
  11. function saveAction()    
  12. {
  13.     if (document.forms(0).hlp_type.checked != true)    {
  14.         try    {
  15.             document.forms(0).hlp_file.value    =    null;
  16.             var strContent =    partifyDocument(tbContentElement.DOM)
  17.             document.forms(0).hlp_text.value    =    strContent;
  18.             }    catch(exception)    {
  19.                     }    
  20.                 }
  21.         SaveAndCloseClicked =    true;
  22. }
  23.  
  24. function submitAction()    
  25. {
  26.     if( document.forms(0).<%=arrLstFlds(1)%>.value == "" ){
  27.           alert("Header must not be empty");
  28.             return false;
  29.         }
  30.     document.forms(0)._action.value            =    'edit'
  31.     saveAction();
  32.         SaveAndCloseOver                        =    true;
  33.     //alert('submiting...');
  34.     //document.write(tbContentElement.DOM.body.innerHTML);
  35.     document.forms(0).submit(); ///Error occures here!!!
  36. }
Please post your suggextions and advice, I would really appreciate any help!
P.S.: I`m not actually the author of the app, I`m just fulfilling the bugfixing task
Nov 16 '09 #1
6 1977
RamananKalirajan
608 512MB
Hi I think its may be due to the string capacity u may get problem when u place the table inside the string. It may be a problem I am not sure. I dont have much knowledge in ASP. why cant you try session objects or request objects directly to set the contents.

Thanks and Regards
Ramanan Kalirajan
Nov 17 '09 #2
Thank you for your reply!
But I can`t use a request or a session object to do this. This is not ASP.NET.
And in addition there is another asp page with a VB script which processes the form after it has been submitted. So the only way is to submit the form with DOC-text in its input field (attribute action="_HelpAdit.asp").
Nov 17 '09 #3
RamananKalirajan
608 512MB
Why cant you try with cookies... Is there any specific requirement that, cookies should not be used?

Thanks and Regards
Ramanan Kalirajan
Nov 18 '09 #4
Well, I thought about the cookies, but this mechanism is used to edit help topics, and their size can grow really fast, and cookies must be rather compact.
I`ve just found out that it is not specifically DOC problem. The JS submit script fails with error if I try to save any HTML table. Can there are there some specific issues with HTML content of form`s input tags? Or may be I can`t save some HTML tags into javascript string?
Nov 18 '09 #5
RamananKalirajan, you were right!!!
This is because of the length of JS string. MS Explorer has a limitiation on the size of JS string. In Mozilla this limit is greater than in IE, and in Mozilla this error does not occur. But I have to make this work in IE. Can I submit this form partly, for exapmle submit the first half of the string and then the second?
Nov 18 '09 #6
RamananKalirajan
608 512MB
Obviously that u can do.. But instead u can send the string content in two parameters.. so that you can send the value in the single submission itself.

Thanks and Regards
Ramanan Kalirajan
Nov 19 '09 #7

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

Similar topics

3
by: daveland | last post by:
I am working on some JavaScript that dynamically adds rows to a table in response to a button click. A new row does appear on the screen when the button is clicked. However, that table to which a...
10
by: Trevor | last post by:
Hey, I am trying to do this tutorial on the microsoft site : http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dndotnet/html/usingadonet.asp I can get everything to work up to...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
2
by: Muzzy | last post by:
Hi, I've used information on these newsgroups to build many pages. So I thought that now that I have my script working (something that I've been working on for about a week), I should post it so...
4
by: Gregory Gadow | last post by:
If there is a more appropriate forum, please let me know and I will post there. Our field reps can go on to our website and select from several sets of data to create the address we then provide...
4
by: prosad | last post by:
hello, Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below: ...
1
crystal2005
by: crystal2005 | last post by:
Hi i encounterd some problem when i implement CSS for rounded Corner table. Need help please... :D <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />...
2
by: gubbachchi | last post by:
Hi all, I have a problem with css table. The code below works fine with firefox but the problem is with Internet explorer. This code actually fetches data from mysql database and display it in...
3
by: azegurb | last post by:
hi I have just took from internet dinamic table. this table is dynamic and its rows dynamically can be increased. but i would like how create SUM function that automatically sums each added row...
5
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.