Click here to Skip to main content
15,913,055 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionaccessing to a control from other pages Pin
M.V29-Aug-07 23:58
M.V29-Aug-07 23:58 
AnswerRe: accessing to a control from other pages Pin
gauthee30-Aug-07 0:52
gauthee30-Aug-07 0:52 
AnswerRe: accessing to a control from other pages Pin
VenkataRamana.Gali30-Aug-07 1:46
VenkataRamana.Gali30-Aug-07 1:46 
GeneralRe: accessing to a control from other pages Pin
Urs Enzler30-Aug-07 7:18
Urs Enzler30-Aug-07 7:18 
QuestionSecond Post but no Reply (Webservice in Firefox) Pin
Abubakarsb29-Aug-07 23:39
Abubakarsb29-Aug-07 23:39 
AnswerRe: Second Post but no Reply (Webservice in Firefox) Pin
Sathesh Sakthivel29-Aug-07 23:49
Sathesh Sakthivel29-Aug-07 23:49 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb29-Aug-07 23:56
Abubakarsb29-Aug-07 23:56 
AnswerRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync29-Aug-07 23:58
Michael Sync29-Aug-07 23:58 
Abubakarsb wrote:
I am calling a .Net webservice in javascript by using "webservice.htc". It is working perfectly in IE 6 and 7 but unfortunately not in Firefox.


As I told you, *.htc doesnt work on non-IE browsers.

Abubakarsb wrote:
lease tell me solution how can I call a webservice using javascript in Mozilla Firefox browser?


Okay. you can call a webservice by using XMLHttpRequest Object..

Example ~

var req;<br />
var isIE;<br />
<br />
function initRequest(url) {<br />
    if (window.XMLHttpRequest) {<br />
        req = new XMLHttpRequest();<br />
    } else if (window.ActiveXObject) {<br />
        isIE = true;<br />
        req = new ActiveXObject("Microsoft.XMLHTTP");<br />
    }<br />
}<br />
<br />
//url will be Web Service URL.<br />
<br />
function CallWebService(url) {<br />
<br />
    initRequest(url);<br />
<br />
    req.onreadystatechange = processRequest;<br />
    req.open("POST", url, true);  <br />
    req.setRequestHeader("Content-Type", "text/xml");<br />
    req.send(null);<br />
}<br />
<br />
function processRequest() {<br />
    if (req.readyState == 4) {<br />
        if (req.status == 200) { <br />
            var message = req.responseXML; //Result in XML. <br />
        }<br />
    }<br />
}<br />
<br />


Note:
#1. The parameter called "url" of "CallWebService" method is the URL of Web Service.

#2. You should use "POST" if you wanna invoke the .NET Web Service. AFAIK, the .NET Web service used "HTTP POST" by default. If you wanna use "HTTP GET", you have to change the setting in Web.Config.






Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 0:10
Abubakarsb30-Aug-07 0:10 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync30-Aug-07 0:38
Michael Sync30-Aug-07 0:38 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync30-Aug-07 0:41
Michael Sync30-Aug-07 0:41 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 2:32
Abubakarsb30-Aug-07 2:32 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync30-Aug-07 3:08
Michael Sync30-Aug-07 3:08 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 3:57
Abubakarsb30-Aug-07 3:57 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 4:34
Abubakarsb30-Aug-07 4:34 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 4:45
Abubakarsb30-Aug-07 4:45 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync30-Aug-07 5:21
Michael Sync30-Aug-07 5:21 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 11:49
Abubakarsb30-Aug-07 11:49 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync30-Aug-07 15:19
Michael Sync30-Aug-07 15:19 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb31-Aug-07 0:32
Abubakarsb31-Aug-07 0:32 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync31-Aug-07 5:36
Michael Sync31-Aug-07 5:36 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Michael Sync2-Sep-07 16:24
Michael Sync2-Sep-07 16:24 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 1:31
Abubakarsb30-Aug-07 1:31 
GeneralRe: Second Post but no Reply (Webservice in Firefox) Pin
Abubakarsb30-Aug-07 1:33
Abubakarsb30-Aug-07 1:33 
QuestionRegular expression Pin
Mr.Sam29-Aug-07 23:35
Mr.Sam29-Aug-07 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.