hielo 65 Veteran Poster

again, if the other page is hosted on an external server, then NO. You MUST have internet connection.

hielo 65 Veteran Poster

Glad to help.

PS: Don't forget to mark the thread as solved.

hielo 65 Veteran Poster

If you keep a field as "disabled" the browser will not submit/post the value to the server. You can change that to readonly instead and THEN it should submit the value of the text field.

hielo 65 Veteran Poster

try:

function submitform()
{
document.comm.submit();
setTimeout(function(){self.close();}, 50);
}
hielo 65 Veteran Poster

copy and paste the following and give it a try:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
var data=null;
function gatherData(f)
{
	var str={};
	var i=-1, limit=f.elements.length;
	while( ++i < limit)
	{
		str[ f.elements[i].name ] = f.elements[i].value;
	}
	data=str;
	alert( data['title'] );
}


function pop() {
newwindow2=window.open('','name','height=500,width=500');
var tmp = newwindow2.document;
tmp.write('<html><head><title>popup</title>');
tmp.write('<body><form action ="hello.html" method="post" onsubmit="return self.opener.gatherData(this);">');
tmp.write('<b>Date</b>')
tmp.write('<input type="text" name="date"><br>');
tmp.write('<b>Event Title</b>')
tmp.write('<input type="text" name="title"><br>');
var title = document.getElementById('title')
tmp.write('<b>Event Desc</b>');
tmp.write('<input type="text" name="event1"><br>');
tmp.write('<b>start time</b>');
tmp.write('<input type="text" name="start"><br>');
tmp.write('<b> end time </b>');
tmp.write('<input type="text" name="end"><br>');
tmp.write('<input type="submit" name="ADD"><br>');
tmp.write('<input type="reset" name="CLEAR">');
//name = oForm.elements["title"].value;
tmp.write('</form>')
tmp.write('</body></html>');
tmp.close();

}

</script>
</head>
<body>
	<span onclick="pop()">Popup</span>
</body>
</html>
hielo 65 Veteran Poster

you need to make sure that in your html markup you have some element with id="skin_fenav1" ex: <div id="skin_fenav1">...</div>

hielo 65 Veteran Poster

From the best I can tell &cb is a way of telling the server to pick a new file. So it was a cache problem all along. Maybe a setting in Apache or PHP since I have never got the problem.

This is not a server issue. It's a browser issue. The server simply responds to the requests made by the browser. The browser is the one that decides whether to fetch a new page or to use a cached copy of the page in question.

The time changes every milisecond and when the parameters change the server detects this change and so picks a new file and will not go form cache.

Again, the server has nothing to do with the problem. The server does NOT "detect" a change. It simply responds to the requests made by browser. Ultimately the browser "thinks" that:
http://yoursite.com/file.php?x=3&cb=3434346565

is different from:
http://yoursite.com/file.php?x=3&cb=5434346565

and issues a request to the server.

hielo 65 Veteran Poster
Oh wow thanks a lot for that, worked perfectly. Just out of curiosity, do you mind me asking what : ... is doing differently?

"cb" is my abbreviation for "cache buster". The behavior you described is something I have seen before mostly in IE. So a quick "fix" is to change the URL every time. In this case the querystring will change on every request since time() will be different every time. That way the browser will "force" itself to request a new copy of the page on every request.

hielo 65 Veteran Poster

what if you do:

<p id="Generate">  
<a href="index.php?act=generate_quotes&cb=<?php echo time();?>" class="main_control">Generate</a></p>
hielo 65 Veteran Poster

If you are asking if you can run local php scripts (scripts that do not fetch anything from a remote website), then yes. Simply open your browser to
http://localhost/yourScript.php

However, if your php script is doing some curl request to some remote server (like google for example), then no. You need an internet connection for your script to find/get that external resource.

hielo 65 Veteran Poster

do you have a demo link to your page so I can see the output of the above script?

hielo 65 Veteran Poster

read the comments and copy and paste the following:

//NOTE: if a field is of type INT, then do NOT put apostrophes around the value.
//For example, if ID is an integer then simply use
// ... WHERE ID=%s
//the same rationale applies for other fields (like size)
//Lastly ALWAYS enclose your fields in backticks (the character that shares the same key as the ~)
$sql= sprintf("UPDATE `list` SET `title`='%s', `console`='%s', `system`='%s', `tv`='%s', `sram`='%s', `chips`='%s', `size`='%s', `md5`='%s', `sha1`='%s', `work`='%s', `error`='%s', `retrode`='%s', `comments`='%s' WHERE `ID`='%s'"
			,mysql_real_escape_string($_POST['title'])
			,mysql_real_escape_string($_POST['console'])
			,mysql_real_escape_string($_POST['system'])
			,mysql_real_escape_string($_POST['tv'])
			,mysql_real_escape_string($_POST['sram'])
			,mysql_real_escape_string($_POST['chips'])
			,mysql_real_escape_string($_POST['size'])
			,mysql_real_escape_string($_POST['md5'])
			,mysql_real_escape_string($_POST['sha1'])
			,mysql_real_escape_string($_POST['work'])
			,mysql_real_escape_string($_POST['error'])
			,mysql_real_escape_string($_POST['retrode'])
			,mysql_real_escape_string($_POST['comments'])
			,mysql_real_escape_string($_POST['id'])
			);
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record edited";
mysql_close($con);
hielo 65 Veteran Poster
Here is how it's done... /* Transform  the result-set to an array so we can loop through it's data  */

You are simply printing all the columns of the first record. The goal if to print all the records from a column. Refer to my post.

How can I make it into a variable so i can use it on another page. on another page but it only shows 1 row

save your db result as an array:

To clarify, on what you have: $row_hardware2 = '' . $row_hardware['name'] . '<br/>'; $row_harware2 is NOT an array. But if you did: $row_hardware2[] = '' . $row_hardware['name'] . '<br/>'; then execute:

foreach($row_hardware2 as $index=>$v){
 echo $i .': ' . $v;
}

If you really need it on a completely different page, then use a $_SESSION variable instead. Just make sure that at the beginning of your file you have: <?php session_start(); then the body of your while loop should be $_SESSION['row_hardware2'][] = '' . $row_hardware['name'] . '<br/>'; and your foreach:

foreach($_SESSION['row_hardware2'] as $index=>$v){
 echo $i .': ' . $v;
}
hielo 65 Veteran Poster

That's because when you make an ajax call, by default you are making an asynchronous call. To clarify, given this:

alert("hello");
callSomeFunction();//let's say this function takes 5 seconds to execute
alert( "goodbye" );

normally/traditionally, you would first see "hello", then wait for 5 seconds before you see "goodbye". That is NOT what happens with asynchronous ajax calls. You would see "hello", the the function is called, but the javascript interpreter does NOT wait for it to finish. Instead it continues immediately to the next statement and executes it. So the reason you are not seeing the returned values is that by the time the ajax request completes, the other statements after you initial ajax call have executed!


So your follow up question now is "So how do I get the returned value?". That's what the callback function is for.

So if you were originally wanting to do something like:

var x = myAjaxCall();
$('#someElement').text( x );

now you will need to execute that statement within your callback function instead. Why? because the callback function executes after the asynchronous call is complete.

hielo 65 Veteran Poster

Does my UPDATE statement need to specify all the fields that it will update or does the " ... " take care of that?

When you execute an UPDATE you need to EXPLICITLY state which fields should be updated and provide the values for them.

So in the above, instead of the "..." I was expecting you to replace it with something like: UPDATE TableName SET `field1`='value1', `field2`='value2' WHERE condition Please, don't take this the wrong way, but based on the question above, I STRONGLY suggest you read an introductory sql tutorial:
http://w3schools.com/sql/default.asp

The little amount of time you spend on the tutorial will more than make up for it in the long run since you will spend less time waiting for answers to beginner questions/mistakes.


On another note, lines 131-154 of your follow-up post to mine need to be at the beginning of the file (not at the end, and they need to be within and if clause:

<?php
if( isset($_POST['Submit']) && $_POST['Submit']=='Submit' )
{
  //code to update your table goes here
  ...
}

//rest of the code to generate your form fields goes here.
...
?>

Lastly, there is no need to execute a mysql_connect() for SELECT and one for UPDATE.
You just need to connect to the db once (at the beginning of the file) and do not close the connection until the very end of the file. In between you can execute any sql statements you want/need

hielo 65 Veteran Poster
<?php
mysql_connect("locahost","username","password") or die(mysql_error());

//change "dbname" to the name of your actual database
mysql_select_db("dbname") or die(mysql_error());

//change "TABLENAME" to the name of the actual table you have
$result=mysql_query("SELECT `names` FROM TABLENAME`") or die( mysql_error() );
while( $row=mysql_fetch_assoc($result) )
{
  echo '<div>' . $row['names'] . '</div>';
}
mysql_close();
?>
hielo 65 Veteran Poster

If the result being returned from the server has leading and/or trailing blank spaces, then the if condition will always evaluate to false. Try using if( resp.indexOf("Email is available") >-1) instead.

hielo 65 Veteran Poster

$result = mysql_query("SELECT `Pass` FROM `wiki` WHERE `User` ='" . $user ."'");
if (!$result) {
die( mysql_error() );
}
elseif( !mysql_num_rows($result) ){
echo "No records matched your search criteria";
}
else{
$row = mysql_fetch_assoc($result);
$pass = $row;
echo "found: " . $row;
}
mysql_free_result($result);
mysql_close($con);

hielo 65 Veteran Poster

Heilo you have the Javascript embedded into the HTML.

The name is Hielo.

Which browser are you using?

hielo 65 Veteran Poster

At the time of opening the account the balance and interest are set to be zero.

Ok, then there you have it. If BEFORE the UPDATE statement your balance=0 OR interest=0, then that row will be updated but the result will be zero again. This is not a php bug. This is just the result of your formula.

I don't know what you are working on, but to put things into perspective, when you open a bank account, you must have a minimum amount to open that account.

If you are telling me that according to the DEFINITION of your DB Table balance and interest are set to zero, then I can understand that. But if you are telling me that after someone opens an account they are allowed a zero balance, then that is the root of your problem. Your formula will never update to anything beyond zero. You must enter a number greater than zero.

hielo 65 Veteran Poster

are you sure balance and interest are not zero? 0*anything=0

hielo 65 Veteran Poster

.the option which i selected and then cancelled is selected if i open the drop downlist

I don't understand what you are describing. IF you have a link to a test page or a copy of your code, it might make help.

hielo 65 Veteran Poster

I noticed you removed "window.alert" as I'm still learning I suppose you don't need the entire syntax window.alert ?

Correct. The "built-in" functions "belong" to the (global) window object, so you don't need to prefix it. Other examples: window.prompt(...), window.confirm(...). You can simply "drop" the window prefix.

Also the alert should read "I want a car with cloth seats" how come the word seats is not being called ? Did I miss something ?

You tell me. It works fine for me

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
<head>
<script type="text/javascript">
var b1=null;
function car(seats,engine,theradio) {
this.seats=seats;
this.engine=engine;
this.theradio=theradio;
}

var work_car=new car ("cloth","V8","Tape Deck");


window.onload=function(){
	b1 = document.getElementById("work_car");
	b1.onclick=function(){
		alert("I want a car with " + work_car.seats + " yeah");
		
		//if you put <div id="message"></div> in your document,
		//instead of the alert you  can use
		//document.getElementById("message").innerHTML="I want a car with " + work_car.seats + " yeah"
	};
};

</script>
  <title></title>
</head>

<body>

<form>
<input type="button" value="Go Searching!" id="work_car" />

</form>

</body>

</html>

Why did you put the null in there ?

I have a habit of initializing all variables.

hielo 65 Veteran Poster

You currently have: UPDATE savings_investment SET `balance`= (`balance`+`balance`*`interest`NUMERATOR/DENOMINATOR) enclose the fractional portion in parentheses and include the "*" operator to the left of the open parenthesis: UPDATE savings_investment SET `balance`= (`balance`+`balance`*`interest` * (NUMERATOR/DENOMINATOR) ) You have this problem on all your update statements.

hielo 65 Veteran Poster

put a STYLE tag at the top of your html page with the css definitions that you want - ex:

<style type="text/css">
img{
margin-right: 15em !important;img{margin-right: 15em !important; 
border:2px solid #000;}
</style>

if you have other images that should NOT be affected by the above changes, then give your images a common class - ex: class="marqueeImg" then use that class name in the css definition.

<style type="text/css">
.marqueeImg{margin-right: 15em !important;border:2px solid #000;}
</style>

...
<div class="marquee" id="mycrawler2">
 <img class="marqueeImg" src="http://i40.tinypic.com/9tlic8.jpg" style="padding:0 20px;" onclick="javascript<b></b>:alert('9tlic8.jpg')";/> 
 <img class="marqueeImg" src="http://i43.tinypic.com/1zbqs5t.jpg" style="padding:0 20px;" onclick="javascript<b></b>:alert('1zbqs5t.jpg')"/> 
 <img class="marqueeImg" src="http://i44.tinypic.com/2419ul3.jpg" style="padding:0 20px;" onclick="javascript<b></b>:alert('2419ul3.jpg')"/> 
 <img class="marqueeImg" src="http://i43.tinypic.com/296nh3r.jpg" style="padding:0 20px;" onclick="javascript<b></b>:alert('296nh3r.jpg')"/> 
 <img class="marqueeImg" src="http://i40.tinypic.com/mk7ki.jpg" style="padding:0 20px;" onclick="javascript<b></b>:alert('mk7ki.jpg')"/>  
</div>
hielo 65 Veteran Poster

The above will select the first OPTION in the SELECT list. IF you want NO option selected, then use -1 instead of zero

hielo 65 Veteran Poster
function CloseDiv() {
            var control = document.getElementById("divReqStages");
            control.style.visibility = "hidden";
            
            document.getElementById('DDLReqStages').selectedIndex=0;
         
        }
hielo 65 Veteran Poster

Is it possible for the second page to submit its form along with the $_post which contains the information from the first page?

No. as soon as page2 completes execution (basically once it loads in your browser) the current page variables cease to exist. The only reason why the data is maintained across visits is because the browser and the server send a cookie back and forth that identifies a unique file on the server where the $_SESSION info for that particular user is stored.

The other ways to get this working are the hidden fields, sessions, cookies. Can i do without these?

No.

But the approach you described above is server-side. What you can do is to show one form at a time on the browser but do not submit the form right away. Instead, you show form 1 then go "Next" and the current form will hide and the other set of fields will appear. Then "Next", etc. Finally, when the user clicks finish, THEN you actually submit to the server. Ultimately (if you do things right) you will do ONE submission to the server.

http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx
http://thecodemine.org/

hielo 65 Veteran Poster

i get a pass error

Is this error reported by your server or is it some editor that you are using?

On another note, I missed closing parenthesis at the end of that line:

$q = sprintf("SELECT * FROM users where id='%s' LIMIT 1", mysql_real_escape_string($_GET['id']) ) ;
hielo 65 Veteran Poster

. The function update_interest() did not call in the program. can anyone show how to call that function?

try:

<?php

$connect=mysql_connect("localhost","root","");
mysql_select_db("bank",$connect) or die ("could not select database");

function update_interest($conn){
       

$query="UPDATE savings_investment SET `balance`= (`balance`+`balance`*`interest`12/3000)";
 mysql_query($query) or die(mysql_error());
 
$query="UPDATE shakthi SET `balance`= (`balance`+`balance`*`interest`7/3000)";
 mysql_query($query) or die(mysql_error());
 
$query="UPDATE surathal SET `balance`= (`balance`+`balance`*`interest`14/3000)";
 mysql_query($query) or die(mysql_error());
 
$query="UPDATE abhimani_plus SET `balance`= (`balance`+`balance`*`interest`1/300)";
 mysql_query($query) or die(mysql_error());
}
update_interest($connect);
?>
hielo 65 Veteran Poster

strange - it did not work in this way...

It's not clear what you mean by that, BUT if you were previously extracting the values using something like echo $result['OldValidFrom']; , now you will need to specify the index of the data that interests you- echo $result['OldValidFrom'][0]; .

You can even do a foreach($result['OldValidFrom'] as $index=>$data){ echo $data; }

hielo 65 Veteran Poster

instead of: $q = "SELECT * FROM users where id='$_SESSION[user_id]'" ; try: $q = sprintf("SELECT * FROM users where id='%s' LIMIT 1", mysql_real_escape_string($_GET['id']) ;

hielo 65 Veteran Poster

my apologies for that. Line 4 should be:

if( isset($_POST['Submitter']) && !empty($_POST['Submitter']) )

On another note, be sure to start from the index page, not directly from verify.php

hielo 65 Veteran Poster

can you post your code to profile.php?

hielo 65 Veteran Poster

I run my task scheduler and give the path of my php page

It's not clear to me what you did. If I am not mistaken, currently you update it "manually" by typing the url in the browser directly and loading the page. IF that is correct, then in windows scheduler you just need schedule some browser that you don't use too often ex: IE to open every day at a specific time and have it open on a specific url. If you cannot figure out how to specify the url that should open, then configure the browser that you chose so that its default homepage is the url to your page.

hielo 65 Veteran Poster

You are welcome. Don't forget to mark the thread as solved.

Regards,
Hielo

hielo 65 Veteran Poster

it forces the interpreter to treat the "stuff" between {} as a variable. The reason it was chocking is because you have $_POST within a double quoted string, but for consistency I added it to all the other variables as well.

hielo 65 Veteran Poster

copy and paste the following:

$result = mysql_query("UPDATE  `customer` SET `nic` = '{$nic}', `full_name` = '{$full_name}', `name_with_initials` =  '{$name_with_initials}',                                   `address` = '{$address}', `contact_number` = '{$contact_number}', `gender`  = '{$gender}' where `customer_id`={$_POST['customer_id']}") or die (mysql_error()) ;
hielo 65 Veteran Poster

I have generated a new java script code following the step you mentioned using Online javascript Beautifier:

OK, but the syntax in that code is correct, not sure why you did that. Originally, I identified which javascript code was giving you problems and the point of the beautifier was for YOU to see that there were mismatching try-catch blocks. In other words, the beautified indented the code nicely that it made it easier for you to see the fact that your try-catch blocks were mistmatched AND that your php code was generating multiple instances of the same code in what seemed like a loop. The Beautifier does not detect bad code/synatx. This is something you need to do.

Since I have a lot of PHP file for my blog which one is the correct one to place the new code if it is the case?

We have gone over this. The first step is to identify:
a. What is the error message - Originally you did this via the Web Developer Toolbar(WDT)
b. On which file is this happening - should also be reported by WDT
c. Fix the error on the file where the error is originating from.

Go back to my previous post where I wrote about how to use the WDT if you don't remember.

hielo 65 Veteran Poster

don't forget about the or die(mysql_error() ); whenever you execute a query:

$result = mysql_query("UPDATE  customer 
					SET	nic = '$nic'
						, full_name = '$full_name'
						, name_with_initials =  '$name_with_initials'
						, address = '$address'
						, contact_number = '$contact_number'
						, gender  = '$gender' 
					WHERE customer_id=$_POST['customer_id']")  or die( mysql_error() );

As for your parse_error, you would need to post your php code for modify_form.php for us to know what line is #25.

hielo 65 Veteran Poster

It has worked for me in the past. Just make sure you are using a string or a number, and not some variable that you declare outside the class.

hielo 65 Veteran Poster

BTW: If you look at my first post in your earlier thread, you will see how I included a hidden field name tran_ID for each of your rows. This is the same technique I am describing above.

hielo 65 Veteran Poster

But when i modifies one record of a particular customer

you need to also submit the id of that particular customer. Assuming each customer record has unique key (PRIMARY KEY) named 'cust_id', then on you also need to include it on your form (perhaps as a hidden field). So when the info is posted, your php script above will see the cust_id for the selected user and in your UPDATE statement you need to limit the affected records to just the selected customer by issuing a "... WHERE cust_id=$_POST['cust_id']" in your update statement.

hielo 65 Veteran Poster

If I understood you correctly, this is what you want:

...
echo "<input type='checkbox' name='register[]' value='$tag' />$tag\n";
...
hielo 65 Veteran Poster

if you are referring to classes, see below:

class className{
  private $property1="hello";
  public $property2="goodbye";
}
hielo 65 Veteran Poster

select the divs whose class contain "myDivs", do an each() and within the function check the numeric suffix of the class

<!DOCTYPE html>
<html>
<head>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
	<script>
	$(function(){
		$("div[class*=myDivs]").each(function(){
			var id=($(this).attr('class')).match(/(\d+)$/)[0];
			if( 7 <= id && id <=12)
			{
				doSomething( id, this.className );
			}
		});
	});
	
	function doSomething(id, cls){
		alert( 'class="' + cls + '" with numeric id=' + id);
	}
	</script>
</head>
<body>
	<div class="myDivs6">6</div>
	<div class="myDivs7">7</div>
	<div class="myDivs8">8</div>
	<div class="myDivs9">9</div>
	<div class="myDivs10">10</div>
	<div class="myDivs11">11</div>
	<div class="myDivs12">12</div>
	<div class="myDivs13">13</div>

</body>
</html>
hielo 65 Veteran Poster

[QUOTE]Thanks for the tip, I just fixed it, but we are really on a different page (literally!). This whole topic should be about the page /verify.php, not /index.php[/QUOTE]
I know you were in verify.php but your pages are "interconnected" since you start at one page and as you proceed at a different step, you are posting to another page. Case in point, you fixed the nested form problem in verify.php, but it still persists in index.php. You need to fix that nested form problem everywhere. Also, you are using name="Submitter" in index.php, so you to use a different name in verify.php because it is a different step altogether. I suggest you use name="Submiter2" in verify.php.

<?php
session_start();
//you are arriving from index.php
if( isset(isset($_POST['Submitter']) && !empty($_POST['Submitter'])) )
{
    //save the data you posted from index.php
    foreach($_POST as $k=>$v){
        $_SESSION[$k]=$v;
    }
}
//you submitted from verify.php
elseif( isset($_POST['Submitter2']) && !empty($_POST['Submitter2']) )
{
    //retrieve the previously saved data from index.php
    $carrier = $_SESSION['carrier'];
    $number1 = $_SESSION['number1'];
    $number2 = $_SESSION['number2'];
    $number3 = $_SESSION['number3'];

    $number = $number1.$number2.$number3;

    $pin = rand(1, 9).rand(0, 9).rand(0, 9);
    $code = $pin;



    if($carrier == 1){
        $displaycarrier = "Verison";
        $site = "vtext.com";
    } elseif($carrier == 2){
        $displaycarrier = "AT&amp;T";
        $site = "txt.att.net";
    } elseif($carrier == 3){
        $displaycarrier = "Sprint";
        $site = "messaging.sprintpcs.com";
    } elseif($carrier == 4){
        $displaycarrier = "T-Mobile";
        $site = "tmomail.net";
    } elseif($carrier == 5){
        $displaycarrier = "MetroPCS";
        $site = "mymetropcs.com";
    } elseif($carrier == 6){
        $displaycarrier = "Virgin Mobile";
        $site = "vmobl.com";
    } elseif($carrier == 7){
        $displaycarrier = "Beyond …
hielo 65 Veteran Poster

you need to EXPLICITLY compare 'promo99' against something as well:

($("#package option:selected").val() != '99' || $("#package option:selected").val()!='promo99')
hielo 65 Veteran Poster
I copy/paste into my database

I don't know what a database has to do with your problem. The code I pasted was meant for a php file. Like I said, it looks like somewhere in your php code you are creating that javascript in some loop which is NOT producing the right result. I rechecked your url and it is still producing the same output - nested and unbalanced try-catch structures. Without looking at your php code, I cannot help.

Regards,
Hielo

hielo 65 Veteran Poster

This is what it should be generating:

try
{
    try
    {
        var pageTracker = _gat._getTracker("UA-8766636-3");
        pageTracker._trackPageview();
    }
    catch (err)
    {
    }
}
catch (e)
{
}

try
{
    var myValidate = new Validate();
    myValidate.addRules(
    {
        id: "da_email",
        option: "required",
        error: "A valid email address is required."
    });

    myValidate.addRules(
    {
        id: "da_email",
        option: "email",
        error: "A valid email address is required."
    });

    myValidate.addRules(
    {
            id: "da_name",
            option: "required",
            error: "A valid name is required."
    });

    myValidate.addRules(
    {
            id: "da_name",
            option: "simpleValidChars",
            error: "A valid name must not contain extra punctuation or special characters."
    });
}
catch(e){}