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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.