Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Web publishing business discussion > YOUR CREATION: Building & Maintaining A Web Site > Web Design and Webmaster Issues
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-23-2000, 11:34 PM   #1
DJ_B
Registered User
 
Join Date: Aug 2000
Posts: 260
Unhappy quick perl question...

Howdy gang! In this script that I am messing with it asks you to define some things that you would like to be displayed everytime a record is displayed (it is a DB script). So i did this and it looks like the following:

# <-- Start of short display formatting -- >

print qq|
<table width="98%" border="0" cellspacing="0" cellpadding="1">

<td width="30%"><font face="arial,helvetica" size="2"><a href="$long_url">$rec{'Name'**</font></td>
<td width="25%"><font face="arial,helvetica" size="2">$rec{'License'**</font></td>
<td width="25%"><font face="arial,helvetica" size="2">$rec{'Date Added'**</font></td>
<td width="20%"><font face="arial,helvetica" size="2">$rec{'Download Size'**</font></td>
</tr>
</table>
|;

All great and dandy! But....I want a simple HTML link to be displayed only ONCE at the top of all of my pages. If I put the HTML for the link iin the code above it will display fine, except one link will be shown for every record. So for example, if I have 100 records, 100 HTML links will be shown. But I only want ONE html link at the top of my pages!!

Is there some PERL code that will tell the program to print the HTML link ONCE and only ONCE?

Thanks, and if you are confused, tell me, and I will try to explain some more http://geekvillage.com/ubb/smile.gif

Thanks!
DJ_B is offline   Reply With Quote
Old 12-24-2000, 10:34 AM   #2
JDF000
Registered User
 
Join Date: Aug 2000
Posts: 20
Unhappy

Use a loop!

for( i=0; i<1; i++ )
{

execute your code here;

**

HTH,
Justin
JDF000 is offline   Reply With Quote
Old 12-25-2000, 12:58 AM   #3
DJ_B
Registered User
 
Join Date: Aug 2000
Posts: 260
Unhappy

hmm...da loop didn't seem to work. Maybe it is a FRUITY LOOP !!! http://geekvillage.com/ubb/smile.gif Anyways, here is how I modified the script with the loop.

# Below is where you define what you want to appear for each record in the "short" display.
# You can make this whatever you want, and display as many fields as you would like.
# Choose which of the fields you would like for users to click on to reach the full display
# of records and use that field name in place of "Title" below.
#
# Be sure that you use <a href="$long_url"> for the link to your full record display.

# <-- Start of short display formatting -- >

for
( i=0; i<1; i++ )
{

<p>&nbsp</p><b>$html_title: <font face="Arial, Helvetica, sans-serif" size="2">Search Results </font></b>;

**
print qq|

<table width="98%" border="0" cellspacing="0" cellpadding="1">

<td width="30%"><font face="arial,helvetica" size="2"><a href="$long_url">$rec{'Name'**</font></td>
<td width="25%"><font face="arial,helvetica" size="2">$rec{'License'**</font></td>
<td width="25%"><font face="arial,helvetica" size="2">$rec{'Date Added'**</font></td>
<td width="20%"><font face="arial,helvetica" size="2">$rec{'Download Size'**</font></td>
</tr>
</table>
|;

When i add the loop I get an "DBMan encountered an error" error. Am I doing something wrong? Any other suggestions?

Oh yeah, if you want to take a look at the entire script (well not the entire script, but the part I am trying to modify) go to www.appleprograms.com/html.txt

thanks!
DJ_B is offline   Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl code question, stripping sequences WildComputer Web Design and Webmaster Issues 2 06-27-2001 03:10 PM
Quick .CC domain question FWT Web Design and Webmaster Issues 0 04-24-2001 03:16 PM
Perl string replacement question WildComputer Web Design and Webmaster Issues 1 04-21-2001 04:03 AM
Perl Question (Jonathan M.!) AK Web Design and Webmaster Issues 0 12-10-2000 07:42 PM
Easy perl substitution question WildComputer Web Design and Webmaster Issues 5 11-07-2000 08:03 AM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 09:36 AM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.