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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question About Anchors

Status
Not open for further replies.

soho34

IS-IT--Management
Dec 28, 2004
102
US
Hi,

I have an HTML page I've divided into 2 sections: form1, and form2.

In form2, I have a button that's defined as the following:
... form1 defined....

... form2 defined


<input type="button" value="add payment --" name="back" style="font-size:10px;" class="flat" onclick="document.location.replace('paymentedit.cfm?newpayment=#paymentid#&paymentid=#paymentid#');">

... end of form2

When this button is clicked the form submits to itself.

I want to place an anchor for my form2 section, but I'm not sure how to do that with having this button defined the way it is with the onclick. (I have to keep the onlick to get the correct functionlaity.)

I'd like the focus to return to this section.

Thanks in advance for any help.

soho34
 
Something like this:

Code:
<a name="form2" id="form2"></a>
<form name="form2" ... >
   ...
   <input type="button" value="add payment --" name="back" style="font-size:10px;" class="flat" onclick="document.location.replace('paymentedit.cfm?newpayment=#paymentid#&paymentid=#paymentid#[blue]#form2[/blue]');">
</form>

But, this seems like ColdFusion. While I don't know CFML well at all, I believe that if you want to display a "#" in HTML, you have to double them up. In which case, it would be [blue][tt]##form2[/tt][/blue] instead.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top