1. I've started a massive SPAM purge, any accounts that have spammed are being removed, also for a short period new user signups are disallowed until the SPAM cleaning is finished.

I need some help with Java Script

Discussion in 'Java Script/AJAX' started by Humza Bajwa, Oct 6, 2009.

Thread Status:
Not open for further replies.
  1. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    Well, on my forum (I'm using a free host) I am try to make it so that no one can change their display name on their account. So far, I've been able to do so. I the name change box in their profile is disabled, but they can't change anything else in their profile since the server doesn't register anything in the "Name" text box.

    My board is blkfireforum.suddenlaunch3.com. If you don't undertstand, you can make an account and look under profile. At the moment, I've removed the code, so anyone can change their display name freely.

    Does anyone know how I can alter, or rewrite my code so that users can't change their name, but can change the rest of the items in their profiles? Any help is MUCH appreciated.

    Here's my code:

    <script>
    if(location.href.match(/action=profile&/i)) {
    var INP = document.getElementsByTagName('INPUT');
    for(inp=0; inp<INP.length; inp++) {
    if(INP[inp].name == "name")
    INP[inp].disabled = "disabled";
    }}
    </script>

    Loading...
  2. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    Anyone know? =*(
  3. Neha

    Neha New Member

    Joined:
    Sep 3, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    hello Dear

    I understand and able to do what you said. May i assist u for this?

    Regards
    Neha
  4. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    Well, I've switched to a better service. The old one was flawed, not matter how much I tried to alter the code, it wouldn't work properly.
  5. Zoli

    Zoli New Member

    Joined:
    Jan 22, 2007
    Messages:
    561
    Likes Received:
    37
    Trophy Points:
    0
    Location:
    Hungary
    Hi,

    I think you should not play with javascript since it is an optional client side programming language. You should control the operation rather on server side in the php files. Maybe you should just remove the name input from the template file.
    Regards
  6. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    I was using a free host where I don't have access to server side operations. Therefore, to customize anything, I would have to use the basic software, or edit the code myself.
  7. Zoli

    Zoli New Member

    Joined:
    Jan 22, 2007
    Messages:
    561
    Likes Received:
    37
    Trophy Points:
    0
    Location:
    Hungary
    Do you have the power to manage the template files? If you do try removing the name changing block from it. I think this is the easiest and most secure way. Of course you will need to create backup first, since you may never know...
  8. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    Nope. All I could do was edit scripts (or add new ones).
  9. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    Anyway, I don't use that forum host anymore.
  10. Zoli

    Zoli New Member

    Joined:
    Jan 22, 2007
    Messages:
    561
    Likes Received:
    37
    Trophy Points:
    0
    Location:
    Hungary
    When I get home I will look into your script, but it won't be perfect solution since operates only on client side.
  11. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    You don't have to lol. I mean, if you want to post it in their support boards (support.suddenlaunch.com), feel more than welcome to. I heard they're looking for a new coder, but I don't know if it's a paid job or only for volunteers.

    I no longer use that free forum host, as I've found a better one, which I am quite satisfied with at the moment.
  12. Zoli

    Zoli New Member

    Joined:
    Jan 22, 2007
    Messages:
    561
    Likes Received:
    37
    Trophy Points:
    0
    Location:
    Hungary
    The site did not send me the validation link after registration so I leave this. Otherwise I'm not a coder, but thank you.
  13. Humza Bajwa

    Humza Bajwa Active Member

    Joined:
    Sep 29, 2009
    Messages:
    956
    Likes Received:
    26
    Trophy Points:
    28
    No problem, thanks for the help.
Thread Status:
Not open for further replies.

Share This Page