| | |
Form with Image Link/Javascript Issue
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 10
Reputation:
Solved Threads: 0
Hi. I have two sets of code below. The first is part of my old code
off a page called item.cfm. the second is the same code, but i have
attempted to change the destination link to a url i have stored in my
database for the button btnaddtocart.gif. that db field is
#GetProduct.ProductLink#. the problem is when i change it, the link
doesn't show as that at all. Does anyone have any insight? this one is
above me. Thanks.
oh yeah, i would also like to do this for the button btnframeme.gif so
if what i would need to do is different, could you please let me know.
thanks again.
NEW Code Below
OLD CODE BELOW
off a page called item.cfm. the second is the same code, but i have
attempted to change the destination link to a url i have stored in my
database for the button btnaddtocart.gif. that db field is
#GetProduct.ProductLink#. the problem is when i change it, the link
doesn't show as that at all. Does anyone have any insight? this one is
above me. Thanks.
oh yeah, i would also like to do this for the button btnframeme.gif so
if what i would need to do is different, could you please let me know.
thanks again.
NEW Code Below
<p><span class="mediumbold">Quantity:</span>
<input type="text" name="q" value="1" size="1"
maxlength="2" class="small">
</p>
<p>
<a href="#GetProduct.ProductLink#"><img
src="images/btnAddtoCart.gif" border="0" alt="Click to buy #productname#
posters" hspace="2" /></a>
<cfif GetProductMultiSize.RecordCount IS 0>
<cfif (GetProduct.productWidth LTE
application.MaxFrameWidth) AND (GetProduct.productHeight LTE
application.MaxFrameHeight)>
<input type="image"
onClick="javascript:document.frmItem.fa.value='frame'"
src="/images/btnFrameMe.gif" alt="Frame your #getproduct.productname#
poster here" border="0">
<br>OLD CODE BELOW
<p><span class="mediumbold">Quantity:</span>
<input type="text" name="q" value="1" size="1"
maxlength="2" class="small">
</p>
<p>
<input type="image"
onClick="javascript:document.frmItem.fa.value='add'"
src="/images/btnAddToCart.gif" alt="Add #getproduct.productname# posters
to my shopping cart." border="0">
<cfif GetProductMultiSize.RecordCount IS 0>
<cfif (GetProduct.productWidth LTE
application.MaxFrameWidth) AND (GetProduct.productHeight LTE
application.MaxFrameHeight)>
<input type="image"
onClick="javascript:document.frmItem.fa.value='frame'"
src="/images/btnFrameMe.gif" alt="Frame your #getproduct.productname#
poster here" border="0">
<br>
Framing starts at
<cfoutput>#DollarFormat(GetProduct.MINFRAMEPRICE)#</cfoutput>
</cfif><br> Last edited by peter_budo; Mar 12th, 2008 at 1:57 pm. Reason: Keep It Organized - please use [code] tags
When you view the page in a browser, what's the source look like? Can you post that?
Also, have you checked to see if the GetProduct.ProductLink element has the data you need? You can do a cfdump on your page to see what the query holds.
Also, have you checked to see if the GetProduct.ProductLink element has the data you need? You can do a cfdump on your page to see what the query holds.
ColdFusion Syntax (Toggle Plain Text)
<cfdump var="#GetProduct#" />
![]() |
Similar Threads
Other Threads in the ColdFusion Forum
- Previous Thread: coldfusion - save edited query results
- Next Thread: cfloops
| Thread Tools | Search this Thread |





