473,388 Members | 1,002 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,388 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 1444
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: 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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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...

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.