Question about The PHP Group PHP

1 Answer

Integrating JavaScript within PHP....

I was wondering how to enable and disable form buttons, depending on which button I select, with JavaScript within PHP?


I have 5 buttons: "New Conference Leader', Save Conference Leader", Unlock Conference Leader", "Update Conference Leader", and "Delete Conference Leader". Update and Save buttons are disabled when the page loads.

So for example if I select "New Conference Leader" button, all buttons including "New Conference Leader" should be disabled, except for "Save Conference Leader", which should be then enabled.

All the help will be helpful:). I have had an error on the page when I run the PHP script saying that it was successful but with errors or something.

Thanks,

JMan82

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 13 Answers

If you're trying to do this with PHP, you might be more successful creating an initial page with the buttons that should be enabled at the start (New, Update, Delete), and then create a sub-page that displays a different form depending on the action the user selected previously. This way, the user only sees the buttons relevant to his/her current action. Here's some beginning code to help you out:

<?php

$action = $_POST['action'];

if($action == 'new')

{
//display the form for creating a new conference leader
}

else if ($action == '$update')

{
//display the form for updating a conference leader
}

et cetera.


Each sub-form would be processed by a third-level page (e.g. handle_create.php, handle_delete.php, etc.)

Posted on Oct 05, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How do iactvate java script?


Google Chrome
  1. On the web browser menu click on the "Customize and control Google Chrome" and select "Settings".
  2. In the "Settings" section click on the "Show advanced settings..."
  3. Under the the "Privacy" click on the "Content settings...".
  4. When the dialog window opens, look for the "JavaScript" section and select "Allow all sites to run JavaScript (recommended)".
  5. Click on the "OK" button to close it.
  6. Close the "Settings" tab.
  7. Click on the "Reload this page" button of the web browser to refresh the page.

Internet Explorer

  1. On web browser menu click "Tools" icon and select "Internet Options".
  2. In the "Internet Options" window select the "Security" tab.
  3. On the "Security" tab click on the "Custom level..." button.
  4. When the "Security Settings - Internet Zone" dialog window opens, look for the "Scripting" section.
  5. In the "Active Scripting" item select "Enable".
  6. When the "Warning!" window pops out asking "Are you sure you want to change the settings for this zone?" select "Yes".
  7. In the "Internet Options" window click on the "OK" button to close it.
  8. Click on the "Refresh" button of the web browser to refresh the page.
Internet Explorer < 9
  1. On web browser menu click "Tools" and select "Internet Options"
  2. In the "Internet Options" window select the "Security" tab.
  3. On the "Security" tab click on the "Custom level..." button.
  4. When the "Security Settings - Internet Zone" dialog window opens, look for the "Scripting" section.
  5. In the "Active Scripting" item select "Enable".
  6. When the "Warning!" window pops out asking "Are you sure you want to change the settings for this zone?" select "Yes".
  7. In the "Internet Options" window click on the "OK" button to close it.
  8. Click on the "Refresh" button of the web browser to refresh the page.

Mozilla Firefox

  1. In the address bar, type about:config and press Enter.
  2. Click "I'll be careful, I promise" if a warning message appears.
  3. In the search box, search for javascript.enabled
  4. Toggle the "javascript.enabled" preference (right-click and select "Toggle" or double-click the preference) to change the value from "false" to "true".
  5. Click on the "Reload current page" button of the web browser to refresh the page.

Opera

  • 1. a) Click on "Menu", hover mouse on the "Settings" then hover mouse on the "Quick preferences" and mark the "Enable Javascript" checkbox.
  • 1. b) If "Menu bar" is shown click on the "Tools", hover mouse on the "Quick preferences" and mark the "Enable Javascript" checkbox.

Apple Safari

  1. On the web browser menu click on the "Edit" and select "Preferences".
  2. In the "Preferences" window select the "Security" tab.
  3. In the "Security" tab section "Web content" mark the "Enable JavaScript" checkbox.
  4. Click on the "Reload the current page" button of the web browser to refresh the page.
How to enable JavaScript in your browser

Oct 12, 2015 | Computers & Internet

1 Answer

I need to enable java script on my browser


To allow all Web sites in the Internet zone to run scripts, use the steps that apply to your browser:
Windows Internet Explorer(all versions except Pocket Internet Explorer)
Note To allow scripting on this Web site only, and to leave scripting disabled in the Internet zone, add this Web site to the Trusted sites zone.
  1. On the Tools menu, click Internet Options, and then click the Security tab.
  2. Click the Internet zone.
  3. If you do not have to customize your Internet security settings, click Default Level. Then do step 4
  4. If you have to customize your Internet security settings, follow these steps:
    a. Click Custom Level.
    b. In the Security Settings - Internet Zone dialog box, click Enable for Active Scripting in the Scripting section.
  5. Click the Back button to return to the previous page, and then click the Refresh button to run scripts.
Mozilla Corporation's Firefox version 2
  1. On the Tools menu, click Options.
  2. On the Content tab, click to select the Enable JavaScript check box.
  3. Click the Go back one page button to return to the previous page, and then click the Reload current page button to run scripts.
Opera Software's Opera version 9
  1. On the Tools menu, click Preferences.
  2. On the Advanced tab, click Content.
  3. Click to select the Enable JavaScript check box, and then click OK.
  4. Click the Back button to return to the previous page, and then click the Reload button to run scripts.
Netscape browsers
  1. Select Edit, Preferences,Advanced
  2. Click to select Enable JavaScript option

Sep 12, 2011 | Computers & Internet

1 Answer

I want to return to my old yahoo mail not beta I dont like it at all if i can not get it retured back i will change from yahoo


After switching to beta Yahoo wouldn't allow you to return to the classic version of yahoomail. However there is a way to get through this. Turn off the Javascript of your browser. ___________________________________

In case you dont know how to turn the javascript off:
Internet Explorer: tools > internet options > security. In security click "custom level" > disable Active Scripting in the scripting section.

Firefox: tools > options > content > click on "disable Javascript".

Google Chrome: Wrench button (on the upper right of the browser) > options > Under the Hood > Content Settings button > select "Do not allow any site to run JavaScript" in the Javascript section.
___________________________________

After disabling your javascript try to reload the page of your yahoomail. Then You will be asked to enable javascript or switch back to an older version of yahoomail (located at the lower part). Of course click the option that says return to an older version of yahoomail which is the last option. After that you will be brought back to your yahoomail classic view.
After doing this, DO NOT FORGET TO TURN YOUR JAVASCRIPT ON since there are functions in yahoomail that required javascript.

Jul 12, 2011 | Yahoo Mail

1 Answer

I want to return to my original yahoo mail not beta


After switching to beta Yahoo wouldn't allow you to return to the classic version of yahoomail. However there is a way to get through this. Turn off the Javascript of your browser. ___________________________________

In case you dont know how to turn the javascript off:
Internet Explorer: tools > internet options > security. In security click "custom level" > disable Active Scripting in the scripting section.

Firefox: tools > options > content > click on "disable Javascript".

Google Chrome: Wrench button (on the upper right of the browser) > options > Under the Hood > Content Settings button > select "Do not allow any site to run JavaScript" in the Javascript section. ___________________________________

After disabling your javascript try to reload the page of your yahoomail. Then You will be asked to enable javascript or switch back to an older version of yahoomail (located at the lower part). Of course click the option that says return to an older version of yahoomail which is the last option. After that you will be brought back to your yahoomail classic view.
After doing this, DO NOT FORGET TO TURN YOUR JAVASCRIPT ON since there are functions in yahoomail that required javascript.

Jul 12, 2011 | Yahoo Mail

1 Answer

We would like to switch back to classic view


After switching to beta Yahoo wouldn't allow you to return to the classic version of yahoomail. However there is a way to get through this. Turn off the Javascript of your browser. ___________________________________

In case you dont know how to turn the javascript off:
Internet Explorer: tools > internet options > security. In security click "custom level" > disable Active Scripting in the scripting section.

Firefox: tools > options > content > click on "disable Javascript".

Google Chrome: Wrench button (on the upper right of the browser) > options > Under the Hood > Content Settings button > select "Do not allow any site to run JavaScript" in the Javascript section. ___________________________________
After disabling your javascript try to reload the page of your yahoomail. Then You will be asked to enable javascript or switch back to an older version of yahoomail (located at the lower part). Of course click the option that says return to an older version of yahoomail which is the last option. After that you will be brought back to your yahoomail classic view.
After doing this, DO NOT FORGET TO TURN YOUR JAVASCRIPT ON since there are functions in yahoomail that required javascript.
:)

Jul 11, 2011 | Yahoo Mail

1 Answer

Cannot watch video's on youtube on my blackberry 9700... How do I enable my JaveScript


While browsing a page you can press 'j' for enabling JavaScript. On the other hand you can keep your browser enabled for JavaScript all the time by following the below steps -



  1. open BlackBerry Internet Browser
  2. press Menu button
  3. select Options
  4. under Web Content check Enable JavaScript
Go to Browser->Options->Browser Configuration->Scroll down->Enable "Support JavaScript"->Save Options
I hope this helps

Dec 15, 2010 | Computers & Internet

1 Answer

How to use disable videos on youtube


If you're using Firefox, go to the Tools tab.
-Click Options
-Click the contents tab
-Uncheck the boxes "Enable Javascript" and "Enable Java."
-Click Okay button.

For Internet Explorer, you can add www.youtube.com to the Restricted list sites list..
-Click Tools and select Internet Options
-Click the security tab
-Select the Red Circle with strike through called "Restricted Sites"
-Click the "Sites" button
-Type in www.youtube.com
-Click Add
-Click Close
-Click Ok.

Nov 28, 2010 | YouTube Videos

1 Answer

How do i create a software? it should be like microsoft word


Creating a software requires a lot of programming skills and extensive testing!
You need to learn Visual Basic,Java,C++,C# and gain more experience in it by building applications in bits and try to integrating it to make somewhat complex application.
If you want,you can make somewhat formatable microsoft word like version with HTML and Javascript and can include save options with PHP! Use forms to edit text!

Oct 17, 2010 | Computers & Internet

1 Answer

I can't get adobe flash to download on my windows vista. I get error 19166


follow these steps:
1.First, Uninstall with Adobe's Flash Player Uninstaller:
http://download.macromedia.com/pub/f...ash_player.exe
2.Re-install the full version of flash player :
http://fpdownload.macromedia.com/get...r_active_x.msi

If these two option did not solve your problem maybe you have javascript disabled follow the steps descrived below:
In Internet Explorer:
Select tools -> Internet Options
Click on the "security" tab
Click on "custom level"
Scroll down to the Scripting option
Select "Enable" for "Active Scripting and Scripting of Java Applets"
Click "ok"
Select YES if a confirmation box appears
Click "ok" and close the window.
Hit "F5" to reload the page.

In Mozilla Firefox:
Click tools -> Options
Click "content" in the options list
Check the box next to "Enable JavaScript"
Click the "Advanced" button
Check the boxes under "allow scripts" to enable JavaScript.
Click "Ok" twice.
Hit F5 to reload the page.

Feb 15, 2010 | HP Computers & Internet

1 Answer

Yahoo site webpage and email loading problem


i think your javascript support is turned of from your browser. if you use Internet Explorer,


Go to "View -> Internet Options -> Security tab
Select "Custom" and click on the "Settings..." button
To enable: make sure "Enable" is selected under "Active scripting"
To disable: make sure "Disable" is selected under "Active scripting"

For FireFox
Go to "Tools" -> "Options"
Go to "Content" tab and "Enable JavaScript"

For Opera
Go to "Tools" -> "Preferences"
Go to "Advanced" tab -> "Content" and "Enable JavaScript"

Apr 04, 2009 | Yahoo Mail

Not finding what you are looking for?
The PHP Group PHP Logo

Related Topics:

621 people viewed this question

Ask a Question

Usually answered in minutes!

Top The PHP Group Computers & Internet Experts

dhnguyen

Level 2 Expert

272 Answers

Robin Hill
Robin Hill

Level 3 Expert

1262 Answers

Mike

Level 3 Expert

4332 Answers

Are you a The PHP Group Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...