LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2006, 01:35 AM   #1
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Rep: Reputation: 15
Need help on Javascript


hello gurus,
i have another one for you. i have this html form that after clicking submit, the data gets validated by an external javascript function_test.js. i programmed it so if function return false, alert window will pop up.

my problem is this. i don't want to display the small javascript window anymore when function returns false, and definitely still like to use the external javascript file. i would like the errors, alerts, or any other messages to be displayed on the browser where i originally submitted the form. could this be done, or am i stuck with the small javascript alert windows?

here's my code scenario:

<html>
.
.
<script> xxxxpoints to my external javascript file.
</script>
.
.
<form method="post" onsubmit=validate(this)>
.
.
.
<input....
</form>
.
.
.
</html>


thanks guys!

jun tuko
 
Old 01-16-2006, 02:22 AM   #2
vireshwali
Member
 
Registered: Sep 2005
Posts: 67

Rep: Reputation: 15
i think coding a javascript function with another name in your html page and calling that function instead of theold one shall do the trick for you.
 
Old 01-16-2006, 02:59 AM   #3
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hi vireshwali,
thanks for taking a look at my thread.

do you mean, i code the javascript on the html and basically not put it externally?

i have an external .js file and i'm keeping all of the functions i have in there. is there anything else i could do aside from writing the code on the html? i dont think using tags inside my function file works.

thanks!
 
Old 01-16-2006, 03:45 AM   #4
vireshwali
Member
 
Registered: Sep 2005
Posts: 67

Rep: Reputation: 15
have a work around for this also.
put your js function in another .js file and include that file in your html page.
This would do it.
 
  


Reply



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 help darin3200 General 4 09-03-2005 11:58 PM
Javascript maseby Programming 1 04-09-2004 05:16 PM
javascript in <td>? akaash Programming 0 03-18-2004 12:22 AM
Help with javascript? BajaNick Linux - Software 2 07-20-2003 08:41 PM
javascript?? Marci Sarwan Programming 1 01-18-2001 09:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:36 PM.

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