close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Create links in a repeat region

Thread began 1/11/2013 10:02 am by zackdacre445052 | Last modified 11/14/2013 1:22 pm by anonymous | 5092 views | 13 replies |

zackdacre445052

Create links in a repeat region

I am quite new to Dreamweaver and need some assistance. I have created a repeat region displaying names from a database. I would like to link each name to a separate Word document that can be downloaded in a web browser. Thanks for your assistance.

Sign in to reply to this post

Jason ByrnesWebAssist

is the name of the word document stored in the database table that is driving the repeat region?

you can easily add a link through the property inpsector.

highlight the name field, open the property inspector, in the link field, click the folder icon, set the link to use Data Sources, and select the recordset column that holds the word document name.

Sign in to reply to this post

zackdacre445052

links in repeat region

The name of the word document is not stored in the database. Do I need to store the name of the word document in the database table for this to work? thanks

Sign in to reply to this post

Jason ByrnesWebAssist

if the link will be different for each record, than yes.

Sign in to reply to this post

zackdacre445052

links in repeat region

Thanks much! It worked out perfect.

Sign in to reply to this post

anonymous

Links in repeat region

Hi Jason,

I am not sure if you are still available to answer this question. I am now CS 6 and the links do not work anymore. Any suggestions. Thanks much.

Sign in to reply to this post

Jason ByrnesWebAssist

Need ore details please.

How are you creating the links? in what way do they not work?

Can you send a copy of the page please.

Sign in to reply to this post

anonymous

<?php require_once('Connections/Hosting.php'); ?>
<?php require_once('Connections/Hosting.php'); ?>
<?php require_once('Connections/Hosting.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_Hosting, $Hosting);
$query_Applicants = "SELECT namelist.name, namelist.Occupation, namelist.id FROM namelist ORDER BY namelist.name";
$Applicants = mysql_query($query_Applicants, $Hosting) or die(mysql_error());
$row_Applicants = mysql_fetch_assoc($Applicants);
$totalRows_Applicants = mysql_num_rows($Applicants);

mysql_select_db($database_Hosting, $Hosting);
$query_Applicants2 = "SELECT namelist.Occupation, namelist.id FROM namelist ORDER BY namelist.name";
$Applicants2 = mysql_query($query_Applicants2, $Hosting) or die(mysql_error());
$row_Applicants2 = mysql_fetch_assoc($Applicants2);
$totalRows_Applicants2 = mysql_num_rows($Applicants2);

mysql_select_db($database_Hosting, $Hosting);
$query_Applicants_details = "SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist ORDER BY namelist.name LIMIT 2";
$Applicants_details = mysql_query($query_Applicants_details, $Hosting) or die(mysql_error());
$row_Applicants_details = mysql_fetch_assoc($Applicants_details);
$totalRows_Applicants_details = mysql_num_rows($Applicants_details);

$var1_Applicants_details3 = "-1";
if (isset($_GET['id'])) {
$var1_Applicants_details3 = $_GET['id'];

$query_Applicants_details = sprintf("SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist WHERE namelist.id = %s ORDER BY namelist.name ", GetSQLValueString($var1_Applicants_details3, "int"));
}else{
$query_Applicants_details = "SELECT namelist.name, namelist.Gender, namelist.address, namelist.NIC, namelist.Highest_Qualification, namelist.Occupation, namelist.CV_name, namelist.id, namelist.Picture FROM namelist ORDER BY namelist.name LIMIT 2";
}
$Applicants_details = mysql_query($query_Applicants_details, $Hosting) or die(mysql_error());
$row_Applicants_details = mysql_fetch_assoc($Applicants_details);
$totalRows_Applicants_details = mysql_num_rows($Applicants_details);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://use.edgefonts.net/sarina.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PC Services</title>
<link href="Style/Style.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
</style>
</head>

<body>
<div id="header">
<h1>PC Services </h1>
<h2><img src="Images/chip.jpg" width="113" height="103" alt="chip" />&quot;Solutions through Technology&quot;</h2>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Services&gt;Career&gt;Job Applicants</p>
</div>
<div id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><strong><a href="index.html">Home</a>
</strong> </li>
<li><strong><a href="#">Products</a></strong></li>
<li><strong><a class="MenuBarItemSubmenu" href="#">Services</a>
</strong>
<ul>
<li><a href="Advertising.html">Advertising</a></li>
<li><strong><a class="MenuBarItemSubmenu" href="career.html">Career</a> </strong>
<ul>
<li><strong><a href="Job_applicants.php">Job_Applicants</a></strong></li>
<li><strong><a href="Occupational_groups.html">Occupational_Groups</a></strong></li>
</ul>
</li>
<li><strong><a href="Repairs.html">Repairs</a></strong></li>
<li><strong><a href="#">Upgrades</a></strong></li>
</ul>
</li>
<li><strong><a href="#">News</a></strong></li>
<li><strong><a href="#">Contact Us</a></strong></li>
</ul>
<form id="NIC" name="NIC" method="post" action="Search_NIC.php">
<p><strong>
<label for="search">SEARCH NIC#</label>
<input type="text" name="NIC" id="NIC" />
<input type="submit" name="submit" id="submit" value="GO" />
</strong></p>
</form>
</div>
<div id="home_2">
<h2>Job Applicants</h2>
<div id="name">
<h3>Name</h3>
<?php do { ?>
<p><a href="Applicants.php?id=<?php echo $row_Applicants['id']; ?>"><?php echo $row_Applicants['name']; ?></a></p>
<?php } while ($row_Applicants = mysql_fetch_assoc($Applicants)); ?>
</div>
<div id="occupation">
<h3>Position</h3>
<?php do { ?>
<p><?php echo $row_Applicants2['Occupation']; ?></p>
<?php } while ($row_Applicants2 = mysql_fetch_assoc($Applicants2)); ?>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div id="home_3">
<h2>Applicants Details</h2>
<?php do { ?>
<p><strong><em>Name&gt;&gt;&gt; </em></strong><?php echo $row_Applicants_details['name']; ?></p>
<div id="picture">
<p><img src="<?php echo $row_Applicants_details['Picture']; ?>" /></p>
<p>&nbsp;</p>
</div>
<p><em><strong>Address &gt;&gt;&gt;</strong></em><?php echo $row_Applicants_details['address']; ?></p>
<p><em><strong>NIC#</strong></em>&gt;&gt;&gt; <?php echo $row_Applicants_details['NIC']; ?></p>
<p><em><strong>Gender&gt;&gt;&gt;</strong></em> <?php echo $row_Applicants_details['Gender']; ?></p>
<p><em><strong>Occupation&gt;&gt;&gt;</strong></em> <?php echo $row_Applicants_details['Occupation']; ?></p>
<p><em><strong>Highest Qualification&gt;&gt;&gt;</strong></em><?php echo $row_Applicants_details['Highest_Qualification']; ?></p>
<p><em><strong>Download CV&gt;&gt;&gt; </strong></em><a href="<?php echo $row_Applicants_details['CV_name']; ?>"><?php echo $row_Applicants_details['CV_name']; ?></a></p>
<p>&nbsp;</p>
<?php } while ($row_Applicants_details = mysql_fetch_assoc($Applicants_details)); ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="Footer">
<p>&copy; PC Services Page last updated Friday, October 25, 2013</p>
<p>&nbsp;</p>
</div>
<p>&nbsp; </p>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>
<?php
mysql_free_result($Applicants);

mysql_free_result($Applicants2);

mysql_free_result($Applicants_details);

?>
A copy of the page is above. I created a link to a word document using the property inspector and data sources and the database field containing the name of the word document in the repeat region. The results return the name of the document but when I try to download the work document it gives an error.

Sign in to reply to this post

Jason ByrnesWebAssist

"but when I try to download the work document it gives an error."

what is the error?

I cant help without knowing what the error says. No way to troubleshoot an error by knowing only that is exists, I need to know what the error says.

Sign in to reply to this post

anonymous

Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.3

This is the error above.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...