Results 1 to 8 of 8
  1. #1
    cali_guy_0024 is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default Call a function via URL

    Is it possible?

    For example: I need to call "Compose.SendMessage();"

    Java Code:
    http://url.com/messenger/compose?displayname=name&message=text
    can I tack on Compose.SendMessage(); like

    Java Code:
    http://url.com/messenger/compose?displayname=name&message=text  && Compose.SendMessage();

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    cali_guy_0024 is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default

    The function I'm trying to call is within:

    XML Code:
    <script type="text/javascript" language="javascript">
    So I guess that's Javascript and not Java? I'm not really sure

    I'm trying to allow someone click a link and automatically send a message on xbox.com

    ie:
    XML Code:
    http://live.xbox.com/en-US/MessageCenter/Compose?gamertag=gamertag&message=message%20body
    And then instead of having to click the Send button, have it be sent automatically.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by cali_guy_0024 View Post
    The function I'm trying to call is within:

    XML Code:
    <script type="text/javascript" language="javascript">
    So I guess that's Javascript and not Java? I'm not really sure

    Yeah, it's JavaScript, and this is a Java forum. You know that they're about as similar as ham is to hamster. I recommend that you Google for a javascript forum and ask this question there.

    I will delete this thread in a short bit.

  5. #5
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    4

    Default

    To call javascript code from within an Applet, you need to call

    Java Code:
    getAppletContext().showDocument(new URL("http://live.xbox.com/en-US/MessageCenter/Compose?gamertag=gamertag&message="+messageBody));

  6. #6
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Quote Originally Posted by Fubarable View Post
    Yeah, it's JavaScript, and this is a Java forum. You know that they're about as similar as ham is to hamster. I recommend that you Google for a javascript forum and ask this question there.

    I will delete this thread in a short bit.

    Its you that said the ham to hamster analogy. I love it. I was wondering where I had seen it.

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by sunde887 View Post
    Its you that said the ham to hamster analogy. I love it. I was wondering where I had seen it.
    I wish I were that smart, but no, I borrowed it from someone else here.

  8. #8
    cali_guy_0024 is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default

    Ok, thanks anyway. I had no idea Java and Javascript were so different :o

Similar Threads

  1. Replies: 10
    Last Post: 04-06-2011, 04:45 PM
  2. function call error
    By peter_thm in forum New To Java
    Replies: 2
    Last Post: 01-13-2010, 12:57 PM
  3. Replies: 3
    Last Post: 12-04-2009, 03:08 PM
  4. Rewrite as a function so it can call from main.
    By thangli in forum New To Java
    Replies: 2
    Last Post: 11-30-2008, 06:26 AM
  5. help with System.exit (1) function call
    By katie in forum Advanced Java
    Replies: 2
    Last Post: 08-06-2007, 08:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •