Jump to content

[SOLVED] Behavior Change!


ionik

Recommended Posts

Ok, What I have is a fairly simple Ajax script i found and modified to work with, what it is a an auto-validation for a user registration.

What happens is when the user inputs something into the textbox it validates back on PHP's end sends a image back to be displayed.

 

I tested this both on IE and FF and both work

 

The problem I have ran into is that when i am testing the file locally on http://localhost/test.php and then move it in to go live at http://localhost/user/register

 

everything messes up, it also automatically catches what image is stored in <div id="rules-name"> and if its the error or alert image it keeps on displaying those and disables the submit button.

 

The way it works is i just loop through the div tags on the page using document.getElementsByTagName('div'); and then further remove the rest that don't contain rules-  and then get the content using innerHTML. This worked fine when i was testing it on the test.php file but when I moved everything to the live URL of http://localhost/user/register which points to http://localhost/index.php?page=user&func=register, when i get the content that is inside of the div tags it will return the entire page source and it does it both on IE and FF.

Link to comment
https://forums.phpfreaks.com/topic/113089-solved-behavior-change/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.