1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

validation problem

Discussion in 'JavaScript' started by bharanikumariyer, Mar 1, 2008.

  1. #1
    dear friends

    am having two files

    file 1
    file2...

    in file1.html havinf form and also i written on validation function

    file1.html

    function x()
    {
    if(document.frm.txt_name.value==0){
    alert("enter somthing");
    return false
    }

    else if( here i want to call the function ----> y){

    return false;
    }
    else return true;
    }


    file2.js

    contain ajax function

    how i call the

    function y(){

    ajax operation

    }



    thanks in advance
     
    bharanikumariyer, Mar 1, 2008 IP
  2. hip_hop_x

    hip_hop_x Active Member

    Messages:
    522
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #2
    file1.html

    <script src="file2.js"></script>

    <script type="text/javascript">
    function x()
    {
    if(document.frm.txt_name.value==0){
    alert("enter somthing");
    return false
    }

    else{
    y ();
    return false;
    }</script>

    This is what you wanted?
     
    hip_hop_x, Mar 1, 2008 IP