Hello guys,
Today I am make my BCA Project, but some problem on my project like a
Create a Mobile number tracking system, and locating a mobile number. I am also use some code like below.
Default.aspx
locate.js
function GetPhnlocation()
{
var phone = document.getElementById('txtMobileNo');
var number = document.getElementById('name');
var state=document.getElementById('company');
var provider=document.getElementById('idno');
var service=document.getElementById('info');
var code = phone.value.slice(0, 4);
var re = /^[0-9]+$/;
if (phone.value != '' && re.test(phone.value)&& (phone.value.length==10) )
{
if (code == "9000")
{
number.firstChild.nodeValue = 'Mobile No: ' + phone.value;
state.firstChild.nodeValue = 'State: Andhra Pradesh';
provider.firstChild.nodeValue = 'Service Provider: Airtel';
service.firstChild.nodeValue = 'Service Type: GSM';
return false;
}
{
var phone = document.getElementById('txtMobileNo');
var number = document.getElementById('name');
var state=document.getElementById('company');
var provider=document.getElementById('idno');
var service=document.getElementById('info');
var code = phone.value.slice(0, 4);
var re = /^[0-9]+$/;
if (phone.value != '' && re.test(phone.value)&& (phone.value.length==10) )
{
if (code == "9000")
{
number.firstChild.nodeValue = 'Mobile No: ' + phone.value;
state.firstChild.nodeValue = 'State: Andhra Pradesh';
provider.firstChild.nodeValue = 'Service Provider: Airtel';
service.firstChild.nodeValue = 'Service Type: GSM';
return false;
}
}
}
}
-------------------------------
But, can not work above code's , anyone can help me ...

John BhattPosted Sep 21, 2014, 7:38 AM
While you are creating project in .NET and mobile number database will be too large, suggested method to use XML file as data source and use C# language. Because, JS file goes public and anyone can read your database. So the authority who is checking project might not give you perfect points.
For getting from Database (SQL or XML). Create a Texbox and Button which were visible in form by default. Then apply query in .cs page. Form design should be like below (Rough design).
Then some XML File would be like.
On ButtonClick Event of btnGetInfo you can write code at BackEnd.
For more info on reading Data from XML Data source and displaying on aspx page, read below article.
www.dotnetspider.com/resources/44368-Reading-data-from-XML-File.aspx
All the Best