15,909,539 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Trajan McGill (Top 13 by date)
Trajan McGill
27-Jun-14 11:36am
View
As the other solution points out, it is also possible that you meant to have the "];" *before* the AmCharts.ready() call, which is actually probably more likely, but I don't have any idea what AmCharts.ready() does or whether you mean to stick the results in the array you're creating or to call it after creating the array.
Trajan McGill
31-Mar-14 10:42am
View
Of course you can get the source code of an HTML file, because that's what is sent to the browser. The reason you can't get source for PHP or some other executable has nothing to do with ajax or jquery. It is because the server doesn't send the code, it sends the output from running the code, which is (usually) HTML.
Trajan McGill
27-Mar-14 10:18am
View
I'm not sure what you are trying to do with this:
image_path :'',slides : [ {image:'picture/1.jpg', title:<Script> showdate()</Script>,thumb:''}
those script tags are unnecessary, you're already in a script block. simply setting the title value to showdate() should work. Are you sure showdate() is working and returning a string successfully? You say it "does not work," but you don't say how it is failing.
Trajan McGill
24-Mar-14 11:18am
View
Actually, if the error is while setting job.RecruiterReference.UserName, an object reference not set error can't be for job.RecruiterReference.UserName-- he's setting the reference in that very line. It would have to be for job or for job.RecruiterReference. The former has been set in the line before, so the conclusion must be that just creating a new job() does not automatically set its RecruiterReference to anything, and therefore there setting the (missing) RecruiterReference's UserName property will fail.
Trajan McGill
24-Mar-14 11:07am
View
At what line is the error found?
Trajan McGill
24-Mar-14 11:06am
View
On what line are you encountering the error?
Trajan McGill
20-Mar-14 11:28am
View
What is the data type of that column in the database? You are trying to cast dr[3] into a DateTime, but perhaps you need to parse it into a DateTime instead.
Trajan McGill
18-Mar-14 12:32pm
View
The visibility style passes through just fine for me. I agree with RyanDev, the first step is to check the "trace" view (along with the regular style view) to see what styles are being applied and where they are coming from. You may have a CSS rule for #trIADMem that sets the display style to "block". And the visibility rule is disappearing altogether? Or you just didn't type it into the example? I suppose you could be messing around with the element's style attribute in the code-behind code in a way that removes that.
Trajan McGill
18-Mar-14 11:27am
View
Unsure what you are looking for. Can you explain how this is different than what you expect?
Trajan McGill
4-Mar-14 16:40pm
View
Sorry, wasn't looking closely enough before and failed to notice this was a web method.
Here's where we should really look. This line:
var date = new Date(parseInt(dataValues[i].Date.substr(6),10));
Can you do an alert box or something right there, something like:
alert(dataValues[i].Date);
That would tell us what the JavaScript is attempting (and failing) to parse properly.
Trajan McGill
4-Mar-14 11:21am
View
It would be helpful to know exactly how the dataList is being output. I assume there must be ASP.NET code that uses this dataList as a data source. Since that step of the process could well include formatting the output, it would be necessary to see that as well. Or, at least an example of a few lines of HTML output that the JavaScript is reading from. There are three places your problem could be arising: 1) the output is not formatted well to be parsed by the JavaScript; 2) the JavaScript isn't parsing the right thing or isn't parsing it the way you expect; or 3) the date is in fact being fully parsed but that google.visualization.DataTable object, whatever it is, is only showing the year portion and you need to mess around with configuring that to display the whole date and time.
Trajan McGill
18-Feb-14 9:49am
View
I'm not sure exactly what you're trying to accomplish, or what the GPDetails class or structure looks like, but I can tell you for one thing that the string you're putting in the jsonstring variable doesn't define an array. An array in Javascript looks like this:
"[1, 2, 3]".
You are building a string that looks like this:
"{'PostalCode':'12345', 'PostalCode':'23456', 'PostalCode':'34567'}"
and that is the definition of an object with the same property ("PostalCode") defined over and over again.
You may be intending to build a JSON string more like this:
"{'PostalCodes':['12345', '23456', '34567']}"
or possibly like this:
"{'PostalCodes':[{'PostalCode':'12345'}, {'PostalCode':'23456'}, {'PostalCode':'34567']}"
depending on what you're trying to do with the resulting array.
Trajan McGill
22-Aug-13 12:23pm
View
Reason for my vote of 3 \n This is a good thing to be aware of, but I disagree with your assessment that the C#/Java behavior is "insane". It is exactly what you'd expect if you think through the order of execution.
See, the fact that this is a virtual function doesn't really make any difference. Consider if the first line in your constructor is to call a (regular, non-virtual) method that relies on objects initialized by the second line in your constructor. Obviously that won't work. And because, in your example, the first line in the derived constructor is (implicitly) to call the base constructor, anything the base constructor does can't rely on things that are done later in the derived constructor.
Note that (assuming your Java behavior is correctly depicted) there's also one very big difference between Java and C# that has some bearing on this: member variable initializations that are part of the variable's declaration in C# happen before any other constructor code is run at all (and that includes the implicit call to the base constructor), which means that variables initialized this way are fully set up before a single line of constructor code (or any code called from a constructor) runs. In other words, your second, more involved example won't exhibit the same behavior if you translate it to C#.
Show More