|
|
I haven't tested it but I believe the problem you are likely running into is that the textbox has input area so if you click that area and try to drag, you are in control of the textbox not the div. You need an element that you can drag, maybe put an image to the left of the textbox or something like that. But trying to drag inside a textbox will just highlight the text.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have an array of strings and want to locate each array's string that begins with another string. (ie)
array arr = new array("computer, condor");
var str1 = "con";
?
How do I find out which array element string begins with str1 ("con")?
Thannks,
Steve Holdorf
|
|
|
|
|
There is no automatic functionality for this, that I know of, you need to do it yourself.
Approach 1:
1. Store your strings as JSON;
2. Use $.each on the JSON to iterate through each element and find the ones you need.
Approach 2:
Just iterate through the list of strings yourself, comparing each element on that condition.
|
|
|
|
|
|
I am trying to create a simple autocomplete textbox control. Now, in a hidden field I have text: "computer communication condor" and I have a textbox control that I am using a javaScript RegEx object to do the search; however, no partal or full matching is occuring. The code is below. Can someone help me out?
function javascriptOnTextChange() {
var string1 = document.getElementById('<%=txtSearch.ClientID%>').value;
var string2 = document.getElementById('<%=HiddenFieldSearch.ClientID%>').value; ;
var pattern = '/' + string1 + '/gix';
alert(pattern.exec(string2));
Now, if I type in 'com' that alert box should find the first occurance of the match (i.e. computer) however the alert shows null.
Thanks,
Steve Holdorf
|
|
|
|
|
Not a precise answer to your question, just to share my experience of using Autocomplete object from jQuery UI - it worked just fine, and was very easy to use.
Link: http://jqueryui.com/demos/autocomplete/[^]
|
|
|
|
|
I have upload control button and when i load a file from the computer then i need to read the content of the file and then it will be pasted in to the editor.
is it possible if possible please provide me the possible solution
Thanking you
|
|
|
|
|
Hey I needed this functionality a few weeks back and I came across these ready-made-plug-in's
Multiple File Upload, Single File. I know its kinda cheating but you can disect the code to understand how it works.
|
|
|
|
|
Hey everyone, I'm currently updating a project that is to be honest a bit dated, Data access layer is in c# and screen tier is in vb(dont't ask me why). Anyway for validation you always need to postback to validate data an that, I have started using jquery (which is cool by the way) for validation and I have it working for general data i.e invalid lenght, characters etc...., I'm just wondering how to get jquery to connect to the db to see if say the name in the textbox already exists??
Cheers
|
|
|
|
|
I don't get it why you need to do this in jQuery, if you already have C# in the back-end...
You would, either way, need to do a post to implement such request, and implementing it in C# is the easiest thing to do. Invoking C# action from jQuery is very easy, there are plenty of examples about it in the internet.
|
|
|
|
|
Was kinda thinking when the page firsts loads that I could some way store the values that were in the db and then if the user entered one of those values that jquery would present the user with a message to say this name already exists. I already have validation working for valid emails, lenght etc..
|
|
|
|
|
Preloading the complete list of valid values probably isn't the correct approach; for one thing, it could be quite large, and for another, do you really want users to be able to see all the values in this table?
Doing an AJAX lookup at an appropriate time (send something like checkValue?typed=whattheusertyped to a simple server-side script), i.e. when they tab out of that field or pause typing for half a second, or something like that, seems like a better solution to me.
|
|
|
|
|
Validation against pre-fetched values is a heavier operation than server-side validation. You should just go for the latter as a much better standard It will be one short post instead of sending a whole list of records into the browser.
|
|
|
|
|
Hi,
I am trying to remove get some url's from a site using opera userjs feature. The problem is that the site uses the following syntax to set td background:
<td background="http://www.test.com/test.jpg" style="border:2px solid #CCCCCC; background-position:center; background-repeat:no-repeat;">
Edit: i dont't know why cp replaces some things:
1) td removed -> td background
2) background-removed -> background-position
I can access the style attributes just fine, but i cannot get the value of the background image.
I try to use it like this (prints undefined):
alert(img.parentNode.parentNode.background);
This works (but does not give me what i need):
alert(img.parentNode.parentNode.style.background);
How does the last one even work, i cant find the .background attribute from w3schools, i see that background-image attribute is available.
But mainly, how to get the td background=... value?
Thanks
|
|
|
|
|
try background-image. or use jQuery and do $("#id").attr("backround-image")
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi. I want to send XML data from a windows Gadget to a aspx.net server. What is the best way to do it?
This is what i have so far, thank you
PS: I can't use submit forms. My gadget disapears and a small white square shows up instead.
var xmlString = "<info>" +
" <FirstName>" + escape(first) + "</FirstName>" +
" <LastName>" + escape(last) + "</LastName>" +
" <PhoneNumber>" + escape(phone) + "</PhoneNumber>" +
"</info>";
|
|
|
|
|
|
If any one has problem in Google or Bing maps using javascript. kindly let me know
Regards
H.esh
|
|
|
|
|
Because?
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
Beacause it will help others if they have any issue regarding it.
|
|
|
|
|
You seemed to have missed the concept of this site.
The usual modus operandi on CP is that somebody who has an issue with something programming related, posts a message describing the problem in detail and what they already tried and so on. The CP members then try to assist the poster to resolve the issue.
Declaring you know something about javascript and google maps and bing is neither helpful nor interesting.
If you think you know enough about that topic write an article and publish[^] it here on CP.
Regards,
Manfred
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
ok Manfred. I didn't mean that what you thought but anyways thanks for the suggestion.I will surely look upon that
|
|
|
|
|
I haven't yet written any aritcles here on CP, but I did have two alternates to existing tips.
If the material isn't enough to warrant an article you can post a tip instead.
Cheers!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|
|
i have enough material and sample code and i would prefer writing an article
Thanks anyways
|
|
|
|