Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

geniebud2

Members
  • Joined

  • Last visited

  1. i am angry and annoyed. i went to discord to ask for help, i was ignored and ignored until i said a rude word then the users took note of me. Aparently they ignored me because im entitled and demanding. but also because i was in the wrong chatroom for that purpose (i was in more specific . technical chatroom as appose to more gerneral design support). I was trying to make it fully clear what my position is and what I am trying to achieve but that comes across as entitled. im just at a point in life where i feel if i try to connect and reach out - i am rejected. if i work on my own in isolation(so to speak) the work loses purpose and meaning. i just wish i was normal, frig this life!
  2. My browser-based mmo game requires energy to be lost as players click around. Energy is an attritube for Accounts Database. Energy will be updated constantly, maybe 5 times a minute or more times, each one a unique action from the others. This seems like a lot of database entries per player. is there a solution to this problem? In the past on other languages i have stored all Database data into a multi-d Array and once user playtime was over, the data would be updated into the database. This worked as the game allowed it all to be done server-side and so no chance of user-manipulation as well as low-data loss risk. I am not sure how safe it to store all data in sessions or how efficient/how effective it would be. i hope someone can help me figure this problem out. thank you.
  3.    geniebud2 reacted to a post in a topic: stripos
  4. Thanks for reply. Essentially I think this is what i did slightly differently: var forumLinks = document.getElementsByClassName('forumLink'); for(let i = 0; i < forumLinks.length; i++) { forumLinks[i].addEventListener("click", function() { So yeah, your code is nicer though, i should use foreach more but yeah... thanks dude!
  5. document.getElementById ("readM").addEventListener ("click", function (){ $.ajax({ url: "ajax/updateReadMessage.php", type: "post", dataType: "json", data: { msgID: $('#readM').val() }, success:function(result){ console.log(result.abc); } }); }, false); Hi there. So I havn't used Javascript or really much programming at all in the past 2-3 years. I am trying to build myself a Messages system though for an idea I'm working on! My problem is however, that I can't access the correct data from this code above... The main parts are: 1) I have the ID "ReadM" which i access at the beginning. Now I have to say, i have multiple of these "ReadM" items. Each one will have its own event listener. So my problem is trying to make each event listener unique from each other... 2) On Line 6, i have a part which should make my event listener unique by passes a unique ID. The problem i face, is that with the current code, it will simply find the first "#readM' elment on the page and take the value from there. I essenetially feel like i want to change it to "this.val()" but that is not possible, it seems. So any support on this? would be great if anyone knew a quick fix for this... in the meantime howeve, i will continue to find a workaround! thankyou! Edit: for reference. the element in question!!!! <button id='readM' value='".$row['ID']."' class='readMessage_trigger'>Read Message</button>

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.