|
What is the signature for your GetFVRSVoter() method?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I'm wondering if I'm wasting my time here.
History: Our vendor created this service and also gave us a web site where everything works, but he never gave us access to the WSDL. My employer wanted it to do something different, so asked me to extract the functionality and use it in our own web site. So I don't even have a signature, I am just copying out what is in the vendor's JavaScript file. Is doing something like that even possible? Or am I running in to cross-site scripting problems? This could be something entirely different.
But when I run the same script in the vendor's web page, Fiddler shows the data being sent and so when mine gets called and no data is sent, I am just hoping it is me doing something wrong instead of me trying to do something impossible.
Thanks
Brent
|
|
|
|
|
Thanks for the additional info. It is possible you are having cross-site issues; however, I believe the error function is called when that happens.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It may be a proxy authentication problem. I managed to get it working in c#, but had to use proxy authentication.
How would I do proxy authentication for this in javascript?
Brent
|
|
|
|
|
dbrenth wrote: How would I do proxy authentication for this in javascript? Not sure. I haven't had to do that in JS but here's the documentation for .ajax, http://api.jquery.com/jquery.ajax/[^]. If it can be done it would be using one of those properties, perhaps the headers.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
dbrenth wrote: Or am I running in to cross-site scripting problems?
That's the most likely issue - cross-domain AJAX requests won't work without making changes to the server you're calling. You would either need to change the service to use JSONP[^], or set the Access-Control-Allow-Origin header[^] on the server to allow calls from your site.
If you don't have access to the server that's hosting the service, there's nothing you can do from the client side. You'd need to write your own service to proxy calls to the remote service for your site. The client-side code would call your service; your service would then call the original service, and return the results to the client.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I have an ASP.NET AJAX site using a Master Page where a first page executes a cross-page postback to a second page. The first page has an AJAX update panel that contains the input and results. The second page receives the input and some output and displays more results. I have a rather crude way to achieve this. I use a button outside the update panel to first postback the whole page to update it. A second button then is used to call the second page thus:
onClient_Click="window.document.forms[0].target='_blank';" PostBackUrl = "page2.aspx"
The second page opens in a new tab. I want a new window, but can't seem to achieve this. Also, when returning to the first page, the user must refresh it through the browser, then it becomes active again. I would like this to happen without user actions. I can't find the answer anywhere. The actions I want to achieve is to have one button to click that posts-back the first page then loads the second page in a new window. On return to the first page, I want it to refresh in the state that it was before the cross-page postback without user interaction. I appreciate help and advice. There must be some way that this can be achieved by calling one or more javascript functions that do this with a single click. I can use javascript, but I am a novice. Snippets are difficult for me to interpret.
Thanks
Bobby
|
|
|
|
|
Hi All,
I have two columns of text boxes on a table in a web page, client side validation is implemented on left side text boxes on all of them, but on right side I want to add validation on only those text boxes that have value in the left side text boxes.
For example user has entered values >0 in first two text boxes and entered 0 on other two text boxes on left column, then on the second column first two text boxes should become required and other two text boxes shouldn't using
Can somebody please help me in resolving this situation any help a link or suggestion or code snippet would be helpful, please help me thank you.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Something like this maybe.
("#textbox").validate({
rules: {
txt1: {
required: function () {
return $("#leftTextbox").is(':not(:blank)';
}
}
}
}
|
|
|
|
|
Awesome thank you.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I have the following code in my website.
<div class="divColumn">
<div>
<img alt="Flags - Flagstick Locks" width="150" height="94" src="images/flagstick_locks.jpg" />
<br />
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(
url, 'popUpWindow', 'height=500,width=600,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')}
</script>
<a href="JavaScript:newPopup('/flagstick_locks_buy.aspx');">Flags - Flagstick Locks (Pair)</a>
</div>
</div>
This should display a popup window, and everything works fine when running as localhost on my PC. However, when I upload the page to my hosting company, the code returns a 404 error - The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
I have double checked my files have been uploaded and they have, so why am I getting this error.
Any suggestions greatly appreciated.
Thx
|
|
|
|
|
Hi All,
I have a ListBox, it is displaying items just like a dropdown, may be they are able to do it by using jQuery, I am maintaining the application and not familiar with jQuery. The ListBox displays first time when we put focus on it or by clicking mouse in the list box area, it displays all items normally, if once we select any item from the list and keep the cursor in the same area without firing the blur, then the ListBox is not displaying the remaining items, to display the remaining items to select the user has to keep focus out of the list box then only it displays the remaining items.
Do anybody have any idea to resolve this, I am using Chosen.Jquery.js for the list box, I a don't know how list box behave like a dropdown and how jquery works but I am able to debug by using developer tools, please help me any help like a link or a suggestion or a code snippet can be very helpful and much appreciated. Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I'm confused here.
A dropdown is like a 1 line textbox, and with focus, will present a list of items below the textbox.
A listbox is like a multi row textbox in which you can set the height, and can be scrolled to view the list of items.
They have option elements that make up the the items.
So your saying which one displays first?
FYI
I dumped all my listbox elements last year and replaced them with radio button list.
I noticed over the years, that the listbox is dead.
Now if I need a listbox, i just create a panel, and populate it with more panels that scroll vertical,
|
|
|
|
|
Sounds good, thank you for your information, yeah I appreciate your help and every one has different approaches to write UI code, that's why I hate client side scripting all in total, I don't prefer it if I architect and application, try to do a lot using server side controls rather than client side, the other reason it is irritating is client side scripts don't have a nice debugger to see what's going on, IE developer tools is the worse.
but I resolved the issue, it was in jquery file the error was, once we select an item it was just hiding the other ones until blur fires, I removed that hiding so the 2nd item is visible after selecting the first until we blur from there that should be the expected behavior.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I shifted most of my code to the client side about 3 years ago. I use to write just server side code, but it was too much traffic to the web servers. So I decided to just use the clients CPU and memory instead.
If you didn't write it, it's hard to fix. There's a lot of sloppy jquery out there. The there are layers and layers of div elements on top of each other, and finding the right one is hard to do. Firefox inspect element is pretty good, you can change the values of HTML in the DOM, and see the results instantly to get an idea of what to look for.
You pretty good with responsive designs?
I know you have been coding MVC for years now, I'm going to start my first MVC project this week.
Wondering if the technology is worth the investment in time. Sometimes Microsoft makes things that die in 5 years, like Silverlight.
|
|
|
|
|
Greetings gurus,
We have a fieldname called descriptions.
All comments are entered into a textbox and submitted to the database.
Problem is that sometimes, comments in the descriptions text box are copied directly from Microsoft Word with quotes and dashes.
These quotes are either single quotes (‘ ’) or double quotes “ ” and in some cases, dashes (-).
In our jquery code, I have this:
myData.descriptions= $("#descriptions").val(); among many fields.
Is there anyway to convert those MS smart tags to normal tags so when my users copy from Word and paste, those tags get converted to normal tags?
Thanks a lot in advance
modified 26-Jan-15 18:50pm.
|
|
|
|
|
This might help:
Javascript:
var replaceWordChars = function(text) {
var s = text;
s = s.replace(/[\u2018\u2019\u201A]/g, "\'");
s = s.replace(/[\u201C\u201D\u201E]/g, "\"");
s = s.replace(/\u2026/g, "...");
s = s.replace(/[\u2013\u2014]/g, "-");
s = s.replace(/\u02C6/g, "^");
s = s.replace(/\u2039/g, "<");
s = s.replace(/\u203A/g, ">");
s = s.replace(/[\u02DC\u00A0]/g, " ");
return s;
}
C#:
public static string ReplaceWordChars(this string text)
{
var s = text;
s = Regex.Replace(s, "[\u2018\u2019\u201A]", "'");
s = Regex.Replace(s, "[\u201C\u201D\u201E]", "\"");
s = Regex.Replace(s, "\u2026", "...");
s = Regex.Replace(s, "[\u2013\u2014]", "-");
s = Regex.Replace(s, "\u02C6", "^");
s = Regex.Replace(s, "\u2039", "<");
s = Regex.Replace(s, "\u203A", ">");
s = Regex.Replace(s, "[\u02DC\u00A0]", " ");
return s;
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard,
Thank you very much sir; exactly what I was looking for.
|
|
|
|
|
Hi,
I have couple of divs and spans are inserted within one another, but in a particular situation I want to make inner div visible or show when outer div is hidden or invisible. Please help me with this regard. Here is the code snippet for it.
Where the condition if (event.target.checked) outer div WaitListDiv is hidden and then I want to show the OptOutDiv inner div, but it is not showing up, please let me know if there is anyway to resolve this issue. I have tried all those options which are commented and un-commented. When I tried with the code OptOutDiv.show("fast"); then it gave me error "uncaught typeerror undefined is not a function" on the browser debugging.
Thanks in advance.
Here is the element
<div class="my-section" id="WaitListDiv">
<p>
It is recommended that this child be placed on a waiting list as soon as possible. This allows all ELMS
users at the Waiting List site(s) the ability to provide services to the child in a more timely fashion.
</p>
<div id="OptOutDiv">
<asp:CheckBox ID="chkOptOut" runat="server" Text="Parent Does Not Wish to Add Child to Waiting List" AutoPostBack="true" />
<span id="spnOptOutReason" runat="server">
<asp:Label ID="lblOptOutReason" runat="server" AssociatedControlID="txtOptOutReason" Text="Reason:" />
<asp:TextBox ID="txtOptOutReason" runat="server" DataField="OptOutOfWaitListReason" DataType="PrescreenData" />
<asp:Button ID="btnSaveReason" runat="server" Text="Save Opt Out Reason" />
</span>
</div>
<elms:AvailableWaitingLists runat="server" ID="waitList" />
</div>
Here is javascript/jquery code
optOut: function (event) {
var waitListDiv = $("[id$='grdWaitList']").closest("div.my-container");
if (event.target.checked) {
waitListDiv.hide("fast");
var j = jQuery.noConflict();
j('#OptOutDiv').show("fast");
j('#spnOptOutReason').show("fast");
} else {
waitListDiv.show("fast");
$("[id$='spnOptOutReason']").hide("fast");
if ($("[id$='txtOptOutReason']")[0].value != "") {
$("[id$='txtOptOutReason']")[0].value = "";
ELMS.Common.sneakySave($("[id$='chkOptOut']")[0].name, true, ELMS.Page.sneakySave_Callback, ELMS.Page._originalOptOutCallback);
}
}
},
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
|
Please do not use these forums to advertise your articles, especially when posted on other sites. If you wish to publish it on CodeProject then read the Posting Guidelines[^].
|
|
|
|
|
Hello i i have this thing here http://jsfiddle.net/Trolstover/qxd32hkk/15/[^]
What i expect it to do is when you click on the Td element , it hide "..." and shows full word and vice versa , the problem is , that in my code it works randomly on elements, also if you fast click on elements , it gets bugged (it will show both "..." and full word at the same time)
How can i fix my code?
|
|
|
|
|
|
Hi , thanks for answer , try to click on one element multiple times , and also try all elements you will see the bug
|
|
|
|
|
It runs multiple times and blinks
I can't tell what the problem is, in other words the line of code at fault.
But I can tell you that it's sort of like non-async code, in which code runs straight through until it's done.
And your animation is like async, in which the animation must complete before the next line of code executes. You need some point of measurement to tell when the animation is complete.
I made a filmstrip and ran into the same problem. The principals are similar, but not the same.
[edit] - Consider my filmstrip, details in the article.
Display Advertising Filmstrip[^]
modified 16-Jan-15 13:04pm.
|
|
|
|
|