In Flex,how to make lost focus of textinput on enter click?

Hi
In Flex,how to make lost focus of textinput on enter click of keyboard ?
Thanks,
Sunil

Hi vibhuti,
     I  got your point but it will not helpful to me.
    But I found solution ,When user clicks enter key make stage.focus = null  so it will lost focus on text input and make focus in my current Alert Box.
Thanks,
Sunil

Similar Messages

  • How to make the focus to the TextInput field

    Hi,
            How to make the focus to the TextInput field. I tried with userIDTxtIt.setFocus();  The focus is available to the text input. but when i enter the value as 'Thiru' to the TextInput field, the keyboard is not available there. so i tried with userIDTxtIt.dispatchEvent(new MouseEvent(MouseEvent.DOUBLE_CLICK));
    still key board focus is not availble to the text input.
    Regards,
    Thiru

    Thanks for your reply.
       I got the more info by reading the comments inthe following link.
    http://blog.flexexamples.com/2008/09/23/setting-focus-in-flex-using-the-focus-manager/
    regards,
    Thiru

  • After clicking on an open tab, how to make the focus automatically go to the body of page?

    After clicking on an open tab, how to make the focus automatically go to the body of page?
    Right now, clicking in an open tab and using arrow keys now moves through the open tabs. I liked the old versions where right after clicking in a tab you could directly go to navigate the page with the arrow keys.
    Is there a something I can change in about:config to change this behavior?
    Thanks in advanced.

    Firefox should still set the focus the the browser area if you click a tab.<br />
    Only with very old browser versions you could set the focus to a tab by clicking a tab.
    This behavior is likely caused by an extension.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How to make smart shape buttons turn colors after clicking on them?

    How to make smart shape buttons turn colors after clicking on them?  I am using buttons as links to learning paths and would like users to know which buttons they have allready clicked on when returning to main menu.

    This is reply I got from Adobe support.  I will try and let you all know what works best:
    Here is the workflow which you can follow to achieve this functionality.
    Puspendra: You can choose image button and then choose from the available image buttons, or click on the folder icon when you select the image button and choose from the Gallery of Captivate 6.
    Puspendra: Few image buttons change color on hover or onclicked, these effects are predefined in them.
    Puspendra: Or you can edit that button on which you are working, from properties Panel.
    Puspendra: The Post and Cancel button on this thread seems like a transparent button in Captivate with different fill and stroke color, and transparency is also less, and with corner radius of 0.
    Puspendra: You will find these all optionns, when you will click on that button and then click on the properties panel.

  • [Flex 4.5.1] How to remove focus from TextInput on mouse click outside of it?

    For me clicking outside of a TextInput should always remove focus from it, only only if you click on another TextInput or Button.
    I don't see any simple event like MouseEvent.MOUSE_CLICK_OUTSIDE - which would definitely simplify things.. I wonder why there isn't such event. Well anyway I can't find any other similar event and I can't figure out an easy way to do this. I also wonder why I couldn't find a solution to this on the web easily... Well anyway...
    Does someone know how to do that in a convenient way?
    Thanks!

    ok I understand why is that. For example I have a TextInput now where the user enters number through buttons which have mouseFocusEnabled = false, so the TextInput doesn't lose focus. But on a TabBar I had to set mouseFocusEnabled = true or when I switched between tabs -> switches between states, I could still type in the TextInput in the previous tab cause it didn't lose focus. Maybe TabBar's default value of that property is wrongly set to false.
    Anyway, not losing focus when clicking outside is still weird. Take for example this forum, if I click outside of the box I am currently writing this, I lose focus. It's how things usually work. And flex focus is designed to work backwards to what people are used to, no matter as I already pointed out I understand there are cases it comes in handly. I hope I don't sound bad but take it just as a suggestion please that maybe if it is redesigned like this: clicking on component gets focus, clicking outside loses focus. But if you click on a button for example and you want to keep the focus on a TextInput cause you add some text, you should be able to set a property on the Button like maintainCurrentFocus = true (false by default), which would make clicking on the Button not shift the focus to it or set it to null if the component is a group that has some rect background for example, but maintain the focus on the TextInput.
    I could be missing something about the current design of how the focus works in flex, but from my point of view at the moment, the design I describe to use is just like how I am usually used to be working with focus as a user, not as developer.
    Maybe you could agree or maybe you know some reason by which things are how they are at the moment that I don't see. But if you think I make sense please let me know, maybe I could fill a minor enhancement request for that ?

  • TFS 2012 - How to make TFS focus Team users only to the scope of their Team

    We have a Team Project with couple of Teams defined under it.
    Some users of a certain Team, want to focus their work access in TFS only to their own team, and as possible not see any other team nor the TFS Default team in the browse lists in TFS Web Access and in Visual Studio Team Explore.
    It is possible to give those users write access only to the Area of their team, and deny write access for them to all other teams including Team Project Default top level (by simply putting Deny in Edit Work Items permission of the top level Area, and Allow
    in the same permission of the specific team). However, these users will still see the list of other teams and the root team project, in browse list, because they are contributers at Team Project Level.
    Can u advise as per a simple workable solution ? Thank u.

    Hi Moital,  
    Thanks for your reply.
    As far as I know there’s no default way to limit the team users browser other teams from TFS Web Access team project page. But I think the team users cannot view the items in other team’s backlog pages although they can browser to other team’s backlog page.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to make a button stay down when I click on it in  CSS nav bar.

    So I have created a horizontal navigation bar, I use the CSS
    Sprites/Pixy method to get the hover working with the same image as
    the link/in active stage of the buttons.
    Now how do I make the button stay down when someone click on
    them?
    These are the codes for the nav bar.
    #nav{
    width: 780px;
    list-style: none;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    padding: 0;
    height: 40px;
    #nav li{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    float: left;
    padding: 0;
    #nav a{
    width: 125px;
    display: block;
    color: #000000;
    text-decoration: none;
    text-align: center;
    background-image: url(ZITTO_IMAGES/button_set1a.jpg);
    background-repeat: no-repeat;
    background-position: center 2px;
    padding-top: 14px;
    padding-bottom: 10px;
    background-color: #000000;
    #link2,#link3,#link4,#link5,#link5,#link6 { margin-left:
    6px;}
    #nav a:hover{
    background-image: url(ZITTO_IMAGES/button_set1a.jpg);
    background-repeat: no-repeat;
    background-position: center -36px;
    color: #FFFFFF;
    width: 125px;
    padding-top: 14px;
    padding-bottom: 10px;
    background-color: #000000;
    Everything works so far, the hover works when you roll the
    mouse but when you click the button goes right back.
    How can I make it stay down and then go back to normal when
    you click on another link/button?
    Thanks very much.
    Patrick

    Read my suggestion again. You are missing a critical point. I
    show you
    exactly where to put the stylesheet. And it doesn't matter
    how many
    stylesheets you have on a page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Change this -
    >
    > #nav a{
    > width: 125px;
    > display: block;
    > color: #000000;
    > text-decoration: none;
    > text-align: center;
    > background-image: url(ZITTO_IMAGES/button_set1a.jpg);
    > background-repeat: no-repeat;
    > background-position: center 2px;
    > padding-top: 14px;
    > padding-bottom: 10px;
    > background-color: #000000;
    > }
    >
    > #link2,#link3,#link4,#link5,#link5,#link6 { margin-left:
    6px;}
    >
    >
    > #nav a:hover{
    > background-image: url(ZITTO_IMAGES/button_set1a.jpg);
    > background-repeat: no-repeat;
    > background-position: center -36px;
    > color: #FFFFFF;
    > width: 125px;
    > padding-top: 14px;
    > padding-bottom: 10px;
    > background-color: #000000;
    > }
    >
    > to this -
    >
    > #nav a{
    > width: 125px;
    > display: block;
    > color: #000000;
    > text-decoration: none;
    > text-align: center;
    > background-image: url(ZITTO_IMAGES/button_set1a.jpg);
    > background-repeat: no-repeat;
    > background-position: center 2px;
    > padding-top: 14px;
    > padding-bottom: 10px;
    > background-color: #000000;
    > }
    >
    > #link2,#link3,#link4,#link5,#link5,#link6 { margin-left:
    6px;}
    >
    >
    > #nav a:hover{
    > background-position: center -36px;
    > color: #FFFFFF;
    > }
    >
    > Then on each individual page, change this -
    >
    > </head>
    >
    > to this -
    >
    > <style type="text/css">
    > #nav a#link4 {
    > background-position:center - 36px;
    > }
    > </style>
    > </head>
    >
    > (for link4, for example)
    >
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > >
    quote:
    Originally posted by:
    Newsgroup User
    > > When they click on a button, do they go to another
    page? And is each
    > > button
    > > uniquely identified?
    > >
    > > If so, then put a little stylesheet on each such
    page that sets the
    > > particular button to the down sprite settings,
    e.g.,
    > >
    > > a#link6 { downspritevalues }
    > >
    > > --
    > > Murray --- ICQ 71997575
    > > Adobe Community Expert
    > >
    > >
    > > This is the link to the page.
    > >
    http://www.patrickjudson.com/zitto_web1d.html
    > > What state do I use to get this effect? The active
    or the visited?
    > >
    > > I want the buttons to remain down when click or
    even better, how do I
    > > get
    > > the
    > > welcome button to appear down when a person visits
    the page to show them
    > > they
    > > are at the home page.
    > >
    > > Thanks so much. Patrick
    > >
    > >
    > >
    >
    >
    >
    > Hey! Murray, thanks very much for the efforts. However
    I'm still confused
    > as
    > to where to insert the individual styles on each page.
    >
    > The pages already have a style sheet, in fact they all
    share the same
    > style
    > sheet. The following codes below is what you instructed
    but I'm confused
    > as to
    > where to insert them since the page already has a head
    opening and closing
    > as
    > well as a style opening and closing tags. Can you please
    add the codes you
    > instructed so I can see where they go and how to
    implement them?
    >
    > Thanks - Patrick
    >
    >
    > Then on each individual page, change this -
    >
    > </head>
    >
    > to this -
    >
    > <style type="text/css">
    > #nav a#link4 {
    > background-position:center - 36px;
    > }
    > </style>
    > </head>
    >
    > (for link4, for example)
    >
    >
    >
    >

  • How to make a button appear boxed in when clicked

    For my Prototyping class I have to make an interactive fast food ordering system. I have majority of frames made I just need to add the interactive part to it. I am using AS2 in Flash CS3. I have the picture and the text grouped and are classified as a button. I want to make it so that when the picture or text is clicked it will make a black box appear around it, making it 'selected'. I've tried to add an Event Listener but couldn't figure out how to make the box appear on it. Any suggestions?
    These pictures are basically what I'm trying to accomplish.
    Keep in mind, I'm a Flash newbie, I have a probably 3 hours experience with Flash.
    But I do have knowledge of basic Java commands, so I can understand code.
    Thanks,
    Dudejoe04

    Onw way would be to create the buttons as movieclips so that when they are selected you move the movieclip's timeline to a rame that shows the rectangle around it.  Another way would be to have the movieclips as separate objects that you make appears when its associated button is clicked.  There are likelynumerous other possibilities.

  • How to make a menu (opened by an on click event) stay open on the following pages

    Hi,
    I have a side menu that shows the main headings only, when clicked it displays the rest of the menu using and slide effect, with an option to close the menu, on reversing the slide. This all works perfectly but what i want to be able to do is, when a users opens a menu and then uses that menu to navigate to another page, on that new page i want that menu that was opened to stay open on this next page.
    The code i have so far is below:
    // the function for the effect
    function MM_effectBlind(targetElement, duration, from, to, toggle)
        Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    // the function to ensure the menu is unopened on page load
    function myFuncDisplay (){
    document.getElementById ('menu1').style.display='none';
    document.getElementById ('menu2').style.display='none';
    document.getElementById ('menu3').style.display='none';
    document.getElementById ('menu4').style.display='none';
    document.getElementById ('menu5').style.display='none';
    <body onload="myFuncDisplay ();">
    // the first menus code in the side menu that creates the on click and close menu actions
    <p onclick="MM_effectBlind('menu1', 1000, '0%', '100%', false)"  onMouseOver="this.style.color='#FFFFFF';" onMouseOut="this.style.color='#333333';">Menu One </p>
        <div id="menu1">
              <p class="close" onclick="MM_effectBlind('menu1', 1000, '100%', '0%', false); " onMouseOver=" this.style.color='#333333';" onMouseOut="this.style.color='#FFFFFF';"> close menu </p>
            <p><a href="firstLink.php">First Link</a></p>
            <p><a href="secondLink.php">Second Link</a></p>
            <p><a href="thirdLink.php">Third Link</a></p>
    I have tried setting a variable in the on click event then in the function myFuncDisplay() doing if else clauses to check if the variable was set and if so displaying the div as block in that function, expecting just that menu to display opened in sunsequent pages, it didn't work, itstead it displayed all menus open?
    Please can someone help me with a suggestion of how I can make this work, thank you in advance, i look forward to any replies.

    Hi,
    thanks for your reply, i am not actually using the spry menu, i am using the 'blind' effectthat I have adapted as per the code given, I wanted to make a menu that would open on click and the effect i have used works well, now  however I want the effect to remain open on different pages, as explained. i am looking for a way of adapting the function that makes the rest of the menu hidden on page load. So on page load the menu is hidden as per adapted code, apart from the menu heading, if the menu heading is clicked the menu opens, with an option to close it, if the user clicks on a link in the menu the new pages loads and the menu is   closed as per the onload instruction , I want a way to distinguish if the menu was clicked in one page it will recognise that and in the next page will not hide that particular menu until the user closes it themselves.
    Hope that makes it a bit clearer? look forward to any further help.

  • How to make  menuBar UI listen for top level click

    Hi,
            The  menubar only listen to the sub level menu item(i mean click), and I  would like to make menubar listen to top level also.
    for eg:
    NEWS-> worldnews.
    it listen the sublevel item worldnews ,i would like to make top level NEWS also.
    I  tried using selected index. sometimes  -1 was returned when I clicked  the “NEWS” item.  I assume this is because it has sub-menu items.
    can anyone give solution for this???????

    hi Neobox75,
    I have created an air application for a  news website( i didnt finsh it fully) . I display the images ,news everythng using feed. I used httpservice to get the values from the feed. now my problem is if i deploy this package to the user means if he has the internet connection ...All my information wil be displayed to him as i read all the information through feed .  if the network conection is not available(offline) means i have to  display the previous news and images to him( if v use timer to refresh it wil be cached in user system  but i dnt knw how to retreive from cache if the user is offline ).how it can be done please give the solution for it...
    regards,
    divya.

  • How to make locked iPod Touch to display "enter passcode"?

    My niece tried to unlock my iPod several times. Now it says "iPod is disabled connect to iTunes."
    How do I make it displaying passcode screen again so that I can enter the correct passcode?

    You have to restore the iPod
    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • How to make the DefaultMutableTreeNode response to the single click?

    I use the DefaultMutableTreeNode and JTree to construct a Tree but it seems that DefaultMutableTreeNode only response to double click.That means if I double click on the node of the tree if that node has children they will be displayed.but now I want DefaultMutableTreeNode response to single click,how can I do that?

    Hi, perhaps I could take a stab at this. I implemented such functionality by simply adding a mouse listener to my tree, and implementing the method 'public void mouseReleased(...)'. You could use the MouseEvent object to get the x,y coordinates of the click (simple so far)and then use:
    int selrow=tree.getRowForLocation(me.getX(),me.getY()); //where me is MouseEvent object and tree is the JTree.
    selrow>=1 if you have clicked any of the nodes after the root. this could then be used to check and perform the actions/code block you need when user clicks on a node.
    Hope this helps....it worked for me to show a popup menu as well as to highlight the selections...by using
    tree.setSelectionRow(selrow);
    Cheers
    Rajive

  • How to make a text field become empty when clicked in.

    I have an input textbox, if the user clicks 'submit' and the
    box is empty, it returns "please type answer here" in the input
    box. Is there a way to make it so when the user clicks in the input
    box it will turn back to blank and be ready to type instead of
    having to select the existing text and delete it?
    Thanks :)

    yep, use the onSetFocus method.
    my_text_field_instance_name.onSetFocus = function() {
    my_text_field_instance_name.text = "";
    but be careful here, because if the user fills in there info,
    then clicks off the text field then back on, the text will
    disappear, you will need to use a combo with onKillFocus or an if
    staement.... play with it. its real simple
    corey

  • Forms: how to make it so that when the user clicks something, another form pops up?

    Sorry if that's confusing, but like how for example, you have:
    ADDRESS: _________________________  +another address
    & then if the user typed in information into the address field and wanted another address, it would look like:
    ADDRESS: __________________________
    ADDRESS: __________________________ +another address
    & so on... is there a way to do this?

    What you want is something like this
    http://dynamicdrive.com/dynamicindex16/chainedselects/index.htm

  • How to make sure Office 365 (2013) Pro Plus click to run updates after it is installed on a computer

    We are getting ready to move from Office 2010 MSI to Office 365 (2013) click to run ProPlus.  Everything is ready to uninstall and install the new product. 
    My question is if the Updates Enabled="TRUE" is not in the configuration.xml file will machines with the click to run office 365 pull updates from the cloud?  I had been told that the Enabled=TRUE is not needed in the configuration file as
    it is a default setting.  We want our machines to pull down updates from the cloud in place of providing a manual update location on our network.
    Our configuration.xml file looks like this:
    <Configuration>
        <Add SourcePath="\\Server\Share" OfficeClientEdition="32" ForceDowngrade="TRUE" >
        <Product ID="O365ProPlusRetail">
          <Language ID="en-us" />
        </Product>
        </Add>
      <Display Level="NONE" AcceptEULA="TRUE" />
      <Logging Name="OfficeSetup.txt" Path="C:\temp" />
      <Property Name="AUTOACTIVATE" Value="0" FORCEAPPSHUTDOWN="TRUE" />
    </Configuration>
    Thanks,
    Brit

    I am trying more to control the process via GPO with a start-up script and have created a batch file which executes the below command. It works and installs which ever version you define in your .xml file, the only issue i am facing is that re-runs the setup
    at each reboot which isn't ideal. I am currently working on below script which could check the version of the office upon boot-up and only run if the specific version is not available. I have pasted the script right at the bottom of the page and if anyone
    could shed some light in making it to read the version value 
    "\\server\c2r\Office365 update\setup.exe" /configure "\\server\c2r\Office365 update\Customconfign.xml" (this is the batch-file used as a startup script)
    PLEASE NOTE: There are three <Add SourcePath in my Cutomconfig.xml and not all three are required I use the one i need by taking the <!-- and --> from the beginning and the end  of each line  
    <Configuration>
    <!-- <Add SourcePath="\\Server\Share\" OfficeClientEdition="32" > --> Can only be used to download latest version of ofice365 (specify sourcepath)
     <Add OfficeClientEdition="32" Version="15.0.4675.1002" > Use to download a office version direct from microsoft servers
    <!-- <Add SourcePath="\\server\c2r\Office365update" OfficeClientEdition="32" > --> to deploy software from internal network resource
        <Product ID="O365ProPlusRetail">
          <Language ID="en-us" />
        </Product>
      </Add>
    <Updates Enabled="TRUE" UpdatePath="\\server\c2r\Office365 update" />
      <Display Level="FALSE" AcceptEULA="TRUE" />
      <Logging Path="\\server\c2r\Office365 update\Install Logs" />
    <Property Name="FORCEAPPSHUTDOWN" Value="TRUE"/>  force closes any running office application
      <!--  <Property Name="AUTOACTIVATE" Value="1" />  -->
    </Configuration>
    this is what i am working on and wondered if any one would be able to rectify an issue with it as it doesn't seems to work
    setlocal
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\server\c2r\Office365 update\
    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\server\c2r\Office365 update\Customconfignonskype.xml
    REM Set LogLocation to a central directory to collect script log files (install log files are set in XML file).
    set LogLocation=%AppData%\Local\Temp
    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line (check quotes are quotes though).
    REM *********************************************************************
    REM Operating system is X64. Check for Office365 version in emulated propertyBag registry key
    :ARP64
    Reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v Version=%15.0.4711.1002%
    if NOT %errorlevel%==1 (goto DeployOffice) (goto End)
    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    echo %date% %time% Setup started. >> %LogLocation%\%computername%.txt
    start /wait %DeployServer%\setup.exe /configure %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End
    Endlocal

Maybe you are looking for

  • HT4847 Icloud storage

    I am a Smow Leopard User. I use Icloud only for mail and currently my account only has 8 messages. Why do I receive emails from ICLOUD telling me my Icloud storage is almost full? HOw can this be possible? There are no attachments, I didn't by anythi

  • What Apple cable do I need to play Movies...

    ...from my iPod Touch to my TV? I have an older video iPod that just uses the red, white and yellow cable and everything plays beautifully. With the iPod Touch I get just sound, but no picture. Any help is appreciated. TIA

  • Csv files for OBIA procurement and spend analytics

    hi, which csv files we need to configure in order to install OBIA 7.9.6.3 procurement and spend analytic for EBS R12 1 3 as source? In documentation, oracle given set of files for 11i & R12? do we need to configure csv files for both version ??? As p

  • Roll method doesn't work properly

    Hi there, I ran into a problem with the roll method of GregorianCalendar class. Suppose the date is April 6, 00:00:00 2002, the following code will go throught the time changes: GregorianCalendar cal = new GregorianCalender(); for (int i = 0; i < 24;

  • My screen is not working how can i reset my iphone 3gs

    I M UNABLE TO RESET MY IPHONE COZ SCREEN IS NOT RESPONDING, AND I HAVE TO RESET IT CAN ANY 1 TELL ME D WAY