Need HELP! (get page)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Need HELP! (get page)

  1. #1
    Ireland (Erin) Guest

    Need HELP! (get page)


    Oh, boy... do I ever need help.

    My brother accepted a contract job first of January, the project deadline
    is February 15th. He's hit a snag at school (Univ. of Kansas) and has no
    spare time to work on the project. I told him not to worry, I'd take it
    off his hands and finish it for him.

    Big mistake. I'm stuck. What I'm working on is an online personality test
    for a doctor in California. I need some snippet of code that will function
    like this...

    If x and y = z, get page

    I want the script to read the body for certain text, then get the assigned
    URL (out of 16) for that combination.

    More detailed example (in case, I'm not being clear):

    If body contains the following 43hg8 + TRor90 + YTfrOM + ADorBC, get http://www.website.com/persona/result21.htm


    What do I do? Does anyone know of a script like this already? It seems
    it would be fairly simple to write, but because I've been working on this
    so hard, I can't really think.

    If anyone has any suggestion on writing this script or where I can find one
    similar to it... please contact me.

    Thank you, thank you!
    Erin


  2. #2
    Anon Guest

    Re: Need HELP! (get page)


    Has to be done with one or more if statments or a switch
    just use x and y as a referance in ether a text document or an array

    e.g.
    //can be literal String or read from txt document
    String [] srList = new String [3];
    srList[0] = "http://kjkg0.com";
    srList[1] = "http://kjkg1.com";
    srList[2] = "http://kjkg2.com";

    . . . . . .

    int sum = x + y;
    if(sum < z)
    openPage(srlist[0]);
    else if(sum == z)
    openPage(srlist[1]);
    else
    openPage(srlist[2];

    a bit rusty with java cant remember the command to open the web page but
    should only
    take a few seconds to look up in help files.
    I think you have to convert it to a URL first etc or something like that.
    eg That is if you dont understand what I mean by openPage()
    It is a bit of a hastle though


    "Ireland (Erin)" <corpustx@earthlink.net> wrote:
    >
    >Oh, boy... do I ever need help.
    >
    >My brother accepted a contract job first of January, the project deadline
    >is February 15th. He's hit a snag at school (Univ. of Kansas) and has no
    >spare time to work on the project. I told him not to worry, I'd take it
    >off his hands and finish it for him.
    >
    >Big mistake. I'm stuck. What I'm working on is an online personality test
    >for a doctor in California. I need some snippet of code that will function
    >like this...
    >
    >If x and y = z, get page
    >
    >I want the script to read the body for certain text, then get the assigned
    >URL (out of 16) for that combination.
    >
    >More detailed example (in case, I'm not being clear):
    >
    >If body contains the following 43hg8 + TRor90 + YTfrOM + ADorBC, get http://www.website.com/persona/result21.htm
    >
    >
    >What do I do? Does anyone know of a script like this already? It seems
    >it would be fairly simple to write, but because I've been working on this
    >so hard, I can't really think.
    >
    >If anyone has any suggestion on writing this script or where I can find

    one
    >similar to it... please contact me.
    >
    >Thank you, thank you!
    >Erin
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center