Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 22nd, 2008, 12:06 PM
Authorized User
 
Join Date: Oct 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to figure out how to work a link issue

Hi,
   I am new to this forum and i am new to VB Script. I would certainly like some help in dealing with a linking code issue I have in VB Script.

I am trying to make a program that adds forms/documents to an intranet site. My idea of how i have been trying to code it is as follows.

I have two textboxes and I am using activeX to write my code.
I am using VB Script.

The first textbox should hold a form's/document name entered by a user.
The second textbox should hold the directory to where the form is located on the local disk/drive
I also have a button named "add"





The Problem is this:


1. I am trying to make a link. This link will be made when a user enters text into the first textbox.(Using the text entered by the user as the link name)

2. This link will now show up in a new page under a sub heading for example: Genres, Document type, Book type or something of that nature


3. When the link is clicked it should open up a document of any sort. But this will only happen as long as the user has put in the location of the document in the second
         textbox.

4. I have chosen to make a folder on the C: drive. This folder will hold all the documents or forms that the users will be adding to the site (should they need to add a
document or form)
5. But i would like to program the second text box to reference only the C: drive.
                  for an example
                  the way the user would enter the directory path to the document would be typically;
                            "C:\Documents and Settings\All Users\Document_Name"
6. Instead of "C:\Documents and Settings\All Users\Document_Name" I wanted it to be this "\All Users\Document_Name"

7. I don't really know how to program the second texbox to accept only this "\All Users\Document_Name"

      All this would be processed when the user clicks the "Add" button.

8. Then on the click of the "add" button it should direct the user to the web page with the new link being what they entered in the first textbox.

9. I would like to group it into headings according to the information the document may contain.

The code i have so far is below:

<HTML>
<HEAD>
<TITLE>Information</TITLE>

</HEAD>
<BODY>


<FIELDSET>

Form Name: <br>
    <INPUT TYPE="TEXT" NAME="TxtFormname">
<br>
Location: <br>
    <INPUT TYPE="TEXT" NAME="TxtFormdirectory">
<br>
   <INPUT TYPE="SUBMIT" VALUE="Add" NAME="Btn1">

</FIELDSET>


 <SCRIPT LANGUAGE="VBScript">
<!--
Sub Btn1_OnClick

If TxtFormname.Value = " " Or TxtFormdirectory.Value = " " Then

Dim Message


Message = "Form Name Or Location Of Document Required"

MsgBox(Message)

End If
End Sub
-->
    </SCRIPT>
</BODY>
</HTML>

Any help would be appreciated. Thank you all in advance.


Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visited link Issue mat41 CSS Cascading Style Sheets 10 May 14th, 2008 07:42 PM
How does Update Link in FormView work? URGENT shaly ASP.NET 2.0 Professional 0 December 7th, 2006 04:10 PM
Link Button does not work properly nitinp ASP.NET 2.0 Basics 0 November 9th, 2006 06:02 AM
File Link Won't Work Ron Howerton ASP.NET 1.0 and 1.1 Basics 13 November 3rd, 2006 12:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.