Might be an Easy Fix

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

Might be an Easy Fix

Post by chris12295 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Everytime I run this script, the challenge function will not work.  Firefox says "challenge is not a function" and I dont know why.  I am using Smarty Template Engine.

[syntax="html"]
{literal}
<script type="text/javascript" language="javascript">
function challenge() {
 alert("bye");
}
</script>
{/literal}
<div id="left" class="column">
 <br /> <br />
 <a href="index.php">Home</a>
 <a href="register.php">Register</a>
 <a href="help.php">Help</a>
</div>

<div id="subhead">Login</div>

<div id="right" class="column">
 <div class="box clear">
  <form name="login" id="login" action="login.php" method="post" onsubmit="challenge();">

feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

show what the code looks like after it's been parsed. (view source, copy & paste here)
chris12295
Forum Contributor
Posts: 113
Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:

Post by chris12295 »

Code: Select all

<script type="text/javascript" language="javascript">
function challenge() {
 alert("bye");
}
</script>

<div id="left" class="column">
 <br /> <br />
 <a href="index.php">Home</a>
 <a href="register.php">Register</a>
 <a href="help.php">Help</a>

</div>

<div id="subhead">Login</div>

<div id="right" class="column">
 <div class="box clear">
  <form name="login" id="login" action="login.php" method="post" onsubmit="challenge();">
Post Reply