|
Picaro2015 wrote: how about having a shared code base I believe this can work if you use JSon as your data format from the service. Also I would us an MVC dataservice rather than a WCF, your mobile platforms may balk at talking to a WCF whereas OData is more acceptable.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi Guys any help on this? I have a dialog box triggered by a button click that calls my php script to generate a form which needs to be filled and submitted. I want to do the sending and conformation via Ajax. I have been recoding and researching for a few days but nothing on StackExchange or other websites help me with it. Here's the code:
Dialog box snippet;
$k('#CreateTable').click(function(e){
e.preventDefault();
var Call = $k('#CreateTable').attr('value');//.attr('id');
var util = $k(this).attr('id');//.attr('id');
$k('#dialog').dialog({
autoOpen: false,
title: 'Running Utility for: '+Call,
modal: true,
width: 450,
close: function(event, ui) {
$k("#dialog").dialog('destroy');//event.target
}//END CLOSE
}).dialog('open');
var utility = { 'utility' : util };
$k.ajax({
type: "post",
url: "inc/runUtilities.php",
dataType: "html",
data: utility,
success: function(data) {
$k('#DlgTxt').html(data).fadeIn('slow');
}
});
//return false;
});//END DIALOG
The PHP snippet;
Its part of a class that returns the $show variable.
$show .= "";
// action='".$_SERVER['REQUEST_URI']."'
$show .= '
';
$query = "SHOW COLUMNS FROM `".$_SESSION['WorkTable']."`";
if($output = mysqli_query($this->MySQLCxn->MySQLCxn, $query))
{
$columns = array();
while($row = mysqli_fetch_assoc($output))
{
if($row['Field'] == 'id') {}
else
$show .= '
';
}
}
$show .= '
'.@$row['Field'].': |
| | Submit | Create contact
| |
';
And the JQuery that i am currently using trying to have it call my php to process the form being sent.
var $j = jQuery.noConflict();
(function($j){
$j(document).ready(function() {
$j("#cContactSbmt").click(function(e){
//I've tried .on(), .live(), .submit(), .trigger()
e.preventDefault();
alert('cContactSbmt clicked...');
$j.ajax ({
type:"POST",
url:"inc/runUtilities.php",
data: $j(this).serialize(),
success: function(msg){
$j("#thanks").html(msg)
$j(this).modal('hide');
},
error: function(){
alert("failure");
}
});
});
});
})($j);
For some reason its not working nothing showing up in the console as well. again: i have a dialog box that gets populated via Ajax with a php generated from that needs to get submitted to another php script that is to process it and reply to the dialogs. Any suggestions?
|
|
|
|
|
I have been delving into web development quite heavily recently. I have searched all over the internet for what is the best framework to use. I know that what would be considered the "best" can be affected by what I want to do, specifically.
I want to create websites that are easily to update (minimal code changes), looks great, and is relatively easy to code with. It's basic desires that any website should need at least sometime.
Based on what my desire is, what would be the best framework (if that's even the right term for this) to learn and use?
Would I be better off using Microsoft Visual Studio to code in as well using Microsoft specific frameworks like MVC, or would a open source provide better and more functionality?
I know many beginning web developers would benefit from this as well.
Thanks
|
|
|
|
|
|
There really is no answer. What might be easy to learn for one may not be for another. If you already have some experience in web development and you can do what you need to do in that language you already know, stick with that.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It actually depends on the facts like, what you want to do and how long you have to deal with the projects. Every tool is build for a reason..
But nowadays the open source like wordpress, majento are more popular than the Frameworks as it is really easy to use, even if you don’t have programming knowledge you can easily create a website with the open source platform. And if you want to choose the framework to develop your site or application it's not a bad choice at all, but consider some key points like popularity of the framework, support, security, community size, etc..
And if you ask, which is the best framework to use, I will suggest you CakePHP & Laravel..
|
|
|
|
|
Hi all, I saw a code snippet that looked similar to JSON but it did not use curly braces. Instead it uses square brackets like the following
[
["Age", 25],["Age", 26]
]
I only had a glance at the code and not sure what it was. Is it C# or Javascript syntax? Thanks in advance for your reply.
|
|
|
|
|
Arrays in an Array in JavaScript:
var ages = [
["Age", 25],["Age", 26]
]
alert(ages[1]);
alert(ages[1][1]);
|
|
|
|
|
I'm looking for a poster (or website) that maps the technologies that can be used to create software. Something like this: http://www.microsoft.com/en-in/download/confirmation.aspx?id=39952[^]
The problem I'm having is every technology I study seems to lead to some other technology I need to study before I can solve my basic problem.
Currently, I'm wanting to create my own dash board for services running on my network. So I want to grab data like, had disk space, cpu and network bandwidth utilization metrics from Windows servers, and show those in a dash board. Yes, I could buy an off the shelf product, but what fun is there in that?
Point is, I need to "query a server" (WMI, Websockets, JSON, Webservices), I need to store data points in a database(SQL, mySQL, XML, JSON), then I want to show it dynamically in a page(MVC, JavaScript, node.js, angular.js) and on and on and on and on.
What I was hoping for was a place where someone has taken the 10,000' few and said: Hey if you're a .Net guy, use MS-MVC, and WMI and store it all in SQL Server and use EntityFrameWork to "CRUD".
But what you get is, buy my $35.00 book that will walk you through 6 way's we "used" to do stuff, then shows you how we "will do it soon" when the next great flavor of HTML9 comes out or CSS12 ect.
Any help?
|
|
|
|
|
How do I protect unauthorized calls through the API? I know I will have a login process, but do I login on each call to each method? Or do I pass some kind of token to each call?
If it's not broken, fix it until it is
|
|
|
|
|
You can pass the user credentials (login and password) in request header for the first time. Then, login for that client in the server. Then, other subsequent calls should not require authentication till session time-out (Or the way you implemented authentication/authorization).
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
may be you can use the ASP.NET session global variable. you can check it before you perform any following loading process.
|
|
|
|
|
One way to achieve this would be to have a cookie based authentication where when a user calls the login method a cookie is sent to the user and this cookie can be used to authenticate the user.
But the above mentioned approach is not recommended as the cookies don;t gel well with complete restful services. If we have a mix of website and rest api then it works well as we can ask the user to login from the web page and the api can simply check for authentication cookie.
So the recommended approach is to have a token based authentication. when a user logs in, generate a token for the user and send it back to the client. the client will then have to send this token back in the header with every request. following article shows how this can be done - http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api[^]
|
|
|
|
|
I've been working with wordpress for awhile and know it fairly well. I HAVE used drupal, but not much. It's rare that I get a client that wants to spend the extra cash on a drupal website, because I generally have clients that don't have a need for the extra scalability or security. And the ones that DO want something other than wordpress usually want something custom from the ground up (which is always a lot more fun).
I have a job interview coming up for a position I'm very interested in, and it requires working with multiple drupal websites. While in the first interview I was told it's not important to know it thoroughly, since he knew I had a lot of experience with wordpress. But I'd love to spend some time learning as much about it as I can in a week or so, just to improve my chances a bit. The less I have to learn on the job, the better.
I'm pretty good with PHP programming, better with Javascript, HTML5 and CSS, and I've used Wordpress quite a bit. Though I'm a bit new at plugin development (not that it's challenging, I just haven't had much of a reason to learn it yet, so I've only looked at it when business is slow).
Given my current experience level and familiarity with similar CMS, does anybody know of a good tutorial or course that could get me familiar with the inner workings of drupal quickly? Books are a bit out of the question. I'll buy a couple if I get the job, but I'd rather not wait for them to be shipped and I always have a hard time finding good books in stores.
|
|
|
|
|
|
|
|
Problem Statement: Users are trying to edit the same application-page from multiple tabs; this is leading to data corruption. For example: Users edit some of the fields in Tab1 and edit rest of the details in Tab2. The issue is reproducible both in IE8 (AS-IS browser) and IE11 (TO-BE browser – in process of roll out). In IE8 browser, we have disabled the options of New Tab/Duplicate tab/new Window options. However this option is NOT available in IE11.
Target:
a) Explore solution where same page can be edited from multi-tabs without data corruption.
Solutions suggested so far and status:
Option1: the latest Tab2 would be successfully saved and user should refresh manually TAB1 to get refreshed the screen due to changes done on Tab2. Once refresh is completed then user can start editing the Tab1.
Reason: Client users are not comfortable with refresh option every time they edit the TAB1 screen.
Option2: Currently we are not allowing the application to use Multi session tab data for saving and warning the user when trying to save the data from TAB1. Only one session allowed per request.
Reason: Users require both the tab information to be saved rather than with only 1 tab.
Expected solution direction: User should able to edit the same screen in multiple tabs/Windows without any data corruption.
|
|
|
|
|
I am working on mvc5, visual studio 2013. Till 3 hours back, my application is working fine. All of a sudden, I'm getting below error
"HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled on the server."
Note: My application is running on IISExpress
I googled and tried the below solutions.Still not working. Please help me to fix this..
1. added system.webservices tag in web.config as shown in the below link. http://forums.asp.net/t/1897460.aspx?the+web+server+is+configured+to+not+list+the+contents+of+this+directory
2. Run the below command in Command prompt. It allowed me to browse the directories C:\Program Files\IIS Express>appcmd set config /section:system.webServer/directoryBrowse /enabled:true Still error exists.
3. executed below command in command prompt
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir
How to fix this..
|
|
|
|
|
Hi,
I am getting the following error:
Notice: Undefined index: ALL_HTTP in C:\xampp\htdocs\JassimRahma\app\detect.php on line 118
here is the code:
if(in_array($mobile_ua,$mobile_agents)){
$mobile_browser++;
}
if (strpos(strtolower($_SERVER['ALL_HTTP']),'OperaMini')>0) {
$mobile_browser++;
}
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'iemobile')>0) {
$mobile_browser++;
}
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),'windows')>0) {
$mobile_browser=0;
}
Line 118 is:
if (strpos(strtolower($_SERVER['ALL_HTTP']),'OperaMini')>0) {
Kindly help...
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
Hi,
I would like to ask about Google Analytics.. I have seen many different ways to implement the tracking code, the standard way, the ga.js, the analytics.js..
what are the difference between these ways and what's best?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
In my opinion Google analytic code should be on the top of the page, just before the . There is no need to put it in an individual JS file until and unless you are loading that file asynchronously. It would be a little bit pointless to put it in a separate JS file.
|
|
|
|
|
I always put it in my 'footer.php' file, right before the tag, where I put most of my scripts. Putting it at the end let's you load scripts after everything else, instead of holding up the rendering of the rest of the page. Though I know that's not really necessary thanks to some great HTML5 attributes for script tags, I am still in the habit.
I see no reason to include it as an external file. And I include my footer.php file in every page on most sites, anyway. But if I wasn't building a website in pieces like that, and each page had it's own footer, I guess I would consider an external file to make it easier than pasting it on every page.
|
|
|
|
|
|