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

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 iknow if my pc have javascript


To enable javascript on your computer (For internet Explorer)

1. Select Internet Explorer.
2. Select Internet Options from the Tools menu.
3. In Internet Options dialog box select the Security tab.
4. Click Custom level button at bottom. The Security Settings dialog box will pop up.
5. Under Scripting category enable Active Scripting, Allow paste options via script and Scripting of Java applets.
6. Click OK twice to close out.
7. Hit Refresh.

Best Regards

Jul 05, 2011 | Sun Compilers & Programming Tools

1 Answer

I cannot access my facebook because my jvascript is disable


Re-enable Javascript in your browser.

Options -> Content -> Enable Javascript (in Firefox)

Jun 25, 2011 | Sun Java Programming Language (cdj-275)

1 Answer

I have a flash button and an html textbox. how to show a value 10$ in html textbox on flash button click


I believe what you are looking for is what is known as "GetElementByID".
This is used in JavaScript to allow control over html elements within the page. This can also be used to control back and forth between JavaScript, the Flash movie, and the HTML code.
Here is a website explaining this.
http://www.permadi.com/tutorial/flashjscommand/
I hope this helps you, good luck!

Aug 10, 2010 | Compilers & Programming Tools

1 Answer

How to disable command button in visual basic


  • tep 1 Open Visual Basic and select "Standard Exe" to create a new project.
  • Step 2 Add a button by clicking the square button tool on the right, and then clicking and dragging in the main window.
  • Step 3 Click the button once to open the "Properties" window on the right. Select the "(Name)" property, and type "myCmdButton" as the name.
  • Step 4 Double-click the button to open up the code-view window. Type the following in the white space under "Private Sub myCmdButton_Click()":
    myCmdButton.enabled = False;
  • Step 5 Click the blue "Run" button on the top toolbar of Visual Basic. Because you set enabled to "false" in the previous step, you will see your button grayed out, and nothing will happen when you click it.
  • Jul 07, 2010 | Microsoft Compilers & Programming Tools

    1 Answer

    Trying to view slide show in Flickr. Says I need


    All web browsers in WIndows XP will usually have JavaScript enabled by default, but on occasion, it will be turned off. By turning JavaScript on in your web browser, you will have access to more interactive content when you visit certain websites. For Windows XP users, JavaScript can be enabled in both the Internet Explorer and Firefox web browsers. Open the Internet Explorer Click on "Tools" in the top menu bar and choose "Internet Options."
    Go to the "Security" tab at the top of the window and click on the "Custom Level" button. croll down to the "Scripting" category and click on the "Enable" option next to "Active Scripting." JavaScript is now enabled.
  • Step 4 Scroll down to the "Scripting" category and click on the "Enable" option next to "Active Scripting." JavaScript is now enabled.

  • Read more: How to Turn on Javascript in Windows XP | eHow.com http://www.ehow.com/how_4812316_turn-javascript-windows-xp.html#ixzz0ssJIX0wR

    Jul 06, 2010 | Compilers & Programming Tools

    1 Answer

    Message says add=ons disabled but they show enabled on page


    Hi hosington

    When the word enable is shown, what it means is : it is disabled currently, by clicking on it you can enable if you wish.
    Good luck
    luciana44

    Nov 12, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

    1 Answer

    How do I enable javascript on a mac os10.5.3?I have updated my browser (Firefox) and my firmware, also have checked enable javascript from preferences but I am still getting a message that tell me I have...



    for mozilla
    Select Preferences from the Edit menu.
    Click the arrow next to Advanced.
    Click Scripts & Plugins.
    Check Navigator beneath "Enable Javascript for".
    Click OK.
    Click Reload

    for firefox

    Select Options from the Tools menu.
    Click the Web Features icon.
    Check "Enable JavaScript".
    Click OK.
    Click Reload.

    Sep 11, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

    2 Answers

    My computer says running w/ add-ons disabled but they are enable


    Is it is firefox or internet explorer mention it clearly


    Because add-ons on mainly used in firefox like internet downloader manager add-ons for firefox .

    In firefox tools---------> addons---> select addons to install in firefox




    Hope that problem solves !!!!!!!!

    Jul 08, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

    1 Answer

    Computer is saying add-ons are disabled, but they are all enabled


    In internet explorer click on Tools > Manage Add-ons > Enable or Disable Add-ons.
    In the "Show" list, click "Add-ons that have been used by Internet Explorer"
    It may take a second to populate.
    Click the add-on you want to enable, and then click Enable > OK.

    Jun 11, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

    1 Answer

    Javascript is enabled but it keeps telling me I need to enable it


    On IE, clcik Tools>Manage Add Ons.

    Is Shockwave Flash Object enabled? Is the file Flash10a.ocx?

    Oct 23, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

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

    Related Topics:

    620 people viewed this question

    Ask a Question

    Usually answered in minutes!

    Top The PHP Group Compilers & Programming Tools Experts

    Robin Hill
    Robin Hill

    Level 3 Expert

    1251 Answers

    Mike

    Level 3 Expert

    4331 Answers

    Mishan Kasiparsad

    Level 2 Expert

    142 Answers

    Are you a The PHP Group Compiler and Programming Tool Expert? Answer questions, earn points and help others

    Answer questions

    Manuals & User Guides

    Loading...