CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2002
    Posts
    14

    Searches, using java to post forms.

    I'm trying to search 2 databases with 1 input....

    Here are the 2 forms that are used to search the seperate databases.
    ----------------------------------------------------------
    <HTML>
    <HEAD>
    <TITLE>Account Verification</TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <!-- (c)1998 AirTouch -->
    <P ALIGN="center">
    <CENTER>
    <H2>Customer Maintenance Options</H2>
    <H2>(Account Verification)</H2>
    <HR align="center">
    <H3>Enter the customer's <FONT COLOR="#ff0000">mobile number</FONT> or their <FONT COLOR="#ff0000">account number, billing system, market and district</FONT> below:</H3>
    <BR>
    <FORM ACTION="/jstage_mgr/plsql/jstage_meprofile.verify_acct" METHOD="post">
    <INPUT TYPE="hidden" NAME="page_type" VALUE="'CF'">
    <TABLE 0 cellpadding=0 width="357">
    <TR>
    <TD width="77">Mobile Number:</TD>
    <TD ALIGN="left"><INPUT TYPE="text" NAME="p_npa" SIZE="3" MAXLENGTH="3"> - <INPUT TYPE="text" NAME="p_nxx" SIZE="3" MAXLENGTH="3"> - <INPUT TYPE="text" NAME="p_line" SIZE="4" MAXLENGTH="4"></TD>
    </TR>
    </TABLE>
    <BR>
    <H4>OR</H4>
    <BR>
    <TABLE 0 cellpadding=0 width="357">
    <TR>
    <TD width="77">Account #:</TD>
    <TD width="214"><INPUT TYPE="text" NAME="p_acct" SIZE="20" MAXLENGTH="20"></TD>
    </TR>
    <TR>
    <TD width="77">Billing System:</TD>
    <TD width="214"><select name="p_host"><option>PRISM</option>&nbsp;<option>OMNI</option>&nbsp;<option>ACTION</option>&nbsp;</select></TD>
    </TR>
    <TR>
    <TD width="77">Market:</TD>
    <TD width="214"><select name="p_mkt"><option>LA</option>&nbsp;<option>NC</option>&nbsp;<option>SD</option>&nbsp;<option>MI</option>&nbsp;<option>OH</option>&nbsp;<option>WR</option>&nbsp;</select></TD>
    </TR>
    <TR>
    <TD width="77">District:</TD>
    <TD width="214"><select name="p_dist"><option>AN</option>&nbsp;<option>LA</option>&nbsp;<option>NC</option>&nbsp;<option>NV</option>&nbsp;<option>SD</option>&nbsp;<option>OH</option>&nbsp;<option>MI</option>&nbsp;<option>WR</option>&nbsp;</select></TD>
    </TR>
    </TABLE>
    <BR>
    <INPUT TYPE="submit" VALUE="Find Account">
    <BR>
    <BR>
    <HR align="center">
    <BR>
    </CENTER>
    </BODY>
    </HTML>




    INPUT 2

    <LINK rel="STYLESHEET" href="../include/verizon.css" type="text/css"/>
    <LINK rel="STYLESHEET" href="../include/ecare2.css" type="text/css"/>
    <SCRIPT LANGUAGE="JavaScript" SRC="../include/validateForm.js"></SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" SRC="../include/checkInput.js"></SCRIPT>

    <html>
    <head>
    <title>Retail Account Search</title>
    </head>
    <body bgcolor="#FFFFFF" text="#000000" onLoad="document.retailaccountsearchform.mobileNumber.focus();">
    <form method="post" action="retailaccountresult" name="retailaccountsearchform" onSubmit="if (checkInput(document.retailaccountsearchform)==false) return false;">
    <table width="90%" border="0">
    <tr>
    <td colspan="2" align="center" class="sectitle">VZServe Customer Database Search</td>
    </tr>
    <tr>
    <td colspan="2" align="center" class="pdkred">No results found.</td>
    </tr>
    <tr>
    <td colspan="2">Please enter either the wireless number <b>or</b> the account number to begin your search:</td>
    </tr>
    <tr>
    <td width="50%" align="right">Wireless Number </td>
    <td width="*" align="left"><input type="text" name="mobileNumber" size="10" maxlength="10" /></td>
    </tr>
    <tr>
    <td colspan="2">&#160;</td>
    </tr>
    <tr>
    <td align="right">Account Number </td>
    <td align="left"><input type="text" name="accountNumber" size="15" maxlength="15" /></td>
    </tr>
    <tr>
    <td colspan="2">&#160;</td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input type="submit" name="Submit" value="Submit"/>
    <input type="reset" name="Clear" value="Clear"/></td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    -------------------------------------------------------------------

    Here is what I was trying to work with with no success:
    *********************************************

    <HTML><HEAD><TITLE> Test </TITLE></HEAD><BODY>

    <form action="" target="" name=f method="post" enctype="application/x-www-form-urlencoded" >
    <table cellspacing=0 cellpadding=0>
    <tr>
    <td align=center>
    <input type="text" name="mobileNumber" size="10" maxlength="10" />
    <br><input type='button' value="Search" onclick='submitthem()'>
    </td>
    </tr></table></form>


    <SCRIPT>
    function submitthem()
    {
    var f = document.forms["f"];

    var w1 = window.open('about :blank','trg1','location=yes,menubar=yes;height='+screen.height+';width='+(screen.width / 2))
    w1.focus();
    var w2 = window.open('about :blank','trg2','location=yes,menubar=yes;height='+screen.height+';width='+(screen.width / 2))
    w2.moveTo((screen.width / 2),0)
    w2.focus();


    f.action = 'http://app1.idc.vzwcorp.com:5191/login/user/retailaccountresult'; //the 1st site
    f.target = 'trg1'; //the 1st window name
    f.submit();

    f.action = 'http://hayes.idc.vzwcorp.com:9009/jstage_mgr/plsql/jstage_meprofile.verify_acct'; //the 2nd site
    f.target = 'trg2'; //the 2nd window name
    f.submit();

    }
    </SCRIPT></BODY></HTML>


    *******************************************************

    [Goodz13:Moved]
    Last edited by Goodz13; February 25th, 2003 at 09:50 AM.
    Some N00b bored at work!

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    So what is your Java problem?

    Roger Irrelevant - he's completely hatstand...
    Please use &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Jan 2002
    Location
    Halifax, NS, Canada
    Posts
    985
    It looks like your are using HTML, JavaScript, and some kind of CGI (jstage_meprofile.verify_acct)

    Is this a Java Question?
    Sorry if I sound rude, but JavaScript is a completely different language than Java. The syntex is the same (Except for declaring methods (Functions), and java is OO), but that's about it. For that matter you could call it C Script

    The Client Side Scripting might be a better forum to post your question on, but please don't cross post. If this is a JavaScript question, please let me know and I will move it for you!

    Derrick

  4. #4
    Join Date
    Dec 2002
    Posts
    14
    yeah sorry its a JavaScript question... Sorry for posting in the wrong forum
    Some N00b bored at work!

  5. #5
    Join Date
    Feb 2003
    Location
    Oakland, CA
    Posts
    29
    Give more info on the errors you are getting. What exactly isn't working and what, if any, are the javascript error messages?

    Nate Grover

  6. #6
    Join Date
    Dec 2002
    Posts
    14
    All that happens with that script is that the 2 pages pop up and a huge "page cannot be displayed" on both ;(

    I'm thinking that because there are other variables normally submitted...


    ie accountnumber etc that the resulting URL

    yadayday?mobilenumber=#########

    doesnt look right to the script on thier end.


    I am probably completly wrong, but I cant seem to get this to work. What would the resulting string sent to the url be for this form?:


    <form method="post" action="retailaccountresult" name="retailaccountsearchform" onSubmit="if (checkInput(document.retailaccountsearchform)==false) return false;">
    <table width="90%" border="0">
    <tr>
    <td colspan="2" align="center" class="sectitle">VZServe Customer Database Search</td>
    </tr>
    <tr>
    <td colspan="2" align="center" class="pdkred">No results found.</td>
    </tr>
    <tr>
    <td colspan="2">Please enter either the wireless number <b>or</b> the account number to begin your search:</td>
    </tr>
    <tr>
    <td width="50%" align="right">Wireless Number </td>
    <td width="*" align="left"><input type="text" name="mobileNumber" size="10" maxlength="10" /></td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td align="right">Account Number </td>
    <td align="left"><input type="text" name="accountNumber" size="15" maxlength="15" /></td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td colspan="2" align="center"><input type="submit" name="Submit" value="Submit"/>
    <input type="reset" name="Clear" value="Clear"/></td>
    </tr>
    </table>
    </form>
    -------------------------------------------------------------

    htp:// yadayada/retailaccountresult?mobileNumber=0000000&accountNumber=?

    ??


    I have very limited knowledge of Javascript and CGI and server side scripting so I may be completly off base on what is going on.
    Some N00b bored at work!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured