User Profile

Collapse

Profile Sidebar

Collapse
pshm
pshm
Last Activity: Mar 23 '10, 10:04 AM
Joined: Mar 24 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pshm
    replied to java script for url validation
    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)$/)...
    See more | Go to post

    Leave a comment:


  • pshm
    replied to onmouseover in <asp:textbox>
    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
    Code:
    controleName.Attributes.Add("onmouseover","return javascript_name();");
    give this code in the page_load method

    regards,
    See more | Go to post

    Leave a comment:


  • [code=html]
    document.onkeyu p = HandleKeyup;

    function HandleKeyup(e){
    if(!e){
    e = window.event;
    }
    if(e.which == 13){
    SomeFunction();
    }
    }
    [/code]
    See more | Go to post

    Leave a comment:


  • thank you for ur tip:)
    regards,...
    See more | Go to post

    Leave a comment:


  • pshm
    replied to window closing event
    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:)...
    See more | Go to post

    Leave a comment:


  • i 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:)...
    See more | Go to post
    Last edited by gits; Mar 25 '08, 01:51 PM. Reason: fix code tags

    Leave a comment:


  • pshm
    replied to window closing event
    hi,
    do you know about asp.net
    in this one event handler is there for handling the application_end event
    Code:
    void Application_End(object sender, EventArgs e) 
        {
            //  Code that runs on application shutdown     
        }
    but its not getting triggered properly.
    See more | Go to post

    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
    Code:
    window.document.onload = init();
    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...
    See more | Go to post

    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">...
    See more | Go to post

    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){

    ...
    See more | Go to post

    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
    Code:
    <%
       session.setAttribute( "theName", name );
    %>
    and you can retrive this from the next page
    Code:
    <%= session.getAttribute( "theName" ) %>
    See more | Go to post

    Leave a comment:


  • pshm
    replied to window closing event
    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....
    See more | Go to post

    Leave a comment:


  • pshm
    replied to window closing event
    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....
    See more | Go to post

    Leave a comment:


  • if 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>
    ...
    See more | Go to post

    Leave a comment:


  • pshm
    replied to window closing event
    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...
    See more | Go to post

    Leave a comment:


  • pshm
    replied to window closing event
    hi,
    thanks for reply. I need this in main window....
    See more | Go to post

    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){...
    See more | Go to post
    Last edited by gits; Mar 24 '08, 12:32 PM. Reason: added code tags

    Leave a comment:


  • pshm
    started a topic text files with flash

    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.
    See more | Go to post

  • pshm
    started a topic window closing event

    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.
    See more | Go to post
    Last edited by gits; Mar 24 '08, 12:35 PM. Reason: added code tags

  • pshm
    replied to Focus cursor to textbox
    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"...
    See more | Go to post
    Last edited by acoder; Mar 24 '08, 09:25 PM. Reason: Added code tags

    Leave a comment:

No activity results to display
Show More
Working...