[Seasar-user:18430] Re: [TeedaでtabIndexについて]

thomas [E-MAIL ADDRESS DELETED]
2009年 9月 2日 (水) 20:07:30 JST


Hai,

Yes i am struggling with enter Key problem.

I have attached my javascript and HTML


javasvript

<script type="text/javascript">

var validateAdd = function(evt) {

$i("doAddNew").click();
}

var validate = function(evt) {
.....
......
.....

$i("doSave").click();
}


function onFileDialogCancel() {

}

function onFileDialogFile(path) {
$i("uploadfile").value=path;
$i("doSave").click();
}

var openfiledialog = function(){
document.FileOpenApplet.openDialog('onFileDialogFile',
'onFileDialogCancel');
};



KumuEventConf = {

        'click_*import*' : openfiledialog,
        'click_*AddNew*'  : validateAdd,
        'click_*Save*'   : validate


}

</script>


Html

<fieldset style="width:700px">
<table width="90%" align="center">
<tr>
<td><label id="yearmonthLabel"></label>
<span class="required" id="requiredyearmonthLabel"></span></td>
<td><input type="text" id="yearmonth"  class="textbox"></input></td>
</tr>
<tr>
<td><label id="empcodeLabel"></label>
<span class="required" id="requiredempcodeLabel"></span></td>
<td><input type="text" id="empcode"  class="textbox"></input></td>
</tr>
<tr>
<td><label id="empnameLabel"></label>
<span class="required" id="requiredempnameLabel"></span></td>
<td><input type="text" id="empname" size="40"  class="textbox"></input></td>
</tr>

<tr>
<td colspan="2" align="left"><input type="button" id="*Save*"
value="SaveLabel"></input></td>
<td align="right"><input type="text" id="uploadfile"
style="display:none"/></td>
<td align="right"></td>
</tr>
</table>
</fieldset>
</center>
<input type="button" id="*doSave*" style="display:none"></input>
<div style="width:700px" align="right">
<input type="button" id="*AddNew*" value="AddNewLabel"></input>
<input type="button" id="*import*" value="importLabel"/><input type="button"
* id="doUpload*" style="display:none" value="Upload"/>
</div>
<center>
<br/>
<input type="button" id="*doAddNew*" style="display:none"></input>

<table class="container" bordercolor="#408080" border="1">
<tr class="detailheading" align="center" id="headingsItems">
<div id="isHeadDisplay">
<td colspan="2"><label id="projectcode"/></td></div>
<td><input type="text" size="5" id="heading"></input>
</td>
</tr>
<tr id="secondheadingsItems">
<div id="isSecHeadDisplay">
<td align="center" colspan="2"><label id="dateheading"/></td>
</div>
<td align="center"><label id="timeLabel"/><input type="text" size="4"
id="headingaaa" style="display:none"/></td>
</tr>

<tbody id="entryItemsItems">
<tr id="*entryItems*">
<div id="isFirst">
<td width="30px"><input type="text" size="4" id="dates" class="txtspn"
readonly="1"/></td>
<td width="30px"><span id="day"/></td>
</div>
<td width="60px"><input type="text" id="*worktime*"/></td>
</tr>
</tbody>

</table>

If i press enter key while the input focus in worktime input of
entryItems *AddNew
*button get clicked(IE) and *doSave* button get clicked in Firefox.

Reagards,
トマス






2009/9/2 [E-MAIL ADDRESS DELETED] <[E-MAIL ADDRESS DELETED]>

> Hi, thomas.
>
> You might be hooking doing Enter key.
>
> Please show your JavaScript and HTML.
>
> ---
> Masaaki Yonebayashi
>
> thomas さんは書きました:
> > Hai,
> >
> > In my project i have some textfields and some buttons.
> >
> > While typing some value for input fields if i click [Enter キー] domethod
> of
> > some button is called.
> >
> > I do not want this happen,domethod of button has to be called only if i
> > click the corresponding button.
> >
> > How can i achieve this?
> >
> > Regards,
> > トマス
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20090902/2474ce3b/attachment.html>


Seasar-user メーリングリストの案内