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

  • Home
  • SEARCH
  • 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 585201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:58:41+00:00 2026-05-13T14:58:41+00:00

here is my js code <script type=’text/javascript’> // Browser safe opacity handling function function

  • 0

here is my js code

<script type='text/javascript'>

  // Browser safe opacity handling function

  function setOpacity( value ) {
   document.getElementById("popup").style.opacity = value / 10;
   document.getElementById("popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
  }

  function fadeInMyPopup() {
   for( var i = 0 ; i <= 100 ; i++ )
    setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
  }

  function fadeOutMyPopup() {
   for( var i = 0 ; i <= 100 ; i++ ) {
    setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
   }

   setTimeout('closeMyPopup()', 800 );
  }

  function closeMyPopup() {
   document.getElementById("popup").style.display = "none"
  }

  function fireMyPopup() {
   setOpacity( 0 );
   document.getElementById("popup").style.display = "block";
   fadeInMyPopup();
  }
  </script>

this code works fine. i am using this code to pop-up a light box for emailing friends. what i am stuck with, once i submit the i will like to say thank you on the same pop-up.
right now here is how i am saying thank you: this goes to a new window. but i want it on the same light box window.

<SCRIPT language="JavaScript">
<!--
window.location="thanks.php";
//-->
</SCRIPT>

here is how i call my light box in my other code:

<div id="popup" name="popup"><?php include ("email.php"); ?></div>

any ideas on achieving this.
many thanks.


ok here is more explanation

I have 3 events that i want ro call for one form:

in my form, i am using an image for the submit button.
so to pass the value of the submit, here is what i do and it works fine in all browsers:

< input type=”image” onclick=”this.form.select.value = this.value” >

now i want to call another events, after the form has been submitted.

< input type=”image” onclick=”this.form.select.value = this.value; javascript:thanks()” >

now when i put the second event in, my form doesnt validate or submit the values.

and when i placed that event in the form tag, it doesnt work either.

here is my js function for thanks():
function thanks()
{
setOpacity( 0 );
document.getElementById(“popup”).innerHTML = “Thank You!!”
closeMyPopup();

    }

i am using the code from this link: http://dhtmlpopups.webarticles.org/fade-effects.php;
i have a registration form for the fade effects, and once the form get submitted, i want a thank-you to appear, but it doesnt seem to be working well.

  • 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-05-13T14:58:42+00:00Added an answer on May 13, 2026 at 2:58 pm

    I’d strongly recommend checking out the jQuery framework. It makes doing things like this very painless.

    You could also use the innerHTML property in Javascript to update the text:

    document.getElementById("popup").innerHTML = "Thanks, yo"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 467k
  • Answers 467k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use java.util.Calendar: Calendar cal = Calendar.getInstance(); // represents right now,… May 16, 2026 at 1:53 am
  • Editorial Team
    Editorial Team added an answer BS_OWNERDRAW? That is a button style. Even with LBS_OWNERDRAWFIXED, you… May 16, 2026 at 1:53 am
  • Editorial Team
    Editorial Team added an answer I found the problem. It was in this line of… May 16, 2026 at 1:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.