Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
I never understood this, why are most versions of this code just when you go to the PM page, why not when you press 'send'?

If I wanted to PM the admin - I could bypass a popup by going to the New PM Page.

Are people crazy? :P

JD

JD Avatar



1,032


June 2008
I didn't think it was possible to cancel a PM when send was pressed? The message would still be surely sent even if you were taken back?




Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
Nope. It's possible! ;)

Sending would invoke a PM to appear. Then a message:

'Are you sure you still want to send this message?' ... Yes/No

If no - return false! :)

JD

JD Avatar



1,032


June 2008
Do it then nub ;)

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
If I still coded for PB, I would! :P

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
It's easily possible Wedge. :P

document.postForm.onsubmit = function(){
if(document.postForm.to && document.postForm.to.value == "admin"){
return confirm("This guy hates you. Do you still want to send the PM?");
}
}

Not tested, but it should work.

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
Would you want to go through the effort of writing a PM, to find the person you wrote it for doesn't want to receive it when to try and send it? >.>

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Simie Avatar
Would you want to go through the effort of writing a PM, to find the person you wrote it for doesn't want to receive it when to try and send it? >.>


Then have it appear both times? :P

Simie

Simie Avatar

******
ProScripter

1,052


May 2006
Have it appear on the onblur event of the to input :P

JD

JD Avatar



1,032


June 2008
All 3? :P
Can't you just do it when the person enters 'admin' into the 'To' field?

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
JD Avatar
All 3? :P
Can't you just do it when the person enters 'admin' into the 'To' field?


Yup.

Which would probably be best.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
JD Avatar
All 3? :P
Can't you just do it when the person enters 'admin' into the 'To' field?


Yep. Which is what Simie was saying. Check the "to" value on page load and then assign an onblur of the same function. Onblur events activate when they click outside of the "to" field (aka it loses focus)

Quacker Jack

Quacker Jack Avatar

*****
ProNation

1,666


December 2007
Michael Avatar
If I still coded for PB, I would! :P


You stopped coding? :(

Michael

Michael Avatar
*Has a custom title*



1,462


October 2007
Quacker Jack Avatar
Michael Avatar
If I still coded for PB, I would! :P


You stopped coding? :(
PB yes! :)

crazynarutard

crazynarutard Avatar

*****
Senior Studio Member

1,470


August 2005
only noobs would quit PB coding.

newBookmarkLockedFalling