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"> Add To My Library </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>
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.
<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.
ASKER
<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"> Add To My Library </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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
What version of Firefox? What OS?
ASKER
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;  ;Add To My Library </span>
</td>
</tr>
<tr rel="itemaddPLview">
<tr>
<td>
<input type="checkbox" name="itemaddPL" id="itemaddPL" value="Y" rel="itemaddPLview"/>
<span class="formbuttons-blue">&
</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.
ASKER
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.
<form name="submit" action="formsubmit.asp" method="post">