The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

HTML to send a PM?

View previous topic View next topic Go down

HTML to send a PM?

Post by Alex_Eror on July 24th 2012, 2:38 pm

I'm creating a forum shop and I want, when the person clicks the "Buy" button to automatically send a PM to me saying that made a purchase. Currently I can only do it with email, which seems to require Windows Messengers, so I can't have that. Anyone got a code to automatically send a PM?

Alex_Eror
Forumember

Posts : 116
Reputation : 4
Language : English

Back to top Go down

Re: HTML to send a PM?

Post by ankillien on July 24th 2012, 4:58 pm

Hi,

I don't think thats possible.

ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

http://www.webartzforum.com/

Back to top Go down

Re: HTML to send a PM?

Post by Alex_Eror on July 24th 2012, 5:22 pm

@ankillien wrote:Hi,

I don't think thats possible.

Damn, but would it be possible to automatically send an email without the whole Windows Live Messenger and stuff having to load up?

Alex_Eror
Forumember

Posts : 116
Reputation : 4
Language : English

Back to top Go down

Re: HTML to send a PM?

Post by Alex_Eror on July 24th 2012, 9:46 pm

Anybody? Refer to my post above this too.

Alex_Eror
Forumember

Posts : 116
Reputation : 4
Language : English

Back to top Go down

Re: HTML to send a PM?

Post by Alex_Eror on July 25th 2012, 10:03 am

@Alex_Eror wrote:Anybody? Refer to my post above this too.

Yes, this is possible, however it requires ajax to load the authorization codes.

Example HTML form:
Code:
<form enctype="multipart/form-data" onsubmit="return vB_Editor['text_editor'].prepare_submit(0,0)" name="post" method="post" action="/privmsg">
    <input type="hidden" name="username[]" value="Admin" />
<input class="inputbox medium" type="hidden" title="" maxlength="64" value="New Purchase" name="subject">
    <textarea name="message">Additional comments</textarea>
    <div id="hidden_auths"></div>
<input class="button1" type="submit" accesskey="s" tabindex="6" value="Purchase" name="post">
    </form>
    <script type="text/javascript">
    $('#hidden_auths').load('/privmsg?mode=post form input[type="hidden"]');
    </script>

You would put that in an HTML page.

Replace YOURUSERNAMEHERE with your username on your forum. Edit to your liking.
[/quote]

I didn't see 'YOURUSERNAMEHERE' anywhere, and how do I use ajax to load the code?

Alex_Eror
Forumember

Posts : 116
Reputation : 4
Language : English

Back to top Go down

Re: HTML to send a PM?

Post by Alex_Eror on July 25th 2012, 3:45 pm

Rideem3 wrote:Whoops, here use this code and replace YOURUSENAMEHERE:
Code:
<form enctype="multipart/form-data" onsubmit="return vB_Editor['text_editor'].prepare_submit(0,0)" name="post" method="post" action="/privmsg">
<input type="hidden" name="username[]" value="YOURUSERNAMEHERE" />
<input class="inputbox medium" type="hidden" title="" maxlength="64" value="New Purchase" name="subject">
<textarea name="message">Additional comments</textarea>
<div id="hidden_auths"></div>
<input class="button1" type="submit" accesskey="s" tabindex="6" value="Purchase" name="post">
</form>
<script type="text/javascript">
$('#hidden_auths').load('/privmsg?mode=post form input[type="hidden"]');
</script>
The authorization codes are already loaded from the jQuery I put. Wink

Thanks, that's really close to what I'm looking for, but the person still needs to have the new page loaded and needs to hit Send, which is a bit unimpressive in a forum shop.

Alex_Eror
Forumember

Posts : 116
Reputation : 4
Language : English

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum