Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


objFile.Write

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> objFile.Write
  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 >>
 objFile.Write - 8/30/2007 2:50:36 PM   
  Tin

 

Posts: 15
Score: 0
Joined: 8/30/2007
Status: offline
I am trying to continue that statement with a str value from a drop down selection.


<select name="Month" id="Month">
       <option selected>j</option>
       <option>f</option>
       <option>m</option>
   </select>

help pls.
thanks
tin

_____________________________

http://www.overthrowicbc.com
 
 
Post #: 1
 
 RE: objFile.Write - 8/30/2007 3:23:17 PM   
  TNO


Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I'm not sure what you're asking for exactly...

can you explain more?

http://www.w3schools.com/tags/tag_select.asp

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to Tin)
 
 
Post #: 2
 
 RE: objFile.Write - 8/31/2007 5:54:59 AM   
  Tin

 

Posts: 15
Score: 0
Joined: 8/30/2007
Status: offline
Thanks for your response,
hope this clarifies things

I am trying to write a str to a text file which I am able to do by defining a text field as a string:
(this is not entire code)

Sub SaveText
strText = Month.Value
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFileName = "C:/Documents and Settings/" & SaveName.Value
Set objFile = objFSO.CreateTextFile(strFileName)
objFile.Write strText
objFile.Close
End Sub

so if strText gets it's value from a text field I can write it to a text file.
But I cannot figure out how strText can get it's value from a selection in a drop down menu, and then write that value to the text file.

this is the code for the form for the text area field and it works fine.
<textarea name="Month" rows=5 cols=70></textarea>
Enter File Name For Note: <input type="text" name="SaveName" value="*.txt">
<input id=runbutton type="button" value="Save" name="run_button" onClick="SaveText">

thanks,
Tin

(in reply to TNO)
 
 
Post #: 3
 
 RE: objFile.Write - 8/31/2007 6:13:29 AM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi Tin,

this .hta:


      

shows, how to get at the index, the value, and the text of an selected item
of a select element.

Good luck!

ehvbs

(in reply to Tin)
 
 
Post #: 4
 
 RE: objFile.Write - 8/31/2007 10:32:53 AM   
  Tin

 

Posts: 15
Score: 0
Joined: 8/30/2007
Status: offline
Thanks very much for your help ehvbs.
I will try that, I think it's a little over my head, but just as well, I would like to learn it.
Thanks again, Tin

(in reply to ehvbs)
 
 
Post #: 5
 
 
 
  

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 >> objFile.Write 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