[ic] RE: Passing data from flypage to new page with content of image_large field

John Wolgamot John at Wolgamot.com
Wed Jun 23 04:53:55 EDT 2004


>> On Tue, 15 Jun 2004 16:17:26 -0500 "John Wolgamot"
>> <John at Wolgamot.com> wrote:
>>
>> Hi,
>>
>> Sorry if I missed it. I'm sure this has been asked
>> and answered.
>>
>> I've been looking for a while with no luck though.
>>
>> Code snips follow this diatribe.
>>
>> I'm trying to use the image_large field in the
>> database to display an enlarged image(NO-popup).
>> The link takes you to the flypage2 but the image
>> won't display on the page. I have read somewhere
>> in the mail archives that it has something to do
>> with the session ID or passing the data to the
>> next page but I'm not sure where to find that info
>> in the mailing lists.
>>
>> I'm still looking and if I figure it out before
>> anyone has a chance to respond, I'll post a reply
>> of my discoveries here.
>>
>> Obviously I'm a complete novice but I have had
>> luck with other hurdles like adding new tables to
>> the database and matching input fields to the
>> admin UI. I was happy about that one :-)
>>
>> In the meantime I thought I would ask if anyone
>> could help me understand what code I need to
>> insert which passes the info to the flypage2 so it
>> will know which product image to pull from the
>> image_large table, or if I'm missing code in the
>> flypage2.html
>>
>> I also tried enclosing the table in flypage2
>> inside of a <form> </form> with various clips from
>> the top of the normal flypage <form> but I'm just
>> not versed enough to completely get it yet.
>>
>> Following are code snippets.
>> Thanks in advance, John> >
>>
>>
>> I have inserted the following code in the flypage
>> below the [/if-item-field] so there will be a link
>> below the medium sized image to send the user to
>> the flypage2.>>
>>
>> -----------------------
>> STOCK CODE FROM FLYPAGE
>> -----------------------
>> [if-item-field image]
>> 	    <IMG SRC="items/[item-field image]" ALT="[item-filter
>> entities][item-description][/item-filter]" title="[item-filter
>> entities][item-description][/item-filter]" BORDER=1>
>>  	  [/if-item-field]
>>
>>
>> ---------------------------------------------
>> CODE I ADDED TO PLACE A LINK BELOW THE MEDIUM
>> IMAGE ON THE FLYPAGE
>> ---------------------------------------------
>>         [if-item-field image_large]
>> 	  <A HREF="[area flypage2]">ENLARGE</A>
>>         [/if-item-field]
>>


> 
> Try [area href=flypage2 arg="[item-code]"] 
> to get the SKU across.
>


>>
>>
>>
>>
>> Then I created a second flypage (flypage2.html) which contains the
>> following code including a BACK button link which I like a lot.
>>
>>
>> @_NOLEFT_TOP_@
>> <!-- BEGIN CONTENT -->
>>
>> [fly-list]
>>
>>
>> <br>
>>	  <table width="100%">
>>  <tr>
>>    <td><div align="center">[if-item-field image_large]
>>	    <IMG SRC="items/[item-field image_large]" ALT="[item-filter
>> entities][item-description][/item-filter]" title="[item-filter
>> entities][item-description][/item-filter]" BORDER=1>
>> 	  [/if-item-field]</div></td>
>>  </tr>
>> </table>
>>
>>
>> <FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return
>> true;"> </FORM>
>>
>>
>>
>> [/fly-list]


> 
> Substitute that with [fly-list code="[data session arg]"].
> 
> Bye
> 	Racke
> 



Thanks Racke,

With your help and a little more fiddling I got it
working. Here are the results for those who are
interested in the outcome of this exchange.

In the flypage I have the following code placed 
just below the normal flypage image code.


<td width="50%"><div align="center">[if-item-field image_large] <a
href="[area href=flypage2 arg="[item-code]"]">LARGE VIEW</a>
[/if-item-field] </div></td>


The above code will test to see if there is data
in the image_large field and if there is it will
display a link below the image on the flypage
which says LARGE VIEW. If there is no data in the
image_large field then no link is displayed.

The link "LARGE VIEW" (if displayed) takes you to
the flypage2.html and on that page I have the
following code.

As a convenience to the shopper, there are 2
form buttons above and below the large_image
which will take you back 1 or 2 pages to
either the flypage or the results page.


[fly-list code="[data session arg]"]

 <FORM> 
  <div align="center">
    <INPUT TYPE="button" VALUE="Back to Details"
onClick="history.go(-1);return true;"> 
    <INPUT TYPE="button" onClick="history.go(-2);return true;" VALUE="
Back to List   ">
  </div>
</FORM>



<table width="100%" height="100%" align=center cellpadding=3 cellspacing=0
bgcolor="#006699">
    <tr>
      <td align="left" valign="top"> <div align="center"> <IMG
SRC="items/[item-field image_large]" BORDER=3></div></td>
    </tr>
</table>
  


  <FORM> 
  <div align="center">
<INPUT TYPE="button" VALUE="Back to Details" onClick="history.go(-1);return
true;">
<INPUT TYPE="button" VALUE="   Back to List   "
onClick="history.go(-2);return true;">
  </div>
</FORM>

[/fly-list]


Thanks again Racke,

Hope this helps someone else too.

Wolga





More information about the interchange-users mailing list