vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Code not working anymore

[F] Code not working anymore - Posted By Tim (grievous) on 21st Mar 08 at 10:46pm
I'm using the code so when a member pms a staff they get an alert box, and now it's not working. I tested it using the test account.

Code:
 
  1. <script>
  2. function pm_user(member, message){
  3. if(location.href.match(/\/pm_send\//) && location.href.match(member)){
  4. alert(message);
  5. }
  6. }
  7.  
  8. pm_user('admin', As the main Admin, I get very busy, so please only PM me if theres a problem with a member or of something eles of urgency, but make sure you post all site problems in Support.. /n DLG');
  9. pm_user('masonfett',Please do not pm me a graphic request, all request go in the requesting area.  Also, do not pme me asking if your request is done, when it's done it'll be posted./n Thanks.');
  10. pm_user('shadowclaw','Please do not pm me regarding support issues or to request a graphic. All graphic and support issues/request go in there respective area./n Thanks.');
  11. pm_user('lordvader','Please do not pm me regarding support issues. All support issues go in the support board./n Thanks.');
  12. </script>
 

Re: Code not working anymore - Posted By Michael (wrighty) on 21st Mar 08 at 11:06pm
<script>
function pm_user(member, message){
if(location.href.match(/\/pm_send\//) && location.href.match(member)){
alert(message);
}
}

pm_user('admin', 'As the main Admin, I get very busy, so please only PM me if theres a problem with a member or of something eles of urgency, but make sure you post all site problems in Support.. /n DLG');
pm_user('masonfett','Please do not pm me a graphic request, all request go in the requesting area. Also, do not pme me asking if your request is done, when it's done it\'ll be posted./n Thanks.');
pm_user('shadowclaw','Please do not pm me regarding support issues or to request a graphic. All graphic and support issues/request go in there respective area./n Thanks.');
pm_user('lordvader','Please do not pm me regarding support issues. All support issues go in the support board./n Thanks.');
</script>


Try that.

Re: Code not working anymore - Posted By Tim (grievous) on 21st Mar 08 at 11:29pm
Nope, still nuttin.

Re: Code not working anymore - Posted By Michael (wrighty) on 21st Mar 08 at 11:32pm
<script>
function pm_user(member, message){
if(location.href.match(/\/pm_send\//) && location.href.match(member)){
alert(message);
}
}

pm_user('admin', 'As the main Admin, I get very busy, so please only PM me if theres a problem with a member or of something eles of urgency, but make sure you post all site problems in Support.. /n DLG');
pm_user('masonfett','Please do not pm me a graphic request, all request go in the requesting area. Also, do not pme me asking if your request is done, when it\'s done it\'ll be posted./n Thanks.');
pm_user('shadowclaw','Please do not pm me regarding support issues or to request a graphic. All graphic and support issues/request go in there respective area./n Thanks.');
pm_user('lordvader','Please do not pm me regarding support issues. All support issues go in the support board./n Thanks.');
</script>


Try that.

Re: Code not working anymore - Posted By Tim (grievous) on 21st Mar 08 at 11:37pm
It works.

Thanks Wrighty

Re: Code not working anymore - Posted By Michael (wrighty) on 21st Mar 08 at 11:38pm
No problem! {Smile}