window open by typing command in chat not working?

40 views
Skip to first unread message

Lucas Dinhof

unread,
Apr 25, 2016, 9:46:44 AM4/25/16
to AJAX-chat
the idea is following in chatbot.php
I have:
if(stristr($text, '-test')) {
window.open("http://www.w3schools.com");
}
but the window doesnt not working?
anyone can help me?

Frug

unread,
Apr 25, 2016, 2:23:32 PM4/25/16
to AJAX-chat
You can't open windows from php...

Lucas Dinhof

unread,
Apr 27, 2016, 12:06:17 PM4/27/16
to AJAX-chat
is there any other possibility to open a window by typing something in chat?

Bobby Russ

unread,
Apr 27, 2016, 10:48:38 PM4/27/16
to Lucas Dinhof, AJAX-chat

If you put it as a link,  then  the target=_new

On Apr 27, 2016 12:06 PM, "Lucas Dinhof" <dinhof...@gmail.com> wrote:
is there any other possibility to open a window by typing something in chat?

--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lucas Dinhof

unread,
Apr 28, 2016, 10:36:32 AM4/28/16
to AJAX-chat
do you have an example, please?

Frug

unread,
Apr 29, 2016, 10:21:06 AM4/29/16
to ajax...@googlegroups.com
Look at the word filter modification, and modify that to open a window when it gets certain text.


You could do if(text == 'whatever') { window.open(...);} 
in that function.

That will open the window for everyone when you type it though. I'm not sure what your goal is.
Reply all
Reply to author
Forward
0 new messages