Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Table problem with shoppage_header?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Euan_Ecosse
Starting Member

2 Posts

Posted - August 25 2004 :  08:13:39  Show Profile  Reply with Quote
Hi, I've just bought VPASP and trying to customise the layout.

I'm worknig my way throught the Developers manual and found problem when trying to introduce left navigation (p14) for list of categories. Instead of placing the main shop inside the table cell on the same row as the categories list, the main shop is place outside of this.

I'm a bit confused and would appreciate any help so that everything is aligned properly - I think the problem is at the table at "Start: Main Display" but not sure how to resolve it.

Here's the relevant source code from one of my shop pages;


<!-- Start: Left Navigation-->
<td valign="top" bordercolor="#FFFFFF"> <table border=0 cellpadding=0 cellspacing=1 bgcolor=#6699CC bordercolor=#FFFFFF>
<tr valign='top' bordercolor='#FFFFFF'>
<td width=150 valign=middle align=center>
<table border=0 cellpadding=1 cellspacing=1 bgcolor='#FFFFFF'><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplayproducts.asp?id=5&cat=Clothes">Clothes</a></td></tr><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplayproducts.asp?id=3&cat=Computers+and+Electrical">Computers and Electrical</a></td></tr><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplaycategories.asp?id=1&cat=Furniture">Furniture...</a></td></tr><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplayproducts.asp?id=6&cat=Groceries">Groceries</a></td></tr><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplayproducts.asp?id=4&cat=Services">Services</a></td></tr><tr valign='top'><td width=100 valign=middle align=left bgcolor='#FFFFFF'><a HREF="shopdisplayproducts.asp?id=2&cat=Travel+Packages">Travel Packages</a></td></tr></table>
</td>
</tr>
</table>
</td>
<td valign=top align=center width=600>
<!-- Start: Main display--></table>
<center><p align='center'><font size=2 face=verdana color='#000066'><b>Search for products by keyword, category or subcategory.<br>Check one or more categories<br>or enter up to 10 keywords separated by commas.</font></b><br><form name=form1 method=Post action='shopsearch.asp?search=Yes'><table border=0 cellpadding=1 cellspacing=1 width='50%'><tr bgcolor='#336633'><td colspan=2><font color='#FFFFFF'><b>Enter Search Fields</b></td></tr><tr bgcolor='#E5E5E5'><td>Keywords </td><td><input size=50 name=Keyword></td></tr></table><p><input type=image border='0' name=action src="vpnav_search.gif"><br><br><img border='0' src='vpnav_reset.gif' onclick='document.form1.reset()'></form><!-- end Main Display-->


Thanks for all help.

Cheers,
Euan

Euan_Ecosse
Starting Member

2 Posts

Posted - August 25 2004 :  08:44:34  Show Profile  Reply with Quote
Hi again,

I found someone else on the forum who had same problem, but no-one replied.

I tried to amend the code for the table row which works OK for text but doesn't show the Main Display correctly - it's always placed underneath the categories list.

All help is really appreciated.

Thanks,
Euan

Here's my new code for shoppage_header with the change noted as text.

 
<!-- Start: Left Navigation-->
<td valign="top" bordercolor="#FFFFFF"> <table border=0 cellpadding=0 cellspacing=1 bgcolor=#FFFFFF bordercolor=#FFFFFF>
<tr valign='top' bordercolor='#FFFFFF'>
<td width=150 valign=middle align=left>
<%NavigateShowlanguages%>
<%NavigateShowCategories%>
</td>
</tr>
</table>
</td>
<td valign=top align=center width=600><div align="left">main display should go here - but doesn't?
<!-- Start: Main display-->
</div></td></tr>
</table>
<center>
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 25 2004 :  13:08:53  Show Profile  Visit devshb's Homepage  Reply with Quote
This might be due to the form tags that are inside the language+category navigation functions.

If it's forcing a newline even when there isn't one coded-up then that'll probably be why. Also, this problem will most likely only show up in internet explorer and not in netscape.

For some reason, <form> tags that are inside <td> definitions will force a newline or other blankspace in some browsers. To get round this, you can delve into the code that creates those lists and move the form tags outside the <td> and </td> tags, so that the code ends up like:

<tr><form><td>list</td></form></tr>

instead of:
<tr><td><form>list</form></td></tr>

to do this, you might need to add a spurious/extra table inside those navigation functions.

The languages poplist is done in "shoplanguagesubs.asp".

The categories are done in "shopproductsubs.asp".

If you delve into those and just add a table around the form tags as described above then your form will be self-contained and not create this spurious whitespace.

We've got 2 topics which are related to form problems like this on our forum:

Stopping extra whitespace in poplists/forms:
http://bigyellowzone.com/forum/topic.asp?TOPIC_ID=9

spurious </form> tag when using stayonpage:
http://bigyellowzone.com/forum/topic.asp?TOPIC_ID=26

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

euan_ecosses
Starting Member

11 Posts

Posted - August 27 2004 :  10:25:44  Show Profile  Reply with Quote
Hi Devshb,

Thanks for the suggestion about the form tags. That rings a bell with me about having a similar problem long ago. I'll try and rewrite the code as you've suggested.

Cheers,

Euan
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00