Jump to content

Javascript getting omitted by php?


sspoke

Recommended Posts

Hello,

 

Let me start by sayings something is wrong with this code to me it looks flawless.

 

The problem happens when I inspect the elements of javascript in my browser and it seems it does nested clones of the same javascript code twice even though ajax is suppose to keep replacing the innerHTML in this div called id="main"

 

here is the project I attached it.. try to login with username Pkedpker

password doesn't matter

 

It's hardcoded atm for testing after you get the black screen telling you

'A young hero arises'

and you press Done button you get to a stat padding screen which for some reason doesn't work even though it looks like it should work the javascript seems to have no errors in it at all but it gets omitted by PHP?

 

the ajax form of stat padding uses the <form> from main UI code in index..

 

just look for yourself can someone help me out. I'm getting desperate because I want to move further with implmenting monsters/npcs fun coding.. but I'm stuck with some stupid bug.

 

thanks alot attached project don't worry it has no mysql no setup required its just pure PHP atm.

 

[attachment deleted by admin]

Link to comment
Share on other sites

here is a newer test.zip file

 

problem is not only with that javascript being omitted doesn't seem like its php more like javascript's innerHTML really doing a bad job.

 

Also I haven't tested this on Internet Explorer Until now i can't even login! seems ajax completely fails with Unknown Error @ innerHTML

 

(I looked at other's having this error on google turns out sometihng with <p>'s not nesting? I don't even use paragraphs.. only div's! and they said switch them to divs and it will work nope I only use divs!

 

I tried the workaround solution they provided involves using DOM createElement and appendChild even though it works it makes everything look horrible appending like 3 websites in one?

 

Then again maybe it really is a PHP error?

 

can someone help me out.

 

and I have no idea what I did wrong

 

can someone look at it please.

 

[attachment deleted by admin]

Link to comment
Share on other sites

sleep deprivation caused me to include ajax to my index.php which caused index.php which renders the page to render it again in the ajax content causing tons of useless data sent.. fixed that..

 

Now it works in internet explorer/chrome..

 

problem is that setting skills javascript still doesn't work!

 

I see page looking pretty nice in Inspector now still stat setting doesn't work

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.