LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2014, 11:11 AM   #1
figure20012
Member
 
Registered: Apr 2012
Posts: 75

Rep: Reputation: Disabled
test javascript functions automatically


I want to test my javascript functions automatically before sending them to a production server.

How can I achive this?

Can you please suggest ways for me to code a program to be able to test the functions?

===
<script type="text/javascript">
<!--
function validateform() {

if (document.frm_registration.phone.value == ""){
errorMsg += "\n\tPhone number \t- Enter Phone number";
}

-->
</script>

<form action="clientregis.php" method="post" name="frm_registration" onsubmit="return validateform()"
>


<tr>
<td><div align="left">Phone number</div></td>
<td><div align="left">
<input name="phone" type="text" id="phone" size="45">
</div></td>
</tr>

<input name="cmd_submit" type="submit" value="Submit" onsubmit="return validateform()">

<input name="reset" type="reset" id="reset" value=" Clear ">

</div>
</form>

===


Thanking you in advance for your help.
 
Old 01-22-2014, 01:56 PM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,959

Rep: Reputation: 271Reputation: 271Reputation: 271
Try PhantomJS at http://www.phantomjs.org

You can just put it in an .html file and have your browser load it.

Last edited by RandomTroll; 01-22-2014 at 11:20 PM. Reason: additional information
 
  


Reply

Tags
firefox, javascript



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript, conditionals, higher-order functions tinyTux Programming 2 08-16-2011 10:42 AM
Javascript and functions Cyhaxor Programming 2 11-04-2007 01:36 PM
how to pass a php variable to javascript functions? mohtasham1983 Programming 5 10-07-2007 07:59 AM
help for the NIC loopback test functions dfengui Linux - Networking 1 06-17-2007 05:43 PM
JavaScript/browser speed test WilliamS Slackware 0 02-14-2005 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration