on 2005 May 24 11:10 AM
Hi,
I am doing some validations ( check if e-mail is filled ) on an input field through JavaScript. If there is a valid entry the serverside event may proceed.
If there isn't an entry I display a pop-up but I don't want to trigger the serverside event.
This is the code for the button :
<htmlb:button id = "order"
text = "<%= otr(zbc10/bestel) %>"
onClick = "me_Order"
onClientClick= "thx_win()"/>
And this is the JS :
function thx_win(){
var cfoo = document.getElementById("wa_head-email").value;
if (cfoo==""){
alert("<%= otr(zbc10/no_email) %>");
return false;
}
else{
thx_win = window.open("http:..../sap/zz_cust_caddie/confirmation2.htm",
"", 'toolbar, width=400,height=150');
}
}
Is there a way of doing this ?
Thanks in advance.
Dirk.
try this
<htmlb:button id = "SAV"
text = "Save Definition"
onClientClick = "var Check = document.getElementById('DID'); if(Check.value == ''){ alert('Enter Key Word'); htmlbevent.cancelSubmit = true; }"
onClick = "SAV"
design = "small"
width = "50" />
i am checking for a inputfield, if its empty i am throwing alert box and no server event.
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dirk,
try this, it may help u.
<%data onClientClick type string value 'alert("Hello Dirk");'.%>
<htmlb:button id= "kamaljeet"
text = "onClientClick"
onClientClick = "<%= onClientClick %>" />
Regards,
Kamaljeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.