I am currently pulling a 10 digit number form a database and propulating a form.
I have recently changed the form to 3 input boxes and can't figure out how to split the data (i.e. xxx, xxx, xxxx).
Here is snippet from my current code: - function loadModalPromo()
-
{
-
modalpromo = new Boxy("<?php loadPromoModalContent(); ?>", {title: "I do not have a Promo Code", modal: false, closeable: true, show: false });
-
-
$("#mphavecontact").click(function() {
-
modalpromo.hide();
-
});
-
-
$("#mpnotcontact").click(function() {
-
$("#mpoptionform").hide();
-
$("#mpgettingpromo").show();
-
$.ajax({
-
type: "POST",
-
url: "yhfiles/ajaxgetpromo.php",
-
data: "key=" + "<?php echo $_SESSION["ajaxget_promo_key"]; ?>",
-
success: function(msg){
-
if(msg.length == 10)
-
{
-
$("#logpromo").val(msg);
-
}
-
else
-
{
-
alert("Error in retrieving the promo code. Please contact the administrator.");
-
}
-
},
-
complete: function(msg){
-
$("#mpoptionform").show();
-
$("#mpgettingpromo").hide();
-
modalpromo.hide();
-
}
-
});
-
-
-
});
-
}
Any help would be appreciated.
1 1239
if you do it with php -
$value="1234567890";
-
$part1=substr($value,0,3);
-
$part2=substr($value,3,3);
-
$part2=substr($value,6,4);
-
want to do with javascript -
var value="1234567890";
-
var part1=value.substr(0,3);
-
var part2=value.substr(3,3);
-
var part3=value.substr(6,4);
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James |
last post by:
Hello,
I have about 15 master catalogs, or master tables, of information that my
application uses. The data form wizard is fine because most of them have
between 20 and 200 items in them.
...
|
by: David C. Allen |
last post by:
I am following thru the examples in the book I am studying for my MCSD. This
is the web applications book.
One example is to use the data form wizard to create a simple data form on
the...
|
by: Zal |
last post by:
hi,
i would like someone to confirm something for me, i have the trail
edition of vs.net2003 which i will upgrade to the standard
edition,once i get it through the post. ive been looking at a...
|
by: Jeff Brown |
last post by:
I am developing my First "Real" app and i am running in to the following
problem.
I use the data form wizard to create a form, so i do not have to manually do
all the binding.
But the only thing...
|
by: AndrwChau |
last post by:
I just want to know how many user are use the Data Form wizard to generate
the input form. Is most of programmer use the wizard to generate the input
form or they are create one by themself.
Is...
|
by: Bob |
last post by:
I've located instruction as to how to add the Data Form Wizard into a VB.NET
2005 project at this location.
...
|
by: Avi G |
last post by:
Hi,
i use VS2005 Pro and i can't find the "Data form Wizard" when i try to
include it to my form, where can i find it , or maybe there is something else
that do the same thing? i need to bind a...
|
by: shivavrata |
last post by:
Hi All,
I want to transfer the data form webpage to any other own application
which is running in backend.How i develop this web page. which
technology is good for this or any particular protocol...
|
by: nkoriginal |
last post by:
Hello:
I tried an script for keep my data form after reload page, but I've some errors.
In this momento I runnung my own browser because we've an intranet. And for security reason, our page...
|
by: Saucer Man |
last post by:
....in Visual Basic.net 2008 Express?
--
Thanks!
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |