Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9317333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:51:10+00:00 2026-06-19T02:51:10+00:00

In the current example I have a form set up that takes a unique

  • 0

In the current example I have a form set up that takes a unique id. There is also a link that takes a unique id. The javascript function will fade in that form when the link is selected. Is it possible to call a javascript function based on the PHP variables used to id the form and the link? And so that it will fade in the correct when that corresponds to the unique id of the form?

PHP

while($row = mysql_fetch_array($query)){ $form_id = $row[id]; ?><a href="#"
id="askedClick"><?php echo $row[post_text].'<br>'?></a>

<form action="<?php $curent_file ?>"
method="POST" id="<?php echo $row[id] ?>">Do you know the anwer?
    <input type="submit" value="Yes" name="<?php echo $form_id.'yes'?>"
    />
    <input type="submit" value="No" name="<?php echo $form_id.'no'?>" />
</form>
<?php } ?>

JAVASCRIPT

 $(document).ready(function () {
     $("phpvariable").hide();
     $("#phpvariable").click(function () {
         $("#phpvariable").fadeIn(1200)
     });
 });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:51:11+00:00Added an answer on June 19, 2026 at 2:51 am

    You could use ids, but it will be much easier to just give your link a class of say “showForm” and use HTML traversal to hide the form that follows it

    $('.showForm').click(function(){
        $(this).nextAll('form').first().fadeIn();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem is I have a continuous form and there's a column that the
I have a form that displays a list of systems along with their current
I have a WinForm and few properties that are set on it. for example
For example, if the current user is admin, the Admin button will show. How
My current solution will suck sometimes EDIT For those who don't understand,see this example:
This is an example that searches PDF files in the current directory. import os,
I have a simple user signup form with a checkbox that lets users get
This one is a real headache. I have three checkboxes in a form that
So I have an example of a query that was graciously provided by Frost
I have a Profile form that inherits from sfGuardRegisterForm I have these fields: $this->useFields(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.