473,408 Members | 2,734 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,408 software developers and data experts.

Immedi :Code works in IE but not in any other Browsers(Tested in Mozilla/Not working)

Please Help me in this

My Code is
----------------
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="Fi._Default" %>
  2.  
  3. <html>
  4. <head>
  5. <title>Member Login</title>
  6. <script type= "text/javascript" language="JavaScript">
  7.     function submitTheForm() {
  8.         var XmlRequest = '<%= XmlRequest %>';
  9.         var URLRequest = '<%= URLRequest %>';
  10.  
  11.         document.getElementById("XMLPost").value = XmlRequest;
  12.         //XmlRequest = document.getElementById("XMLPost").innerText;
  13.         document.frmPass.method = "post";
  14.         document.frmPass.action = URLRequest;
  15.         document.frmPass.submit();
  16.     }
  17. </script>
  18. </head>
  19.  
  20. <body onload="submitTheForm()">
  21. <form  action="" name="frmPass" >
  22. <table border="0" align="center" width="600" cellspacing="0" cellpadding="0">
  23. <tr><td>
  24. <textarea name="XMLPost" rows="25" cols="80"></textarea>
  25. </td></tr>
  26. </table>
  27. </form>
  28. </body>
  29.  
  30. </html>
here iam posting my XML data to other URL(http://wonderworld/xxx.aspx).

Iam having Issue with document.getElementById.
It works fine with above code in IE but nothing happens in FireFox.

When I place all the xml below text area and use a submit button it works.

I used InnerText,value,innerHTML all all properties but no use.

Also I used type="application/javascript"

Thanks in Advance.
Feb 12 '09 #1
4 1446
RamananKalirajan
608 512MB
Hi, in the form you are having the name attribute but not the id attribute. Incude id attribute. Hope it will resolve the problem..

Expand|Select|Wrap|Line Numbers
  1. <form name="frmExample" id="frmExample" action=".....">
  2.  
Regards
Ramanan Kalirajan
Feb 13 '09 #2
I Tried using the id field in form tag.
But It didnot help me.

Any One please Help
Feb 17 '09 #3
I Got This Worked after I tried using the id attribute in TextArea Tag.


Thanks a Lot Ramanan for giving me an Idea and Thought.

And Thanks to All who Viewed my Post.

Iam Posting the whole code below which works on IE,Safari and FireFox.

---------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="terriblev._Default" %>
  2.  
  3. <html>
  4. <head>
  5. <title>Member Login</title>
  6. <script LANGUAGE="JavaScript">
  7.     function submitTheForm() {
  8.         var XmlRequest = '<%= XmlRequest %>';
  9.         document.getElementById("XMLPost").value = XmlRequest;
  10.         document.frmPass.submit();
  11.     }
  12. </script>
  13. </head>
  14.  
  15. <body  onload="submitTheForm()" bgcolor="#D2E4FC">
  16. <form  action="https://www.terrible.com/default.aspx" name="frmPass" method="post">
  17. <table border="0" align="center" width="600" cellspacing="0" cellpadding="0"
  18.  
  19. <tr><td><textarea name="XMLPost" id="XMLPost" rows="25" cols="80" readonly="readonly" style="visibility:hidden">
  20. </textarea>
  21. </td></tr>
  22. </table>
  23. </form>
  24. </body>
  25. </html>
Feb 17 '09 #4
Dormilich
8,658 Expert Mod 8TB
note: <script> should be served with a type attribute, and attribute names should be lowercase.

PS: maybe you are interested in the event handlers (addEventListener(), removeEventListener()), it makes up for cleaner HTML mark-up.
Feb 17 '09 #5

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

Similar topics

3
by: mr_burns | last post by:
hi, i am using the following code which works well in internet explorer but not in firefox (and perhaps others too): var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false";...
6
by: christian9997 | last post by:
Hi I would be very helpful if someone could help me with this code. It works fine in IE but when I display it in Netscape or Firefox and I move the mouse from one menu to the other the gap...
2
by: Jonathan Smith | last post by:
I am using the following code in 2 separate sub routines: Dim xlApp As New myExcel.Application Dim xlBook As New myExcel.Workbook Dim xlSheet As New myExcel.Worksheet xlBook =...
1
by: Piyush Daiya | last post by:
Hi All, I have this following code which works fine in 1.1 but gives runtime exception 2.0:- Reflection Code to get One Property from COM Object ...
10
by: Mike | last post by:
I have code that is doing some updating to a record. Its getting the ID to update from the Grid. I'm passing an INT to my method to update the record. My code is working though I'm still getting an...
26
by: Jenitha S | last post by:
Hi, I am working in JSP code.A Menubar is displayed in JSP page.It's working fine in IE. But in case of firefox the very first menuitem is not working.If i move that menu item as second means it's...
3
by: easygeeza98 | last post by:
Hi Folks Iam a newbee to the forum and am having a few problems with Access. Have any of you seen this before in Access 2003. I have two subforms based on separate queries. I use a mixture of...
3
by: kepskp | last post by:
i just write code for select option in combo box which i m select but when i press search button and then click on back button then there in no option selected. and that same code working in ie7 and...
2
by: Taftheman | last post by:
Hi, I have created a pop up using js and returns a value for me to process. I have got it working. I now need to do it again for another button. The value return will be processed differently. But as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.