Jump to content
MakeWebGames

Recommended Posts

Posted

This mod wasn't made by me, I'm posting it for Danny969.

This mod was a request, here: http://makewebgames.io/board800/33892-javascript-counters/

And here is the code:

Upload ajax_caller.php to your public_html:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

In header find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

And add after:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

  • 5 weeks later...
Posted

Very well done, indeed =)

I used this on my site and all works great, but I went one step further and tried using it for the status bars (Energy, Brave, Will, etc.) and I can't seem to figure out how to update the variable for the bars width, I can only get it to update the echoed text. If it says "Energy: 12/12 (100%)", I can get those numbers to change just fine, but I obviously can't put

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

as the width attribute for the image...

Sorry for the rambling, I'm trying to type while keeping my two year old from putting in his two cents and slamming on the keyboard lol.

Posted

I actually have a variable for the image source since users can customize the bars, so mine is somewhat of a different scenario. I'll play around with it a bit and see if I can come up with a solution that may work for everyone. I can almost guarantee you it won't be the prettiest looking code if I do get around to it though.

Posted

Ok, the main problem I'm having so far is a compatibility issue with FF. FireFox tends to show a fade out and fade in transition upon reloading the data, while Internet Explorer does not. This isn't such an issue if you set the interval to 60000 or so, but that seems too slow to me for my intentions. The odd thing is, it only does that SOMETIMES.

[align=center]Energy: 75% (9/12)

1.png2.png[/align]

If I set the entire above example as the portion to be updated, the entire thing flickers/fades/whatever you want to call it every 5 seconds (or whatever your interval is set to). But if I only set the numbers (9/12, or the percent value), then it doesn't show any fade during transition.

This code works fine:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This makes the entire thing flicker:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

  • 1 month later...
  • 4 weeks later...
Posted

Where does this go?

This code works fine:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This makes the entire thing flicker:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

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.   Paste as plain text instead

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