?
Solved

Browse to Hyperlink

Posted on 2005-03-28
15
Medium Priority
?
332 Views
Last Modified: 2010-04-03
Hi All,

I tried to do this in Frontpage but have now migrated my site to Dreamweaver.  I am building a quotation tracking system.  The users input details like quote date, customer etc and input it onto the database (access) via a dreamweaver front end.  I have a Coldfusion server running also.  The users also type up a formal quote in Microsoft Word and save it on the Shared Drive.

I would like them to link their quote to the Word Document on the share drive using a hyperlink.  I.e "please browse to your file" - it will then add it as a hyperlink to the quote record so when another user views the quote, they can click the hyperlink to view the actual Word quote.  I see a "file upload" option in Dreamweaver that seems ideal, except I do not want to store the file, only the hyperlink.  Hope you can help.

Stuart
0
Comment
Question by:sr_millar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
15 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 13647458
I take it this is your own server.  Is it IIS or Apache?
0
 
LVL 7

Author Comment

by:sr_millar
ID: 13650264
Hi,

Yes, it is my own server.  Windows 2000 IIS with Coldfusion installed.

Thanks,

Stuart
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13650316
If this were an intranet website, you could simply link to the shared file location (ie. \\machinename\sharename\filename.doc because that location would be common to all network users.  I suspect that isn't the case, though.

If you want the file to be available on the internet, you need to create a link that will be accessible to internet users.  To do this, you can create a virtual directory (called 'documents' for the sake of this example) in your website that points to the share location of the Word file.  Then you will be able to link to your document as www.domain.com/documents/filename.doc.  For this to work, you have to make sure that you either configure an anonymous access account that has proper NTFS permissions on the machine where the share is located or, if access needs to be controlled, configure one of the IIS authentication methods.
0
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
LVL 7

Author Comment

by:sr_millar
ID: 13650339
Hi,

Sorry, perhaps my initial post was not clear - this is an intranet site.  I know I can link myself to a file, but I want the users to be able to enter all the data relevent to the quote, then hyperlink (using some kind of browsing button) to their word document on the share drive.  Obvioulsy I could have them enter the full UNC path, but it would be better if they could browse to the file, click OK and it put the hyperlink in for them.

All quote files will be held in the same directory.

Hope this helps.

Stuart
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13650362
Do you mean that you would like them to be able to input their data into a form and when they submit it, a Word file quotation is automatically generated based on that data?
0
 
LVL 7

Author Comment

by:sr_millar
ID: 13650425
I would like them to input their data into a form (which I have already).  I also have a access database with a table and in that table is all the records including a field called hyperlink.  When the users input their data using the form I want them to be able to browse to an existing Word file on a network share, click ok and it add the hyperlink into the field for that specific file.

I hope I am making that clear....
0
 
LVL 19

Expert Comment

by:webwoman
ID: 13653254
If all the documents are on the SAME share, and it's accesible from the web server AND you set it up as a virtual directory, you can have them input the file name only and create the link dynamically. You are NOT going to be able to grab the file name directly -- they WILL have to input it. They can copy/paste the file name, but they're going to have to use the file extension, or you're going to have to add that as well as the virtual directory part of the hyperlink.

If you're lucky, they'll get the file name correct and it will work. ;-)

But you absolutely have to set up the virtual directory in IIS.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 13654237
I agree.  I don't think you will be able to accomplish everything you want to, but this way you can come close.
0
 
LVL 7

Author Comment

by:sr_millar
ID: 13661756
Hi,

I am thinking there is another way to do this.  Can I somehow setup a form where I browse to the file and when posted it posts the contents of the browse box to another text box, which can then be inputted into my Database?

All I need to capture here is the path to the file:

s:\quotes\2005\quote12345.doc

and save it in a field in my database as a hyperlink.

Many thanks,

Stuart
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 1000 total points
ID: 13662710
"All I need to capture here is the path to the file:
s:\quotes\2005\quote12345.doc "

Unfortunately, that's the tricky part that needs to be done manually.
0
 

Expert Comment

by:ahillman
ID: 13700783
In your form - you can use cffile upload from coldfusion to your db - on the action page for your form you can have the name of the uploaded file renamed to an identifier.  Then I am assuming you have a viewing page that people go to to find the quotes etc.  Here you can have the information hyperlinked.

Example:
I have an announcements area that I like people to attach files.  In the form they submit I have an Attach a File area - here is where they browse to find the word doc or what ever they want to attach.  Then when people go to view the announcement I have a hyperlink that is automatically placed with the announcement which opens up the attachment.

Is this what you are looking for?
0
 
LVL 7

Author Comment

by:sr_millar
ID: 13704710
Hi,

Yes that is close to what I am looking for.  At the moment all our people save quotes (in Word format) in a shared folder.  This is mapped as s:\quotes on all their machines.  These are formal quotes which are printed off and sent to customers.

We then have this database (access db) on a Windows 2000 server with Coldfusion (written in Dreamweaver) which "summarises" all the information in the formal quote.  This lets our MD see who we have quoted to and which we have lost etc.  I need a way for the person entering the data into the database to create a hyperlink to the formal quote they have created in s:\quotes.  This way they can just look at the summary and also have the option to open the Word doc by clicking the provided link.

Some of the quotes are filed by customer i.e. s:\quotes\2005\customerA.  I was looking for a way for the user to enter that hyperlink by browsing to the file, rather than having to type it in as that is prone to mistakes.

Perhaps it would be better to store the Word files within the Access DB?  If so that would mean regular users could not access the quotes on the shared drive unfortunately.

Your example sounds close to what I want though.

Any thoughts?

Thanks,

Stuart
0
 

Assisted Solution

by:ahillman
ahillman earned 1000 total points
ID: 13706439
Well I am not an access person I use SQL 2000.  Here is the code, thanks to another experts-exchange user, that I modified a bit to fit my needs.  You will need to change it up as well to work with access.

<!--- check to make sure you got the information --->
<cfif isdefined("FORM.updated")>

<cftransaction>
<cflock timeout="10" throwontimeout="No" type="EXCLUSIVE">
<!--- insert information in news events (or whatever table you have in access) --->
<cfquery name="insertRecord" (you can name the query whatever you wish but it needs a name) datasource="#datasource#">
INSERT INTO NewsItems(Title, Description, DatePosted, DisplayLength, username, Show)
VALUES (<cfqueryparam value="#FORM.subject#" cfsqltype="CF_SQL_CHAR">,
            <cfqueryparam value="#FORM.desc#" cfsqltype="CF_SQL_LONGVARCHAR">,
            <cfqueryparam value="#DateFormat(FORM.start, 'MM/DD/YYYY')#" cfsqltype="CF_SQL_DATE">,
            <cfqueryparam value="#DateFormat(FORM.end, 'MM/DD/YYYY')#" cfsqltype="CF_SQL_DATE">,
            '#session.auth.username#', 1)
             Select @@identity as newID (This is a SQL thing - I don't know what access uses - but basically you are grabbing the newly created ID for this particular update)
</cfquery>
<!--- the txtUpload is the name of the cffile upload portion of the form - it is represented in code further down --->
<cfif (isDefined("FORM.txtUpload")) AND (FORM.txtupload NEQ "")>
<cffile action="UPLOAD" filefield="txtUpload"
      destination="D:\CFfulton\newsFiles"  <!--- This is where you are defining where to upload the file on your server - I am assuming this is where you would have the s:\quotes\2005\ --->
      nameconflict="MAKEUNIQUE">
<!--- the following grabs the query unique id that was just created plus the extension of the document ie .doc, then converts the name of the document to the unique id - you want to do this incase people have named their documents the same - then it sets the filename to the newname and places it with the appropriate "announcement" in this case. --->
            <cfset oldname = cffile.serverfile>
            <cfset oldext = cffile.serverfileext>
                  <cfset newname = #insertRecord.newID# & "." & #oldext#>

         
            <cffile action="rename" source="D:\CFfulton\newsFiles\#oldname#"
                                    destination="D:\CFfulton\newsFiles\#newname#">

           <cfquery name="addName" datasource="#datasource#">
            Update NewsItems
            Set Filename=<cfqueryparam cfsqltype="cf_sql_varchar" value="#newname#">
            Where newsID = #insertRecord.newID#
            </cfquery>

            </cfif>
</cflock>
</cftransaction>


Here is the simple form:

<cfform name="form1" method="post" enctype="multipart/form-data" action="#CGI.SCRIPT_NAME#">
<input type="hidden" name="updated" value="yes">
<!--- Here is where I start the table then place the cffile information --->
                                 <tr>
              <td align="right">Attach a File:</td>
              <td><input type="File"
                  name="txtUpload"
                  size="40"></td>
              </tr>

Again you will need to make modifications - but this is what I use to get the job done.  I am by no means an expert and I  also welcome any other suggestions.
-A
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question