seveneleven
Junior Member
Posts: 2
Registered: 7/28/2007
Member Is Offline
|
| posted on 7/28/2007 at 05:32 PM |
|
|
problem with 'name'
Hi I use Dreamweaver and Developer toolbox often. The problem I am coming across is that Developer toolbox can give strange names to text areas in
forms.
for example:
name="Date_<?php echo $cnt1; ?>"
as a result I am getting the error:
No target control specified.
I have also just tried using 'date' but I get the same error.
Here is my code:
this is beside the text box
<a href="javascript:cal1.popup();"><img src="img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"
/></a>
This is after my </form> tag
<script language="JavaScript">var cal1 = new calendar3(document.forms['form1'].elements['Date_<?php echo $cnt1; ?>"id="Date_<?php echo $cnt1; ?>']);</script>
Any ideas where I went wrong? or what I can do?
I have the script working on pages that I didnt used Toolbox to build.
Thanks
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/28/2007 at 09:13 PM |
|
|
The problem is in the syntax. It looks like you copied too much code for the name. Instead of
Date_<?php echo $cnt1; ?>
you have
Date_<?php echo $cnt1; ?>"id="Date_<?php echo $cnt1; ?>
try:
<script language="JavaScript">var cal1 = new calendar3(document.forms['form1'].elements['Date_<?php echo $cnt1;?>']);</script>
view source of the generated page in browser to compare actual name in the input and in calendar initialization.
|
|
|