Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Expected error 1

Status
Not open for further replies.

mtaylor197

Programmer
Mar 30, 2001
5
US
I am getting an "Object Exptected" error. I was validating some information and then redirecting to this page so that the info can be submited using the post method. I am new to Javascript so I can't figure out what is wrong. Here is my code:

<%
Session(&quot;ioc_merchant_id&quot;) = Request(&quot;ioc_merchant_id&quot;)
Session(&quot;ioc_order_total_amount&quot;) = Request(&quot;ioc_order_total_amount&quot;)
Session(&quot;ecom_billto_postal_street_line1&quot;) = Request(&quot;ecom_billto_postal_street_line1&quot;)
Session(&quot;ecom_billto_postal_street_line2&quot;) = Request(&quot;ecom_billto_postal_street_line2&quot;)
Session(&quot;ecom_billto_postal_postalcode&quot;) = Request(&quot;ecom_billto_postal_postalcode&quot;)
Session(&quot;ecom_billto_postal_countrycode&quot;) = Request(&quot;ecom_billto_postal_countrycode&quot;)
Session(&quot;PaymentCCType&quot;) = Request(&quot;PaymentCCType&quot;)
Session(&quot;ecom_billto_online_email&quot;) = Request(&quot;ecom_billto_online_email&quot;)
Session(&quot;ecom_payment_card_name&quot;) = Request(&quot;ecom_payment_card_name&quot;)
Session(&quot;ecom_payment_card_number&quot;) = Request(&quot;ecom_payment_card_number&quot;)
Session(&quot;ecom_payment_card_expdate_month&quot;) = Request(&quot;ecom_payment_card_expdate_month&quot;)
Session(&quot;ecom_payment_card_expdate_year&quot;) = Request(&quot;ecom_payment_card_expdate_year&quot;)
Session(&quot;ioc_merchant_id&quot;) = Request(&quot;ioc_merchant_id&quot;)
Session(&quot;ioc_order_total_amount&quot;) = Request(&quot;ioc_order_total_amount&quot;)

%>
<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>

<script language=&quot;Javascript&quot;>

function Submit()
{
document.submitnow.merchant_id.value = <%=session(&quot;ioc_merchant_id&quot;)%>;
document.submitnow.order_amount.value = <%=session(&quot;ioc_order_total_amount&quot;)%>;
document.submitnow.street1.value = <%=session(&quot;ecom_billto_postal_street_line1&quot;)%>;
document.submitnow.street2.value = <%=session(&quot;ecom_billto_postal_street_line2&quot;)%>;
document.submitnow.postalcode.value = <%=session(&quot;ecom_billto_postal_postalcode&quot;)%>;
document.submitnow.countrycode.value = <%=session(&quot;ecom_billto_postal_countrycode&quot;)%>;
document.submitnow.email.value = <%=session(&quot;ecom_billto_online_email&quot;)%>;
document.submitnow.name.value = <%=session(&quot;ecom_payment_card_name&quot;)%>;
document.submitnow.number.value = <%=session(&quot;ecom_payment_card_number&quot;)%>;
document.submitnow.expmonth.value = <%=session(&quot;ecom_payment_card_expdate_month&quot;)%>;
document.submitnow.expyear.value = <%=session(&quot;ecom_payment_card_expdate_year&quot;)%>;
document.submitnow.submit;
}

</script>
</HEAD>
<BODY onLoad=&quot;Submit()&quot;>
<form name=&quot;submitnow&quot; action=&quot;test2.asp&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;merchant_id&quot;>
<input type=&quot;hidden&quot; name=&quot;order_amount&quot;>
<input type=&quot;hidden&quot; name=&quot;street1&quot;>
<input type=&quot;hidden&quot; name=&quot;street2&quot;>
<input type=&quot;hidden&quot; name=&quot;postalcode&quot;>
<input type=&quot;hidden&quot; name=&quot;countrycode&quot;>
<input type=&quot;hidden&quot; name=&quot;email&quot;>
<input type=&quot;hidden&quot; name=&quot;name&quot;>
<input type=&quot;hidden&quot; name=&quot;number&quot;>
<input type=&quot;hidden&quot; name=&quot;expmonth&quot;>
<input type=&quot;hidden&quot; name=&quot;expyear&quot;>
</form>
<P> </P>

</BODY>
</HTML>

Thanks,

Michelle
 
not sure if this will help, but try putting quotes around your values:

document.submitnow.email.value = &quot;<%=session(&quot;ecom_billto_online_email&quot;)%>&quot;;

if that doesn't do it, let me know. Is it a server-side or client-side error? jared@eae.net -
 
I am no longer getting the &quot;Object Expected&quot; error but the form is not being submited to the action in the form tag.
Can you help me?

Thanks,

Michelle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top