Results 1 to 10 of 10

Thread: Flash Form sendAndLoad problem syncing with JSP

  1. #1
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Flash Form sendAndLoad problem syncing with JSP

    I have a flash form that is sending variables to a online sales planning and processing database called PlanPlus Online (similar to Sales Force). After setting up variables on their end I have plugged these variables into the actionscript in order for them to sync up with the PlanPlus Online database. The form sends no problem but the variables aren't matching up. The variables are posting with "_level0." before the variable name and I believe this is the problem?

    Code:
    function onReset() {
    	ebff_2300.text = "";
    	ebff_2301.text = "";
    	ebff_2302.text = "";
    	ebff_2303.text = "";
    	ebff_2304.text = "";
    	ebff_2305.text = "";
    	ebff_2306.text = "";
    	ebff_2307.text = "";
    	ebff_2308.text = "";
    	ebff_2309.text = "";
    	ebff_2311.text = "";
    	ebff_2312.text = "";
    	cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting.selected = false;
    	cfmvoption_cfMV_ebfb_na_ebff_2310_Planning.selected = false;
    	cfmvoption_cfMV_ebfb_na_ebff_2310_Day_Of_Coordination.selected = false;
    	cfmvoption_cfMV_ebfb_na_ebff_2310_Bachelor_Bachelorette_Party.selected = false;
    	submit_btn.enabled = true;
    }
    function onSubmit() {
    	// Create a new LoadVars instance for the form data
    	formData = new LoadVars();
    	// Initialize formData variables:
    	formData.ebff_2300 = ebff_2300;
    	formData.ebff_2301 = ebff_2301;
    	formData.ebff_2302 = ebff_2302;
    	formData.ebff_2303 = ebff_2303;
    	formData.ebff_2304 = ebff_2304;
    	formData.ebff_2305 = ebff_2305;
    	formData.ebff_2306 = ebff_2306;
    	formData.ebff_2307 = ebff_2307;
    	formData.ebff_2308 = ebff_2308;
    	formData.ebff_2309 = ebff_2309;
    	formData.ebff_2311 = ebff_2311;
    	formData.ebff_2312 = ebff_2312;
    	formData.ebff_2331 = "Simply VIP Wedding";
    	formData.fbid = "366";
    	formData.fbky = "DAgnMtKq";
    	formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting = cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting;
    	formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Planning = cfmvoption_cfMV_ebfb_na_ebff_2310_Planning;
    	formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Day_Of_Coordination = cfmvoption_cfMV_ebfb_na_ebff_2310_Day_Of_Coordination;
    	formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Bachelor_Bachelorette_Party = cfmvoption_cfMV_ebfb_na_ebff_2310_Bachelor_Bachelorette_Party;
    	// Submit the order data
    	//object to receive the server response.
    	var thankyou:LoadVars = new LoadVars();
    	//server response is either true or false
        thankyou.onLoad = function() {
    	  gotoAndStop("thankyou");
    	}
    	formData.sendAndLoad("http://4.71.96.208/forms/fmsubmit.jsp", thankyou, "POST");
    }

  2. #2
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So figured out part of the problem...

    Code:
    formData.ebff_2300 = ebff_2300;
    formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting = cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting;
    needs to be changed to

    Code:
    formData.ebff_2300 = ebff_2300.text;
    formData.cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting = cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting.selected;
    now my user inputs are processing correctly (I created a cfm file to check my variables and their values). But, still no luck with the PlanPlus Online jsp file?

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    So everything is working correctly you just get the Level_0 stuff in front of the variables when it is received by PlanPlus?

    Double check that you don't have instance names AND variable names in the text boxes. It is either/or but very very rarely both. Depending on the use it is usually var that needs to be named and not instance.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No I fixed that problem... (needed to add the ".text or .selected" to each variable value)

    The problem now is, well I have no idea. The variables are correct and they send correctly but it still does not want to sync with the PlanPlus online jsp file?

    my cfm file returned these results...

    Code:
    CFMVOPTION_CFMV_EBFB_NA_EBFF_2310_BACHELOR_BACHELORETTE_PARTY = false
    CFMVOPTION_CFMV_EBFB_NA_EBFF_2310_DAY_OF_COORDINATION = false
    CFMVOPTION_CFMV_EBFB_NA_EBFF_2310_PLANNING = true
    CFMVOPTION_CFMV_EBFB_NA_EBFF_2310_CONSULTING = false
    FBKY = DAgnMtKq
    FBID = 366
    EBFF_2331 = Simply VIP Wedding
    EBFF_2312 = test Special Requests
    EBFF_2311 = test Google
    EBFF_2309 = 2500
    EBFF_2308 = 15
    EBFF_2307 = test@test.com
    EBFF_2306 = test time to call
    EBFF_2305 = 702.456.1234
    EBFF_2304 = test state
    EBFF_2303 = test city
    EBFF_2302 = test address
    EBFF_2384 = test groom Name
    EBFF_2383 = test Last Name
    EBFF_2382 = test First Name
    Here is the html form script that PlanPlus generates that I am targeting for this flash form

    Code:
    <form name=ebfb_na action="http://4.71.96.208/forms/fmsubmit.jsp" method=post>
    <table width=100% cellspacing=0 cellpadding=1 border=0>
    <tr>
      <td class=normalSmall align=right nowrap>Bride First Name: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2382 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Bride Last Name: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2383 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Groom Name: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text class="textInput" name="ebff_2384" value="" size=30 ></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Address: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2302 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>City: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2303 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>State: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2304 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Phone: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2305 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Best Time To Call: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text class="textInput" name="ebff_2306" value="" size=30 ></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>E-Mail: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text name=ebff_2307 class=textInput size=24 value=""></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Approx. # Of Guests: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text class="textInput" name="ebff_2308" value="" size=30 ></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Estimated Budget: &nbsp;</td>
      <td class=normalSmall align=left nowrap><input type=text class="textInput" name="ebff_2309" value="" size=30 ></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Interested In: &nbsp;</td>
      <td class=normalSmall align=left nowrap><table cellspacing=0 cellpadding=0 border=0 align=left><tr><td><input readonly type=text class="textInput" name="ebff_2310" id="ebfb_na_ebff_2310"  value="" size=32 onClick="javascript:toggleCfMvFrame('cfMV_ebfb_na_ebff_2310', 'ebfb_na_ebff_2310');"></td><td><a href="javascript:toggleCfMvFrame('cfMV_ebfb_na_ebff_2310', 'ebfb_na_ebff_2310');"><img src="graphics/ozIconDropdown.gif" border=0></a></td></tr></table><div id="cfMV_ebfb_na_ebff_2310" class="cfMVHidden"><input type=checkbox name="cfmvoption_cfMV_ebfb_na_ebff_2310_Bachelor_Bachelorette_Party" value=Y >Bachelor_Bachelorette_Party<BR><input type=checkbox name="cfmvoption_cfMV_ebfb_na_ebff_2310_Consulting" value=Y >Consulting<BR><input type=checkbox name="cfmvoption_cfMV_ebfb_na_ebff_2310_Day_Of_Coordination" value=Y >Day_Of_Coordination<BR><input type=checkbox name="cfmvoption_cfMV_ebfb_na_ebff_2310_Planning" value=Y >Planning<BR><input type=button name="NA" value="Close" class=smallButton onClick="javascript:toggleCfMvFrame('cfMV_ebfb_na_ebff_2310', 'ebfb_na_ebff_2310');"><BR></div></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>How Did You Hear About Us: &nbsp;</td>
      <td class=normalSmall align=left nowrap><select class=selInput name="ebff_2311"><option value=""> <option value="Ask Search" > Ask Search<option value="Google Search" > Google Search<option value="Hotel Referral" > Hotel Referral<option value="MSN Search" > MSN Search<option value="Nightclub Referral" > Nightclub Referral<option value="Other" > Other<option value="Referral" > Referral<option value="Repeat Client" > Repeat Client<option value="Travel Channel" > Travel Channel<option value="Yahoo Search" > Yahoo Search</select></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Special Requests: &nbsp;</td>
      <td class=normalSmall align=left nowrap><textarea class="textInput" name="ebff_2312"  rows=3 cols=36 ></textarea></td>
    </tr>
    <tr>
      <td class=normalSmall align=right nowrap>Division: &nbsp;</td>
      <td class=normalSmall align=left nowrap><select class=selInput name="ebff_2331"><option value=""> <option value="Graphic Intrigue" > Graphic Intrigue<option value="Red Carpet VIP" > Red Carpet VIP<option value="Simply VIP" > Simply VIP<option value="Simply VIP Wedding" > Simply VIP Wedding<option value="Status Couture" > Status Couture<option value="Vegas Wedding Guide" > Vegas Wedding Guide</select></td>
    </tr>
    <tr>
      <td>&nbsp;</td><td class=normalSmall align=left nowrap>
        <input type=button name=update class=normalButton value=Submit onClick="proceed_save()">
        <input type=hidden name=fbid value=366>
        <input type=hidden name=fbky value=KPVQX33R>
     <script> 
     function proceed_save() { 
       document.ebfb_na.submit(); 
     } 
     </script> 
      </td>
    </tr>
    </table>
    </form>

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Is the jps file a local file to you? It isn't appearing to me, and neither is the /forms/ directory.

    If you need a log in name/password where is it in your AS/Flash file?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No the jsp file I do not have access to, it is on PlanPlusonline's server, this is what is making this so difficult to figure out.

    these vars that I am setting are what I'm assuming are the identifiers...
    FBKY = DAgnMtKq
    FBID = 366

    if you point your browser to
    http://4.71.96.208/forms/fmsubmit.js...&fbky=KPVQX33R
    you can see that the form processes. If you do not have those variables set the jsp file will give an error that it doesn't exist.

    Do you think I have to send login and password as well?

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    If you need a log in ID and password to access the Plan Plus stuff, then yes you would need to submit that as well.

    This is a hard one to find the problem with without seeing the whole thing working and having the OE files to compare to what's happening.

    Another question... PlanPlus does this for more than just you, yes? They are basically a hub. Do they have the Flash set up for you or are you taking *MTL files and converting them to work in Flash?

    If the later, what do the original files look like?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes you need a log in and password to access Plan Plus.

    You are correct they are a hub, and they have never had anyone try and use a flash form with their system so they are of no help to me on this. I am creating the flash form myself based on the script they offer for an html form to sync with their system for our account (the html code I posted earlier).

    I apologize I don't even know what MTL files are?

  9. #9
    Join Date
    May 2007
    Posts
    71
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I forgot to mention there is 3 javascript files that are linked to and 2 style sheets. I have them linked in the html file of the flash form, wondering if perhaps I need to communicate with one of them via actionscript for the form to process correctly?

    http://4.71.96.208/ozLovDatePicker2.js
    http://4.71.96.208/jsmain.js
    http://4.71.96.208/menu.js
    http://4.71.96.208/forms/all.css
    http://4.71.96.208/all.css

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by Mark__G View Post
    I apologize I don't even know what MTL files are?
    *MTL = HTML or DHMTL or XHTML, etc...

    Do you have the fla and the original HTML file you can zip up and I can look at for you?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

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