User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 374,006 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,870 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 1558 | Replies: 1
Reply
Join Date: Feb 2008
Posts: 9
Reputation: kory27 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kory27 kory27 is offline Offline
Newbie Poster

Form with Image Link/Javascript Issue

  #1  
Mar 12th, 2008
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

<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>
&nbsp;
<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">
&nbsp;
<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 12:57 pm. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Posts: 68
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 9
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: Form with Image Link/Javascript Issue

  #2  
Mar 18th, 2008
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.

  1. <cfdump var="#GetProduct#" />
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 10:35 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC