|
Remember that the file which loads the contactform has to be in the same folder as your Contacts.ashx. Or else it won't work (404, file not found)
If it's not in the same path/folder you have to change the action-attribute in the form-tag.
--------------------
When Chuck Norris' dreams come true, your worst nightmares begin.
|
|
|
|
|
Hi All,
I have my first SOAP project coming up soon and really need some clarification on how the communication part works. More specifically, I need to consume data from a web service using SOAP. So, maybe it's more of a web service question than SOAP, I am not really sure. Here is what I have gathered so far about the communication aspect from reading and looking at code examples.
All SOAP web services provide a WSDL file. Using this file you can generate client side code by using wsdl.exe or SvcUtil.exe. You can also add a pointer or URL to the WSDL file as a service reference and access the methods that way. I have tinkered a bot with these things and produced the files. This part makes sense to me. The part I don't understand is how as a developer are we to know HOW to use the code produced ? An example would be this. In my upcoming project the 3rd party who owns the SOAP based web service provided a couple of very small code examples. In these examples a couple of the methods take string values as parameters. In the example, there is no way on earth I could know what values goes into these parameters. They appear to be things the their developer has a switch statement in the server code or something where he/she decides to do something based on what he/she receives as a parameter value but how the heck am I suppose to know what to send ? I am not talking about something intuitive like "yes" or "no", these are parameter values like "EU ROHS|REACH SVHC (46)". And I have to assume if you miss the pipe, it doesn't return the right result. So how on earth could I know the format without any documentation ? So, my first instinct was that they MUST PROVIDE documentation on how to use it. That makes sense. Well, while I am waiting for the project to ramp up I thought I better start getting more familiar with this topic. I started reading and looking at code snippets and from what I can tell, this seems to be pretty typical. Someone writes a web service and you, as the consumer, should just know how to use it. No documentation is provided like you would typically receive with a proprietary API. So this makes me think I am missing something. Is there something that I have not read about where you can figure out how to use a service without the need for any documentation ? Some way to figure out that (in SOAP anyhow) this tag accept these 5 values, and this tag accepts these 3 values. I don't understand how as a consumer I can know what to send in any particular tag. Is there something available to determine this like the way that the SOAP WSDL files can be used to produce client side code maybe ? I am very confused about this aspect of SOAP and web services.
Any insight would be greatly appreciated.
|
|
|
|
|
I not sure if this helps you.
But a Web Service is a way to get or post data to a web server, without using a page or form, in other words, you don't have to type the data in.
A Web Service can accept many different types of input, the most basic being JSON, and the most complex in my opinion is SOAP. XML is the basic foundation for packaging data to be sent or received.
Overall, to learn how to send and receive data to a web service, you start with learning how to create XML on the fly, and how to read back the XML, allowing for any element and value that may arise. Parsing the response elements is the hardest part.
SOAP is pretty interesting. I've seen some really huge WSDL files from FedEx, In which every possibility you can think of is built-in the file.
Some fields or elements are just populated with text, like a address, and others are enumerated, in which it can only be one of the defined values.
It's been awhile since I've work with SOAP, but You have to drop the SOAP file in your project somewhere, and make a reference to it, and load it as an object. And then goes through the object elements and populate them with your data.
Sometimes, a SOAP file can be hard to read, so you load it up in a viewer like Liquid XML, and it will give you a picture of the structure.
MrAurora wrote: values like "EU ROHS|REACH SVHC (46)"
I'm not sure what to make of that, looks like 2 choices, or several choices listed as parameters, seperated by |, split
MrAurora wrote: <layer>this tag accept these 5 values
Enumerated, only accepts those 5 possible anwsers, like multiple choice question on test.
MrAurora wrote: SOAP WSDL files can be used to produce client side code maybe
It's all server side code, designed to transmit from one server to another.
|
|
|
|
|
Thanks for replying ! Unfortunately, I am stuck with SOAP as this is what they offer for communicating with their service. I am familiar with the XML bit too. I've done plenty of that. I just don't get the enumerated bit.
jkirkerx wrote:
Enumerated, only accepts those 5 possible anwsers, like multiple choice question on test.
I understand that the value can be only one of 5 pre-determined values but how do I know what the 5 acceptable values are ? That's the problem I am having.
In your FedEx example, are you saying that when there are 5 acceptable values for a field, they should be defined in the WSDL file ? If so, that is the part I am missing. I do not remember seeing anything like that in the WSDL file provided to us but I will have to dig thru it again and see if I just missed it.
Also, after digging into the sample code (which is VERY small - just a few lines of code) provided to us by this 3rd party company I also see that in one line of code where he grabs a value from the returned data he parses an array and returns the 2nd element. Again, without any documentation how are we, as developers, suppose to know which element is the correct one ? It's one thing if you can see the source code or have documentation but seems to be impossible to just start coding away and when you come across an array just go "Yup, I'll use element 1". I don't understand how we could posible know that. Yet this lack of documentation appears to be the norm when it comes to these soap webservices. No documentation, just the WSDL.
Thanks again for replying. It's very frustrating for me not understanding how this works when I am so comfortable with coding in general...
|
|
|
|
|
It's been a while since I have done SOAP. This is a small sample from a vendor of mine, that I wrote to. SOAP is sort of an XSD format, this sample has the enumerators in it. Perhaps it just a better written SOAP file than what you have. I can't post the whole thing due to my contract with them.
You can see the enumerated values, in which it can only be those choices. Like I said, SOAP is sort of like XSD,but is called a WSDL file.
<xs:simpleType name="NotificationSeverityType">
<xs:annotation>
<xs:documentation>Identifies the set of severity values.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="ERROR"/>
<xs:enumeration value="FAILURE"/>
<xs:enumeration value="NOTE"/>
<xs:enumeration value="SUCCESS"/>
<xs:enumeration value="WARNING"/>
</xs:restriction>
</xs:simpleType>
I can write XSD off the top of my head, it took me years of practice to understand XSD, and soap is pretty similiar. I used Liquid XML Light when I started, in which they have a great GUI for designing and viewing XSD and SOAP files, plus you can run then, and create sample XML for testing to make sure you get the correct results.
MrAurora wrote: I also see that in one line of code where he grabs a value from the returned data he parses an array and returns the 2nd element.
The file could be globalized, and for your use, he grabs the 2nd value. Or it could be conditional, in which 2 sets of data exist. I do the same thing, in XSD, you have to define all data fields or elements.
My answer is generic, because I don't know what your using, PHP, ASP.net, Sun Java, I write in ASP.Net, and have never done XSD or SOAP in PHP.
I just know that in ASP.Net, I can load the WSDL file as a reference object, and can write out my XML in the proper format, and send it to a test server, that will respond with error messages, telling me what is missing, or is malformed.
MrAurora wrote: but seems to be impossible to just start coding away
Yes SOAP is frustrating, the first thing to learn is how to place the WSDL file in your project, turn it into an object,
Example:
In asp.net, you import the WSDL as a Web Service first, now you have a source
now you load the webservice as an object
Dim register As RegistrationService_V1.RegisterCSPUserRequest = New RegistrationService_V1.RegisterCSPUserRequest ' Build a Register CSP User object
Now you type register. and look for your first element, then you create a new instance of that element, and program the child elements of that element
register.WebAuthenticationDetail = New RegistrationService_V1.WebAuthenticationDetail()
register.WebAuthenticationDetail.CspCredential = New RegistrationService_V1.WebAuthenticationCredential
register.WebAuthenticationDetail.CspCredential.Key = Product_CredentialKey
register.WebAuthenticationDetail.CspCredential.Password = Product_CredentialPassword
When done packaging, you can transmit it, and your response will be the reply object. The transmission coordinates is built into the WSDL file. Regsiter is the SOAP WSDL file you built, reply is the response from the server, that is build into the SOAP file
Dim reply As RegistrationService_V1.RegisterCSPUserReply = registerUser.registerCSPUser(register)
response_writer = New StreamWriter(Context.Server.MapPath("RegisterCSPUser_Response.xml"))
response_serializer.Serialize(response_writer, reply)
response_writer.Close()
Now you parse out the reply object
Select Case reply.HighestSeverity
Case RegistrationService_V1.NotificationSeverityType.SUCCESS
Success = True
Credential_WebAuthenticationCredential_Key = reply.Credential.Key
Credential_WebAuthenticationCredential_Password = reply.Credential.Password
For Each notification As RegistrationService_V1.Notification In reply.Notifications
NotificationMessage = notification.Message
Next
It should be pretty close for PHP, same concept. Don't worry about the data, just get the framework going first, you can always call them or email them with your code, for help in the data part, or the response will say what's wrong.
|
|
|
|
|
Wow, you are the man. I really appreciate the response. Actually, I am using ASP as well so this is a perfect answer for me. I did figure out the bit about referencing the WSDL file as a service reference on my own before ever posting this question but I would not have known anything about registering it. I aprpeciate the tip about Liquid XML light too. This information should be very helpful. Thanks alot (thought I still do not see the enumeration values in the WSDL file !)
|
|
|
|
|
Don't worry if you have a poorly written SOAP file. You can always go and edit it to make it better, then send it back to them as egg in the face.
Since your using asp.net, I can help you then, just make another post. You'll probably need help parsing the response back from the server.
Have a great weekend!
|
|
|
|
|
I need a sample application with .net as a client and soap web services written in java. Authentication has to be done by passing the username and password in soap headers.
This soap headers has to be sent by .net, validated by java web services. upon the validation the actual functions has to be resulted out.
Please help me.
|
|
|
|
|
|
Hi everyone! In my SMS application, I need to send a list of phone numbers to a script on a web sever to be sent to the recipients
Recipients will be selected from a database on the client machine. The number of recipients is over 5000. Additionally, this can rise to over 10,000 some time to come.
Being a newbie in web programming, I would like to know how I can send all these phone numbers to the server. I read that GET method can send small amount of data with the POST method capable of sending large data. However, I do not know the limit to the POST method. Please help. Thanks in advance.
|
|
|
|
|
Looks like it is 8Mb max size for the POST method.
Refer: GET vs POST[^]
|
|
|
|
|
I'm a bit confused.
Do I understand that the client machine will be sending up to 5,000 phone numbers to a web server which will process messages to those recipients?
This is not a web page is it?
How about developing a webservice and send the data to the server using that? I don't of any limits on the size of a webservice data payload. You could also batch the phone numbers into chunks of 500 and call the webservice multiple times.
I just don't understand your problem. It's early monday morning and I'm just having my first cup of coffee.
|
|
|
|
|
It's not a web application David. It's a database application programmed in C# WinForm that does not usually require web access.
The only time web access is required is when a message needs to be sent to members enrolled on the system. Then I will need to send the phone numbers to a php script on a website that will send the message.
My problem now is how I can send all the phone numbers to the script at once. In this case the script will be called only once without calling it multiple times. That's the whole problem David. Any suggestion? Thanks.
|
|
|
|
|
If the list of phone numbers contains only the phone numbers (no delimiters, no other fancy characters) and is a simple newline-delimited text file, then it should be no problem sending it to the server, even with a range of phone numbers much, much larger than what you're talking about (I've actually created a text file with 50,000 numbers, in the format: +40 123 456 789. It took 840kb).
I also think you can set the maximum post size in the server's php.ini configuration file, if of course, you have access to it
EDIT: Yep, found it (in php.ini file), it's this:
post_max_size = 8M
Set this to whatever you need to (even though cases when you'd have to go beyond 8MB are quite rare)
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
Thank you for the clarification. I understand the problem now.
Based on the replies you have received, it appears that you should be able to post the data to the web server without any problems.
I'm getting the feeling that you don't have control over the website which processes the phone numbers and messages.
So, is the problem that you don't know how to create a POST request for the website?
Sorry if I'm not more helpful. Still trying to wrap my head around it.
|
|
|
|
|
I think you should worry about the post size last.
Sounds like there is already a mechanism for submitting phone numbers to the web server, if so, you should get the API for it, and write code that packages your numbers and transmits it as per the API indicates.
If there is not a mechanism, then you need to write one first, and make sure some one like me can't use the mechanism to capture your phone numbers, and then turn around and blast a phoney message to your subscribers.
Your post size is the least of your worries.
|
|
|
|
|
I folks:
I know that CGI is jurassic and before all of you call me lunatic, I must say that this question is only for EDUCATIONAL PURPOSES (in real cases I use JSP).
I'm trying to code a "Hello World" CGI in Java, and I'm unsucessful.
So I try the same job in C#. Both programs (C# and Java) are totally equal (line by line). The C# works and the Java don't.
Here's the code in C#:
namespace CGI_CSharp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Content-Type: text/html\n"); // the extra "\n" is needed
Console.WriteLine("<html>");
Console.WriteLine("<head>");
Console.WriteLine("<title>CGI - C#</title>");
Console.WriteLine("</head>");
Console.WriteLine("<body>");
Console.WriteLine("<h1>Hello World !</h1>");
Console.WriteLine("</body>");
Console.WriteLine("<html>");
}
}
}
In the browser URL I wrote: http://localhost/CGI_CSharp.exe and BINGO! The C# code WORKS !
Now the same code in Java:
public class CGI_Java
{
public static void main(String[] args)
{
System.out.println ("Content-Type: text/html\n");
System.out.println ("<html>");
System.out.println ("<head>");
System.out.println ("<title>CGI - Java</title>");
System.out.println ("</head>");
System.out.println ("<body>");
System.out.println ("<h1>Hello World !</h1>");
System.out.println ("</body>");
System.out.println ("</html>");
}
}
Now I've tried the URL:
http://localhost/java.exe%20CGI_Java
(as you know, the %20 is the space => (http://localhost/java.exe CGI_Java)
I get:
HTTP 404.0 - Not Found
So, I try again, now with a batch file (CGI_Java.bat) with a single line of text:
java.exe CGI_Java (content of the CGI_Java.bat)
And now, I try the URL:
http://localhost&/CGI_Java.bat
Now the browser shows:
C:\inetpub\wwwroot>java.exe CGI_Java
This is the prompt followed by the command I wrote in the batch file.
Can someone help me?
Thanks in advance.
|
|
|
|
|
With the batch file maybe redirecting the output?
http://www.robvanderwoude.com/battech_redirection.php[^]
Interesting topic, I imagine you are getting the 404 because you are expecting the CGI_Java to be passed as a command line argument. I don't think the browser works that way. Have never tried anything like this but wonder if any querystring variables would be passed as command args like...
http://localhost/java.exe?CGI_Java
???
|
|
|
|
|
Its needs to take the info the customer gives and send it to the company e-mail. there is an issue doing so and i dont know y so if anyone can help a.s.a.p. thank you.
Website in this code i typed as an example. its not the site im working on.
<center>
<TABLE BORDER="0" cellpadding="0" cellspacing="0" width="80%"><TR><TD>
<form method="POST" action="http://www.rs0226.com/php/fm.php" target="_top">
<input type="HIDDEN" name="recipient" value="support@Srs0226.com">
<INPUT TYPE="HIDDEN" NAME="subject" VALUE="Website Comment or Question">
<INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.rs0226.com/thanks.htm">
<INPUT TYPE="HIDDEN" NAME="required" VALUE="email,email_confirm,your_name">
<INPUT TYPE="HIDDEN" name="sort" value="through,your_name,phone,company_name,email,email_confirm,comments">
<TABLE BORDER="0" cellpadding="1" cellspacing="0" width="100%">
<TR><TD>
Name:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="your_name" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Company:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="company_name" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Phone:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="phone" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Email:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="email" SIZE="30" class="shadeform"><br>
</TD></TR><TR>
<TD>
Please confirm your email:<br></TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="email_confirm" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
How did you find our website?<br>
</TD></TR><TR><TD>
<select name="through" class="dropdown">
<option selected value="None selected">Please Select One ----></option>
<option value="AOLFind">AOL</option>
<option value="Ask_Jeeves">Ask Jeeves</option>
<option value="Google">Google</option>
<option value="Hotbot">Hotbot</option>
<option value="Lycos">Lycos</option>
<option value="MSN">MSN</option>
<option value="yahoo">Yahoo</option>
<option value="Friend">Friend</option>
<option value="Website">Another Website</option>
<option value="News_Group">News Group</option>
<option value="Magazine Newspaper">Magazine/Newspaper</option>
<option value="Radio">Radio</option>
<option value="Other">Other</option>
</select><br>
<br>
</TD></TR><TR>
<TD>
Comments or questions:<br></TD></TR><TR><TD>
<TEXTAREA NAME="comments" ROWS="9" COLS="35" class="textarea"></TEXTAREA>
<br><br>
<input type="submit" value="Send Info" class="button" onMouseOver="this.className='buttonon'" onMouseOut="this.className='button'">
<input type="reset" value="Clear Form" class="button" onMouseOver="this.className='buttonon'" onMouseOut="this.className='button'">
<br>
</td></tr></table>
</FORM>
If anyone knows of any banner making sites that make banners for FREE then please let me know.
|
|
|
|
|
You mean like this: CoolText[^]
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
yes thank you that is an awesome banner site. much thanks and ill be using that site alot.
|
|
|
|
|
Still need Help with the HTML and/or CSS "Contact Me" page (Prefer HTML but if not then ill give CSS a try...) its <b>not</b> letting me recive information from the costermers . would be VERY greatful if i could recive this much needed help . I need to Turn this Project in A.S.A.P. ...
|
|
|
|
|
System.InvalidOperationException: There was an error reflecting 'string'. ---> System.InvalidOperationException: There was an error reflecting type
'WebApplication1.Javawebservice.string'. ---> System.InvalidOperationException: Types 'WebApplication1.Javawebservice.string' and
'WebApplication1.Javawebservice.string1' both use the XML type name, 'string', from namespace 'http://www.w3.org/2001/XMLSchema'.
Use XML attributes to specify a unique XML name and/or namespace for the type.
at System.Xml.Serialization.XmlReflectionImporter.GetTypeMapping(String typeName, String ns, TypeDesc typeDesc, NameTable typeLib, Type type)
at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access)
at System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess)
at System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs)
|
|
|
|
|
Though you have not shared much on what were you trying to do and what the XML looks like, based on the stack trace it looks like there is duplicate nodes name.
Here:
Anuradhaanu wrote: Types 'WebApplication1.Javawebservice.string' and 'WebApplication1.Javawebservice.string1' both use the XML type name, 'string'
Read all about it here: MSDN: Deserialization Problems Caused by Duplicate Node Names[^]
Find the duplicate class and remove it. Similar thing happened[^] with him and he too removed the duplicate.
|
|
|
|
|
Good Day Guys
This is an MVC , JQuery, KNockout.js Question.
i have a Controller Action that is being Defined like this
[HttpGet]
public JsonResult SearchCars(string searchString)
{
string[] searchTerms = (searchString).ToUpper().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string[] searchTermSounds = new string[searchTerms.Length];
var list = (from r in Cache.CarSearchItems
select new Lightstone.UI.Web.LaceWebUI.Models.CarItem(r, searchTerms, searchTermSounds)).ToList();
var list1 = list.Distinct()
.Take(5)
.OrderByDescending(l => l.Hits).ToList();
return Json(list1, JsonRequestBehavior.AllowGet);
}
and i have a Jquery function that gets fired onkey up event is fired in a textbox like this
$(function () {
$("#txtSearchString").keyup(function () {
$("#txtSearchString").queue(function
() {
var _this = $(this);
_this.addClass("newcolor");
_this.dequeue();
});
if ($("#txtSearchString").val().length >= 3) {
var data = {}
data.searchString = $("#txtSearchString").val();
alert("Retrieving Data");
$.getJSON("/Cars/SearchCars", data, function (result) {
var viewModel = null;
viewModel =
{
SearchOptions: ko.observableArray(result)
}
alert("Done Retrieving Data");
if (viewModel == null || viewModel == undefined) {
alert("The ViewModel is null or Undefined");
alert("Done with the View Model");
}
else {
ko.applyBindings(viewModel);
alert("THe View Model is no Null");
}
});
}
})
});
dont mind my alerts i use them to check the code reaches the place that i want it to reach. I can get the Jason the first time and this is the order of my alerts
alert("Retrieving Data");
alert("Done Retrieving Data");
alert("THe View Model is no Null");
and then i bind the data to my HTML view as depicted below
<table id="tblsearchresults" data-bind="foreach:SearchOptions" class="auto-style1">
<tr>
<td rowspan="5">
<img data-bind="attr: {src: Url}" class="" />
</td>
<td>Make:</td>
<td>
<div data-bind="text: Make">
</div>
</td>
<td> </td>
</tr>
<tr>
<td>Model:</td>
<td>
<div data-bind="text: Model">
</div>
</td>
<td> </td>
</tr>
<tr>
<td>Year:</td>
<td>
<div data-bind="text: Year">
</div>
</td>
<td> <a data-bind="attr: { href: UrlRedirect }">
View Report</a>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
and i see the data when i search for the first time and the images appears nicely and then the Problem start when i change my search string lets say i now type "FORD"
<input id="txtSearchString" name="txtSearchString" class="searchText" />
and it does not return results, when i look at the F12 debugging tool in chrome it point to my JavaScript in the following line
ko.applyBindings(viewModel);
and in my
Uncaught Error: NOT_FOUND_ERR: DOM Exception 8 knockout-2.1.0.js:46
a.e.Fa knockout-2.1.0.js:46
a.a.Oa knockout-2.1.0.js:81
a.Fb.a.h.disposeWhenNodeIsRemoved knockout-2.1.0.js:75
e knockout-2.1.0.js:34
a.h knockout-2.1.0.js:36
a.Fb knockout-2.1.0.js:75
a.c.template.update knockout-2.1.0.js:76
a.c.foreach.update knockout-2.1.0.js:66
a.h.disposeWhenNodeIsRemoved knockout-2.1.0.js:51
e knockout-2.1.0.js:34
a.h knockout-2.1.0.js:36
d knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
a.xa knockout-2.1.0.js:52
(anonymous function) AutoCompleteResults.js:33
jQuery.Callbacks.fire jquery-1.7.2.js:1075
jQuery.Callbacks.self.fireWith jquery-1.7.2.js:1193
done jquery-1.7.2.js:7538
jQuery.ajaxTransport.send.callback jquery-1.7.2.js:8324
So everytime i do my search for the first time it works but for the second time it does not.
One other solution that i need is to delay the call of the keypress for 250 milliseconds.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|