adibih
05-13-2008, 09:23 AM
1) Script Title: Tab Content Script (v 2.2)
2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/tabcontent.htm
3) Describe problem:
I need tab links to fill specific form input field with a predefined value when clicked on.
But I can't get it work. As if tab content script is taking exclusive rights on onclick event.
Is there a way?
<form name="myform">
<input type="text" name="targettextfield" />
</form>
<ul id="tabs" class="shadetabs">
<!-- Does not address targeted text field -->
<li><a href="#" class="selected" rel="prev1" onclick="document.myform.targettextfield.value='new value';">tab 1</a></li>
<li><a href="#" rel="prev2">tab 2</a></li>
</ul>
<!-- This works as expected -->
<a href="#" onclick="document.myform.targettextfield.value='new value';">js test 1</a>
2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/tabcontent.htm
3) Describe problem:
I need tab links to fill specific form input field with a predefined value when clicked on.
But I can't get it work. As if tab content script is taking exclusive rights on onclick event.
Is there a way?
<form name="myform">
<input type="text" name="targettextfield" />
</form>
<ul id="tabs" class="shadetabs">
<!-- Does not address targeted text field -->
<li><a href="#" class="selected" rel="prev1" onclick="document.myform.targettextfield.value='new value';">tab 1</a></li>
<li><a href="#" rel="prev2">tab 2</a></li>
</ul>
<!-- This works as expected -->
<a href="#" onclick="document.myform.targettextfield.value='new value';">js test 1</a>