Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Linking Problem in VB Script

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,65409
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Linking Problem in VB Script
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Linking Problem in VB Script - 10/22/2008 4:26:01 AM   
  gene45

 

Posts: 1
Score: 0
Joined: 10/22/2008
Status: offline
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.
                                                                 
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Linking Problem in VB Script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts