hi,
this may help you...
[code=javascript]
function isURL ( txtId ){
var string = document.getEle mentById(txtId) .value;
if ( string.search(/^[a-zA-Z0-9\-\.]+\.(com|org|net |mil|edu|COM|OR G|NET|MIL|EDU)$/) != -1 ){
alert('Valid URL');
return true;
}
if ( string.search(/^[http://]+[a-zA-Z0-9\-\.]+\.(com|org|net |mil|edu|COM|OR G|NET|MIL|EDU)$/)...
User Profile
Collapse
-
hi,
ASP controls will run at server.. there you cant use the client side event handlers directly.
you can add the event handlers by this way
give this code in the page_load methodCode:controleName.Attributes.Add("onmouseover","return javascript_name();");
regards,Leave a comment:
-
[code=html]
document.onkeyu p = HandleKeyup;
function HandleKeyup(e){
if(!e){
e = window.event;
}
if(e.which == 13){
SomeFunction();
}
}
[/code]Leave a comment:
-
i tried with that only. i didn't get. so that only came to javascript.
ok thank you for spent time to my query
kind regards,
Prakash:)...Leave a comment:
-
pshm replied to How can I stop user from giong back to previous page thru backbtn if he's logged-out?in Javascripti don't know what to do in such case.
but you can intimate some message to the user if the javascript (or else written in some other scripting lang) is disabled
[code=html]
<noscript>
<!--message-->
your browser not supported the scripting languages
</noscript>
[/code]
if you knew plz tell to me
kind regards,
Prakash:)...Leave a comment:
-
hi,
do you know about asp.net
in this one event handler is there for handling the application_end event
but its not getting triggered properly.Code:void Application_End(object sender, EventArgs e) { // Code that runs on application shutdown }Leave a comment:
-
you can call this function init() in your append function also.
or you can add with in the script tag after the init(0 funtion definition
the value wat'er u r passing from a.jsp is present in b.jsp surely it will get reflect in b.jsp otherwise check the values in b.jsp...Code:window.document.onload = init();
Leave a comment:
-
hi try this with your jsp.. it may help you
[code=html]
<script type="text/javascript">
<!--
function init(){
document.getEle mentById('branc h').value = '<%= session.getAttr ibute( "theName" ) %>';
}
//-->
</script>
<body onload="init(); ">
<select name="branch" id="branch" size="1">...Leave a comment:
-
hi,
you need to go for AJAX... I think this will help you.
[code=html]
<script type="text/javascript">
<!--
var xmlHttpObj;
function getXMLHttpObjec t()
{
var xmlHttp=null;
try{
xmlHttp=new XMLHttpRequest( );
}catch (e){
...Leave a comment:
-
hi,
you need to use session or cookie to carry the value from one page to another page.
In jsp you can better use the session
in the first page set the value which was selected by the drop down
and you can retrive this from the next pageCode:<% session.setAttribute( "theName", name ); %>
Code:<%= session.getAttribute( "theName" ) %>
Leave a comment:
-
ya im using session. by default 20min. if the user doesn't have intraction for 20min the session will be expired, after 20min if he click on some controls it will be redirected to login screen there im clearing the flag in the DB.but the major issue is when he click the close button the session will automatically gets cleared by the browser but the userflag remains same in the DB....Leave a comment:
-
hi,
they are not javascript flags.
the flags belongs to database(SQL server2005).
in my project if any user logged into the system the flag will become true to that corrspond user.this i did in the page_load event.
if the user logged out the flag will be reset to false.
unfortunately if the user close the window without logging out the flages in the DB remains the same.The next time he can't login to the page....Leave a comment:
-
pshm replied to How can I stop user from giong back to previous page thru backbtn if he's logged-out?in Javascriptif you want to prevent this in javascript you can use this in the page load even
...Code:<script type="text/javascript"> javascript:window.history.forward(1); </script>
Leave a comment:
-
ya i knew for the popup...
in main window closing i need to clear some flags which was set while loading for that only im trying...Leave a comment:
-
-
i think there is no direct properties to control the components like text box
try this javascript it will help you
[HTML]<head>
<script type="text/javascript">
<!--
function acceptOnlyNumbe rs(id,limit){
if(event.keyCod e>=48 && event.keyCode<= 58){
var value = id.value;
if(value.length >= limit){...Leave a comment:
-
text files with flash
hi,
how to create and store text files in flash.?????
im using a text area component i need to store the content of the textarea into some .txt file
thankZ & regards,
Prakash M. -
window closing event
how to handle window closing event in javascript???
[code=javascript] window.onunload =function(){
if(window.event .clientY < 0 && window.event.cl ientY < -80){
alert('window close event triggered');
}
}[/code]
this is working bassed on the mouse cursor.. in some case its not working... is there any alternate way to solve this prob??????
Regards,
Prakash M. -
try with this
document.formna me.controlname. focus();
or
document.getEle mentById('id of the control').focus ();
ex:
[HTML]<script type="text/javascript">
<!--
window.onload=f unction(){
document.getEle mentById('txtUI D').focus();
}
-->
</script>
<body>
<input type="text"...Leave a comment:
No activity results to display
Show More
Leave a comment: