|
how i can parse the jquery json object to data in asp.net..
here is my client side test code
********************************
var prdnameArray = new Array();
prdnameArray[0]="Saab";
prdnameArray[1]="Volvo";
prdnameArray[2]="BMW";
var prdamountArray=new Array();
prdamountArray[0]="456";
prdamountArray[1]="789";
prdamountArray[2]="678";
var data = {
"sales": [
{"prdnameArray":prdnameArray},
{"prdamountArray":prdamountArray}
]
}
alert(data);
//alert(data.sales[0].prdnameArray[0]);
$.ajax({
type: "POST",
url: "jsonIntro.aspx",
timeout: 5000,
data:data,
contentType:"application/json;charset=utf-8",
dataType:"JSON",
success: function(d) {
alert(d);
return false;
},
error: function(request, status, errorThrown) {
alert(status);
}
});
*************************************************
iam using stream reader to read the object and trying to parse using json parser...but always it shows error..
my C# asp.net code is like this.
****************************
System.IO.StreamReader sr = new System.IO.StreamReader(Request.InputStream);
JsonParser parser = new JsonParser(sr, true);
JsonObject obj = (JsonObject)parser.ParseObject();
JsonArray prdname = (JsonArray)obj["sales"][0];
Response.Write(prdname[0]);
*******************************
Anyone help me???
Thanks in advance...
|
|
|
|
|
Member 3801407 wrote: ...but always it shows error..
Since most of us are not mind readers here don't you think it would be a good idea to show the error you are getting?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes,off-course itz not a good idea to show the error..but i did it testing purpose only...Thanks for ur suggestion..
|
|
|
|
|
What suggestion?!?
I was trying to point out you are asking for help with an error, but not telling us what the error is!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hello friends......
as i am new to this programming in javascript i need ur help.
i have to make a desktop news ticker with the help of MioFactory v3.26 (http://www.mioplanet.com/products/miofactory/index.htm[^])
but what i need is the combination of two templates 1. SCROLLING ALERT and 2. DESKTOP TICKER. i know that its all about just copy and paste the javacripts given inside the templates.
what i need is the
1. DESKTOP TICKER with the features of SCROLLING ALERT that is whenever xml file is updated it automatically refreshes the contents and display the scrolling text (plz try to do this practically by downloading miofactory v3.26 from www.mioplanet.com).
2. also i get error message MESSAGE FROM WEBPAGE(a dialog box appears and displays information of xml file but it is not so in SCROLLING ALERT).
WAITING FOR A VERY POSITIVE RESPONSE.
REGARDS
|
|
|
|
|
I think you are looking for something like Server Push technology.
In case of Normal Http Request - Response, it is not possible simply. Rather I think you need to expose this feature through an HTTPHandler. You ping the handler using AJAX to get new response. Whenever new alert received, just place a floating div and write the content.
You can also adjust the scroll position, so that the Alert also scrolls down as you scroll the page.
|
|
|
|
|
thanks a lot sir for reply.....
but sir i want u 2 please use the miofactory once and then u will know that we dont need to know a much knowledge of programming.
all coding is done inside the engine itself. we just have to arrange according to our need.
i think if i will talk 2 u on phone then may b i will xplain u my problem in a better way. please mail me ur contact no. at -
dahras@gmail.com
it will b confidentially saved 2 me
|
|
|
|
|
Ok.. I will do that.
|
|
|
|
|
|
sir i am waiting for your contact information
|
|
|
|
|
I work in a call centre and was requested to make a web based schedule for agents working for the current day. This schedule can be edited by multiple managers at the same time. I want to know if there is a way for me to make it so once a manager makes a change it is updated on all the other managers computers. If there is a way then what technology combination should/could I use to accomplish this.
I am a software developer and took this project on as I don't have any real experience with web development other than making simple dynamic websites. So any help would be appreciated.
Thanks in advance,
KH
|
|
|
|
|
Yes you may use your web application to do this. Just whenever the manager places the alert, you need to update them to the database and when your webpage gets loaded, show the alerts.
You can also mail the alerts to all during this process.
Is this what you wanted?
You can also make a scheduler to show the current schedule for a user.
|
|
|
|
|
The schedule is shared by multiple users, so basically, everyone should see the same schedule at the same time. I basically want any change in one to notify all the other logged in users and update their schedule in real time. I was thinking of also having it show which agent is being edited by a different user, but that's after I get the main part working.
I was looking around the web and I think SOAP is required and I would need to create a web service to interact with that... Is that right? is that the only way? or do I have other options?
Thanks for the reply, much appreciated.
KH
|
|
|
|
|
I am inserting a custom SOAPheader to a web service call in a client application using the example described here by Jim Roth: SOAP Header Extensions How-To[^]
It works to the point where I can see the correct results come back all the way through the AfterDeserialize event. The problem is that the result gets set to null at the place where the call was made. For example:
var lvReceiptURL = new ReceiptURL();
lvReceiptURL = lveRETRService.getReceiptURLByReceipt(lvReceiptURLRequest);
lvReceiptURL gets set to Null even though I can clearly see in the SOAPExtension ProcessMessage that it did indeed return.
Thanks in advance for any help.
John
|
|
|
|
|
I m desinging webbot which Logins on faceBook site select Friends List and Have to delete contacts
I m having problem while delete List cause DeleteList is not a button in webpage and i dont know how to access and capture its even using webbrowser control plz help
|
|
|
|
|
Hi friends,
I am really stuck while embedding windows media player to my web page?
actually this is creating a lot of problem for me it is hiding my drop down menu. I am not able to get rid of this i have tried using windowlessvideo but it is not working in firefox. Any help will be appreciated
Please help if any one can help, as, it is very critical.
please provide link for some dynamic drop down which don't hide behind media player. it works fine for flash but not for media player in firefox.
Thanks in advance.
|
|
|
|
|
Have you tried setting the z-index (depth) of your page elements using css?
|
|
|
|
|
www.stylishorkut.com
Caution: do not go there!!!
|
|
|
|
|
If we dont go there, how could we know...
|
|
|
|
|
this is hilarious ...
Regards,
Ayan
|
|
|
|
|
Heh. True, but there actually is a way to be slightly more confident without visiting the site. See my other reply.
Narf.
|
|
|
|
|
Safe: This page contains no active threats.
Explanation:
It is safe to proceed to this page.
Domain:
IP Address: 174.120.10.188
Owner:
Name:
Address:
Country Code:
Scanned on: 11/09/09 18:26:02
(0.35 seconds to scan this page)
Ratings are provided by AVG. Site owners please contact AVG for questions.
I have not actually gone to the site. What I did was do a Google search for that URL, and my anti-virus scanner AVG automatically verified the Google results.
There may be some funky JavaScript or Flash crap that scares you, I don't know. Try disabling that stuff and revisit?
Narf.
|
|
|
|
|
Thanks Naruki,
This message is only for you and quadrilateral and not the other donkeys who posted. Until a few days ago it was flagged by google as an attack site. Seems like it is not any more so. See the following:
<a href="http://www.codeproject.com/Messages/3240154/Re-Can-you-tell-me-if-this-is-a-virus.aspx">http://www.codeproject.com/Messages/3240154/Re-Can-you-tell-me-if-this-is-a-virus.aspx</a>[<a href="http://www.codeproject.com/Messages/3240154/Re-Can-you-tell-me-if-this-is-a-virus.aspx" target="_blank" title="New Window">^</a>]
|
|
|
|
|
We've gone through the pain of integrating and heavily modifying CKEditor to replace our aging HTMLArea editor and in the end it's awful. The cursor disappears, the icons look fuzzy and horrible, the resizable window is incredibly flaky and it's a backwards step.
Can anyone recommend a browser-based WYSIWYG editor that works in all major browsers, and is flexible enough so it can be easily customised?
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
TinyMCE is the defacto-standard that most PHP applications default with. It has it's flaws as well, but it's better than FCKEditor, IMHO.
Second to that you might consider XStandard Lite (http://www.xstandard.com/[^])
It's an ActiveX/Java component though so I believe your users need to install something.
Second to that, many CMS type software are slowly offering/switching to Markdown as an alternative syntax to HTML, might want to check it out here:
http://en.wikipedia.org/wiki/Markdown[^]
There was a few editors a while back, but only one turns up right now and it's quite buggy in IE7...still the markup is so trivial anyone can write in it within minutes and it's converted to HTML on the fly, so you don't have to worry about XSS exploits sneaking in.
p.s-All web based WYSIWYG editors are crazy buggy, they all hack the hell out of the IWebBrowser2 component and each browser needs work arounds. Have you tried running in FireFox? Typically that browser fares best when it comes to working in WYSIWYG editors.
Cheers,
Alex
|
|
|
|