Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 03-01-2008, 04:12 AM validation problem
Junior Talker

Posts: 2
Name: BHARANIKUMAR
Trades: 0
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

}
bharanikumarphp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-01-2008, 09:44 AM Re: validation problem
svirid's Avatar
Experienced Talker

Posts: 34
Name: Dima
Location: Toronto, Canada
Trades: 0
Simple enough. just include your js file into the page header

<head>
<script type="text/javascript" src="file2.js"></script>

after that u can call any method that is defined in that file. They all will be global
svirid is offline
Reply With Quote
View Public Profile Visit svirid's homepage!
 
Reply     « Reply to validation problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22752 seconds with 12 queries