Jump to content
xisto Community
Sign in to follow this  
iGuest

Need A Javascript To Enable / Disable Buttons I need a script

Recommended Posts

Hey...I need a javascript script(I think its java)What i want the script to do:You have 2 buttons on a page 1 is a enter a different part of the site the other one is a vote which brings up a pop-up page. i want the script to make it so you have to click the vote button before being able to click the enter button.If you can do it,Thanks. post the script here

Share this post


Link to post
Share on other sites

Errg. There's a pretty big difference between Javascript and Java. What you're asking for here is most definitely Javascript, which is used on the internet to make dynamic web pages. Java is a whole different matter entirely--it doesn't have to be used on the internet and is quite versatile in terms of uses. (Servlets, applets, so on and so forth)

As for what you're looking for, I'd suggest you search Google. I just searched for "disable enable button javascript" and this script came up. Perhaps something like this will help:

<script language="javascript">function enableField(){document.form1.address2.disabled=false;} </script><a href="java script:enableField()">Click here to enable the element<a/>

Basically the form element address2 is disabled from the start and when you click on the link that leads to java script:enableField(), javascript will change document.form1.address2.disabled to false which enables the form field. As for your pop-up, you could just make the href part direct to a popup as well as have the javascript function called.

Share this post


Link to post
Share on other sites

disabling buttons in jsp

Need A Javascript To Enable / Disable Buttons

 

I have several text fields on my jsp which becomes editable only on clicking the 'edit' button corrosponding to each field.When I click the edit button for a particular text field,it becomes becomes editable and save button appears inplace of all the edit buttons

 

-reply by shilpy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.