Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. squibs

    W3C validation fails - fixing it breaks javascript

    Thanks for the replies. For some reason the css idea never occurred to me!
  2. squibs

    W3C validation fails - fixing it breaks javascript

    I'm using a simple javascript routing for button rollovers. The rollover images get preloaded: image1 = new Image(); image1.src = "/images/image1blue.jpg"; And the buttons are implemented like this: <a href="/index.php" onmouseover="image1.src='/images/image1blue_2x1.jpg';"...
  3. squibs

    Javascript to force submit when return pressed

    I was just checking that a value was set for the button - my usual way of testing in submit has been pressed. I'm now checking something else in the POST variables.
  4. squibs

    Javascript to force submit when return pressed

    I could have if I knew I needed to! It seems to come as a surprise to anybody I've talked to so far that the submit button value doesn't get set on return press, only on clicking the submit button.
  5. squibs

    Javascript to force submit when return pressed

    Turns out the problem is with the php component. If you use return key to submit a form <input class="text" type="submit" name="submitBtn" value="Check domain"/> then the php test if (isset($_POST['submitBtn'])){ is false, but the test is true if you click the submit button. I fixed it by...
  6. squibs

    Javascript to force submit when return pressed

    IE7 and Firefox. At this point I am going to just strip it down and build it back up again. You've proven the core is good - I must be screwing up somewhere else. Thanks for the advice.
  7. squibs

    Javascript to force submit when return pressed

    1DMF - thanks again for the help. You are not missing anything. I'm not yet concerned about validation. I'm hitting enter after completing the text field, in the expectation that this will trigger a form submit, but that doesn't happen. It didn't happen without the javascript, so I added...
  8. squibs

    Javascript to force submit when return pressed

    Thanks 1DMF. Okay - the form is now declared as follows: <form style="width: 345px" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="domain" name="domainform"> And my text field is like this: Domain name:&nbsp;<input class="text" name="domainname" type="text" size="36"...
  9. squibs

    Javascript to force submit when return pressed

    Thanks for your reply., but I guess it is the form submit code I am having problems with. The current code is already processing the return key correctly. It is the myfield.form.submit() action which is the problem. The code is executed but the form does not seem to be submitted.
  10. squibs

    Javascript to force submit when return pressed

    I found some javascript to force a submit action. It is invoked if the user completes a textbox in a form and hits the return key with the textbox in focus, rather than explicitly clicking the submit button. I have an alert which proves that the javascript is running and hitting the block...

Part and Inventory Search

Back
Top