Link to home
Start Free TrialLog in
Avatar of andrishelp
andrishelp

asked on

Hiding / showing page parts based on form changes using rel attribute

When I submit the form, I gets NULL value for "LibShortDesc" & "LibLongDesc" even though some text in it. It works in the IE but not in Firefox. Please help. Thanks.

<form name="submit" action="formsubmit.asp">
	<table border="0">
	<tr>
		<td>
		 <input type="checkbox" name="itemaddPL" id="itemaddPL" value="Y" rel="itemaddPLview"/
		 <span class="formbuttons-blue">&nbsp;&nbsp;Add To My Library&nbsp;&nbsp;</span>
        </td>
	</tr>
	<tr rel="itemaddPLview">
        <td>
			<table border="0" width="100%" cellpadding="1" cellspacing="2" style="border:1px black solid;">					
				<tr><td valign="top"><b>Short Desc:</b></td>
				<td> <input type="text" name="LibShortDesc" size="40" class="forminput-field"></td>
				</tr>
				<tr><td valign="top"><b>Long Desc:</b></td>
				<td> <textarea name="LibLongDesc" rows="3" cols="30" class="forminput-field"></textarea></td>
				</tr>				
			</table>
		</td>
	</tr>
	</table>
</form>

Open in new window

Avatar of Big Monty
Big Monty
Flag of United States of America image

you need to add the form method:

<form name="submit" action="formsubmit.asp" method="post">
Avatar of andrishelp
andrishelp

ASKER

Sorry, I forgot to add that in the sample code. But I do have that in main program.
your checkbox lacks a > at the end:
<input type="checkbox" name="itemaddPL" id="itemaddPL" value="Y" rel="itemaddPLview"/>

Also, how are you submitting the form? I don't see a submit button.

<form name="submit" action="formsubmit.asp" method="post">
	<table border="0">
	<tr>
		<td>
		 <input type="checkbox" name="itemaddPL" id="itemaddPL" value="Y" rel="itemaddPLview"/>
		 <span class="formbuttons-blue">&nbsp;&nbsp;Add To My Library&nbsp;&nbsp;</span>
        </td>
	</tr>
	<tr rel="itemaddPLview">
        <td>
			<table border="0" width="100%" cellpadding="1" cellspacing="2" style="border:1px black solid;">					
				<tr><td valign="top"><b>Short Desc:</b></td>
				<td> <input type="text" name="LibShortDesc" size="40" class="forminput-field"></td>
				</tr>
				<tr><td valign="top"><b>Long Desc:</b></td>
				<td> <textarea name="LibLongDesc" rows="3" cols="30" class="forminput-field"></textarea></td>
				</tr>				
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<input type="submit" name="submit" Value="SUBMIT">
		</td>
	</tr>
	</table>
</form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When I submit the form, I gets NULL value for "LibShortDesc" & "LibLongDesc" even though some text in it. It works in the IE but not in Firefox.
Did you copy and paste MY example EXACTLY as given, or did you try YOUR own code?
What version of Firefox? What OS?
I copied your example and it worked. But I am applying to my code, it did not work. Also, the "Add to my library" is clickable option which hide or show "short Desc" & "long desc" textbox. Which is not working in your code.

<tr>
<td>
 <input type="checkbox" name="itemaddPL" id="itemaddPL" value="Y" rel="itemaddPLview"/>
 <span class="formbuttons-blue">&nbsp;&nbsp;Add To My Library&nbsp;&nbsp;</span>
</td>
</tr>
<tr rel="itemaddPLview">

Then you need to post your existing code. Clearly the problem is within the code that you did NOT post, not on what you posted.
The file is too large (more than 5000 lines of code and also linked to other files.) Anyhow, I will review it again and if I can't find the work around, I will send whole file. Thanks for your help.