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

recquires 2 clicks to activate buttons

hey guys, i'm trying to make a simple web service(it returns a string that
says "Hello World") and i can call it, have all the javascript i need for it
that i am aware of, but the fist time i push the button it doesnt do anything
but the second time it works, then it will work randomly from then on. i
could go 4 or 5 clicks and have it work perfectly then for some reason it
will stop working for a click. heres the code

<SCRIPT language="JavaScript">
<!--
// All these variables must be global,
// because they are used in both init() and onResult().
var iCallID = 0;
var intA = 5;
var intB = 6;

function init() {
service.useService("Service1.asmx?WSDL","test");
}
function test(){
iCallID = service.test.callService(svcResults,
"HelloWorld","Synchronous Call");
}

function klar(){
document.Form1.fileContents.focus();
}

function svcResults(result){
if((result.eror)&&(iCallId==result.id))
{
var xfaultcode= result.errorDetail.code;
var xfaultstring=result.errorDetail.string;
var xfaultsoap=result.errorDetail.raw;
document.Form1.fileContents.value="errorcode"+xfau ltcode+"\n \n error
string"+xfaultstring+ "\n\n soap raw"+xfaultsoap;
}else if((!result.error)&&(iCallId=result.id))
{
document.Form1.fileContents.value+=" "+result.value;
}
}

//-->
</SCRIPT>
</HEAD>
<body onload="init()" >
<div id="service" style="BEHAVIOR:url(webservice.htc)"></div>
<form id="Form1" onfocus="klar()" method="post"
encType="multipart/form-data" runat="server">
<textarea name="fileContents" onfocus="test()" style="WIDTH: 288px;
HEIGHT: 224px"></textarea>
<input type="button" onclick="test();" name="btnSubmit" value="Submit
Query">
<input type="button" onclick="klar();" name="btnclear" value="klar">
</form>

</body>

i tried to make it work on page load since the goal is to make it callable
programatically(sp?) but it says system.test is null or not an object when i
try taht (btw the klar button has the same problem as the submit query button
it just has a round about way of getting to the function

thanks in advance for your help

john
Nov 23 '05 #1
0 927

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: June Homer | last post by:
I have a form which has its activate event set to maximise the form. This used to work but no long does. I have put a breakpoint in the Activate event and it is never trapped. The form is opened...
3
by: Salad | last post by:
I have a form with a few command buttons. These command buttons open forms. In the OnActivate event of the main form I put in the line msgbox "Activate" When I press a button to open a form,...
3
by: ACaunter | last post by:
Hi all, i was wondering why my buttons need 2 clicks to work. first time it just refreshes the window, and then the second time it will work... I am using ASP.NET and webforms buttons.... The...
0
by: John | last post by:
hey guys, i'm trying to make a simple web service(it returns a string that says "Hello World") and i can call it, have all the javascript i need for it that i am aware of, but the fist time i push...
5
by: mayur_hirpara | last post by:
Hi, I have been developing web applications for a while now. However, as I was thinking through the architecture I really don't understand the "How server can identify between which buttons has...
3
by: Syswatch | last post by:
Hi out there... I am pretty new to javascript, and is looking for some help here. I have a problem, I need a small javascript, which checks if there is any text in my textarea, and if it is NOT...
2
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
2
by: Radu | last post by:
Hi. I have a page with the following html: __________________________________________________________ <h1>Dynamic Controls Test</h1> <hr /> <asp:TextBox ID="txtProduct1" Text="txtProduct 1"...
4
by: jonny | last post by:
I would like to add a password and user name to my website. If the username and password is correct than activate the hyperlinks and buttons. Could you please share some code how how to achieve...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
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.