Clientside Animated Gif

Results 1 to 2 of 2

Thread: Clientside Animated Gif

  1. #1
    Join Date
    Dec 1969

    Default Clientside Animated Gif

    Dear All,<BR><BR>I am new C# Web Developer.Currently i am in a process of <BR>Converting existing Website developed using ASP into ASP.NET.<BR>And struck with some problems of which i need some guidence from <BR>techies here.<BR>Hope technical peoples are here to solve the porblem.<BR><BR><BR>Problem 1:<BR>In my ASP page,i have a 5 select list tags which are show below.<BR>&#060;select id="Level1" onChange="showImageProcessing();document.form1.sub mit();"&#062;<BR>&#060;/select&#062;<BR><BR>&#060;select id="Level2" onChange="showImageProcessing();document.form1.sub mit();"&#062;<BR>&#060;/select&#062;<BR><BR>&#060;select id="Level3" onChange="showImageProcessing();document.form1.sub mit();"&#062;<BR>&#060;/select&#062;<BR><BR>&#060;select id="Level4" onChange="showImageProcessing();document.form1.sub mit();"&#062;<BR>&#060;/select&#062;<BR><BR>&#060;select id="Level5" onChange="showImageProcessing();document.form1.sub mit();"&#062;<BR>&#060;/select&#062;<BR><BR>showImageProcessing() method will set the div tag style visiblity property to true.<BR><BR><BR>&#060;div id=&#039;loadingmsg&#039; style=&#039;BORDER-RIGHT: thin; BORDER-TOP: thin; Z-INDEX: 2; LEFT: 275px; VISIBILITY: hidden; BORDER-LEFT: thin; WIDTH: 88px; BORDER-BOTTOM: thin; POSITION: absolute; TOP: 267px; HEIGHT: 16px&#039; align=&#039;center&#039;&#062;<BR> &#060;img style=&#039;WIDTH: 88px; HEIGHT: 16px&#039; alt=&#039;Processing.....&#039; loop=&#039;1000&#039; src=&#039;images/Processing.gif&#039; name=&#039;imgLoading&#039;&#062;<BR>&#060;/div&#062;<BR> <BR><BR>The above is the code for DIV tag which contains a image.<BR>When the user selects the data from the select tag..image "Processing is set to visible and before the <BR>form is submitted.Which intimates the user that the form is under processing and once all the processing is done <BR>i set the div tag visiblity to false.<BR><BR>The same thing is to be done with ASP.NET and C#.<BR>I tried to write onchange/onselectedIndexChange at client side but if i did so my server side code is overwritten and couldn&#039;t called.<BR>So ,i want to find a solution to this problem.<BR><BR>I want to know <BR>1.Is it possible to call server side event from client side and client side event from server side [Using ASP.NEt and C#]<BR>2.For a serverside control is it possible to write both client side and server side functionality.<BR>3.I need a sample code for those things.<BR><BR>Probelm 2:<BR>And one more thing which i don&#039;t understand was..<BR><BR>I had a web user control with five dropdown list and each of which <BR>has selectedIndex change event property.<BR>These events are fired when the user selects the data from that<BR>dropdownlist.<BR><BR>And also in a different situation in the sense when return to this form from a child form,i had submitted the form using the statment<BR>window.opener.form.submit();<BR><BR>An d i had called the <BR>Level1_SelectedIndexChange(this,new EventArgs());<BR>Level2_SelectedIndexChange(this,n ew EventArgs());<BR>Level3_SelectedIndexChange(this,n ew EventArgs());<BR>Level4_SelectedIndexChange(this,n ew EventArgs());<BR>Level5_SelectedIndexChange(this,n ew EventArgs());<BR><BR>like wise..<BR>but after completed all these things the control is returned to<BR>Level2_SelectedIndexChange() and then to <BR>Level3,Level4,Leve5..and its called twice.<BR>I dunno why and how this happens.<BR><BR>Will you please clear out with a solution to these problem.<BR><BR>Problem 3:<BR><BR>I have a server side TExTBox control in my webpage.<BR>when the user enters a value and press enter i want to call a event in server side<BR>which checks whether the user entered value is in Database or not.<BR>Since i have so many controls with different values so i cannot able to write a client side script to submit the page<BR>document.form.submit()...<BR><BR>And i had written a Textbox_Change event to do tht but what happens was whenever a value or key is pressed<BR>its posted back to server but i want to control that and post back has to occur only at that time <BR>when the user press the Enter key other wise its not posted back.<BR><BR><BR>Thanks for your help.<BR>Waiting positively for your code and suggestions or any ideas are welcome<BR><BR><BR>Thanks and Warm Regards<BR>Arulanantham.s<BR><BR><BR><BR><BR><BR>< BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default server vs. client script

    Hi<BR><BR>just for the first question(and globally...)<BR>As there has been pointed out many times now, it&#039;s important to not confuse client-side and server-side programming (even though new concepts like webControls seem to increase confusion about that). What you do is - as i understood it - call a java-script as soon as the dropdown gets changed. The script shows a layer and posts the form data. During all that, there is no server-activity. All this happens on the client-machine. The server comes into play as soon as the form got submitted (AFTER form1.submit()).<BR><BR>So there is no problem. Leave this code as is, javascript DOES NOT get replaced by c#, c# is not (for the moment) inteded to run on the client-machine (.net library is available on i guess &#060;1% of client-machines...).<BR><BR>For the other Problems, have a look at the html- and js- code that is sent to the client. The .net webControls render specific html and js-code that handles some of the client-activity. You should be aware of this code - have a look at it (using "view source" in the browser).<BR><BR>Hope that helps.<BR><BR><BR>Didosa<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts