Jump to content


Check out our Community Blogs

Heaven1977

Member Since 13 Mar 2011
Offline Last Active Sep 24 2012 03:44 AM
-----

Posts I've Made

In Topic: Javascript isn't seeing my variables!

28 May 2011 - 08:38 AM

onclick should be written as following to run

onclick="hide_input(this.form);"
or
onclick="javascript:hide_input(this.form);"

also refer to document.input =====> to refer to this form :)

check and tell me


Ok, so Javascript doesn't want to see my variable, here is part of the script.js file:

35: function send_input(formInput)	{
36: hide_input();
37: var inputName = formInput.name.value;
And my HTML:
<form name='input' action='#' method='get'>
Subject Name: <input type='text' name='name' value='name'>
Your Name: <input type='text' name='author' value='author'>
<input type='submit' onclick='send_input()'>
</form>
<a href='#' onclick='hide_input(this.form)'>Hide</a>

Please don't tell me to use Jslint.
But firebug is telling me it cannot see my formInput value!?!
Here:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download