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 9224437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:19:14+00:00 2026-06-18T04:19:14+00:00

Here’s my JS code… function da(){ var a=document.forms[user][age].value; if(this.age.value < 18 || this.age.value >

  • 0

Here’s my JS code…

function da(){
    var a=document.forms["user"]["age"].value;
    if(this.age.value < 18 || this.age.value > 85) {
        alert('some text...');
        this.age.focus();
        return false;
    }else{
        window.location.href='file.php?&'+a;
    }
}

It simply passes the parameters to the page where I’m standing…
Here’s the form just in case (I’m a beginner keep in mind)…

<form name="buscar" method="GET"> Some text <input                 onmouseover="Aj2('d');document.getElementById('box').style.display='block';" onmouseout="clean();" type="number" name="age" id="age" > Age <div id="help" ><!-- --> </div><br />
<input type="button" value="Send" onclick="da()">
</form>

The Aj2 function is not the problem here…
Thanks for any help y might get…

  • 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-18T04:19:16+00:00Added an answer on June 18, 2026 at 4:19 am

    Just a thought, if you don’t actually have to reload the page and just want to get information to your javascript code from PHP, you could do something like

    <script>
    
    <?
        $phpvariable = "my variable";
    ?>
    
    var jsvariable = <?php echo json_encode($phpvariable); ?>;
    
    </script>
    

    Now the javascript variable, jsvariable, will hold the PHP variable’s content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the code in a function I'm trying to revise. This example works
Here are two ways of setting context: $.proxy(function() { this.doStuff(); }, this); ... var
Here is my function: function reCalculate(i) { document.getElementById(Q + i).value = document.getElementById(C + i).value
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
Here is the script I'm using, copied directly from Google: <script type=text/javascript> var _gaq
Here is my code <?php function random_id() { $chars = 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $id = '';
Here is a scenario: User installs .NET application that you have made. After some
Here is the code I have. This is my PrintToFile class import java.util.*; import
Here's the code i keep seeing-- public Task PossiblyAsyncOperation(bool condition) { //this condition means

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.