Jump to content

Customizing Form Output


mboehler3

Recommended Posts

Hi, I am trying to fix the output of a form on my website. Here is a screenshot of the form, on the left:referral_form.gifNow, after you successfully submit your information, here is what you see:referral_form2.gifI would like to have the "Your email has been sent. We shall contact you shortly, Thank you." text inside of the form box. Instead, the form box is completely removed after you submit your info.Here is a link to the javascript from the page: JavascriptAnd here is a link to the .asp file: .Asp fileCan someone help me with this? Thank you for any help! And Happy Fourth!

Link to comment
Share on other sites

I don't know where that style information is coming from, but if it's on the form tag then just write out another form tag with the same style to show the response in.
I am a real newbie when it comes to JavaScript.. will you please type out an example of what you're talking about? Thanks a lot for your help.
Link to comment
Share on other sites

This is from your ASP code:

<div class="grid_4">		<%If sendemail = "rac" and refererror = "" Then %>			<a name="thankyou"></a><strong><p>Your email has been sent. We shall contact you shortly.<br />			<p>Thank you.</strong>				<%Else%> 						<script language="JavaScript" src="refer_check.js" type="text/javascript"></script>			<form action="#thankyou" method="post" name="referaclient" onSubmit="return checkrefervalues();">				<input type="hidden" name="sendemail" value="rac">	<img src="/images/v1_1/surechoice/referral_formTop.gif"><div class="reseller_formBox">

The first part prints the message, the else prints the form (starts to, anyway). The image and the div inside the form are probably what give the style, so you would need to use those in the if part in addition to the else part. This isn't Javascript, it's just choosing when to print which HTML code.

Link to comment
Share on other sites

This is from your ASP code:
<div class="grid_4">		<%If sendemail = "rac" and refererror = "" Then %>			<a name="thankyou"></a><strong><p>Your email has been sent. We shall contact you shortly.<br />			<p>Thank you.</strong>				<%Else%> 						<script language="JavaScript" src="refer_check.js" type="text/javascript"></script>			<form action="#thankyou" method="post" name="referaclient" onSubmit="return checkrefervalues();">				<input type="hidden" name="sendemail" value="rac">	<img src="/images/v1_1/surechoice/referral_formTop.gif"><div class="reseller_formBox">

The first part prints the message, the else prints the form (starts to, anyway). The image and the div inside the form are probably what give the style, so you would need to use those in the if part in addition to the else part. This isn't Javascript, it's just choosing when to print which HTML code.

Ahh I understand. Got it to work how I wanted. Thanks for your help. Now if I could just figure out what's wrong with the e-mail address box in my form... I Want My Form To Recognize Incorrect E-mail Address
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...