Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 8th, 2004, 06:09 PM
Ops400 Ops400 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: San Diego, CALIFORNIA
Posts: 3 Ops400 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Ops400
VB and HTML buttons

Hello all, first time poster...was hoping someone could help me out.....basically I've been writing this VB program that will automatically log into a website and download/upload files. I've got the download part to work, but the upload is where I seem to be having a problem...I'm at the point where I can fill in the form with the path to the file I want to upload(i.e. "c:\test.txt") but what I want to do is automatically select the "Upload File" button(there's not going to be any user intervention to carry this out, there in lies the problem)...anyway, I've come to the conclusion that the web page isn't set up correctly...let me know what you think...
There's a button set up like this:
<input VALUE="Upload File" TYPE=SUBMIT>
which doesn't have a Name="blah" associated with it....on a different site I was able to instantiate the button using the buttons name...any idea's how to activate this button(without user intervention) and without using the Name?

Reply With Quote
  #2  
Old April 14th, 2004, 02:20 PM
Laoujin Laoujin is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 15 Laoujin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If you are using JavaScript, you can loop through all the objects in the forum until the value = "Upload File".

for (i=0 ; i < document.forms[0].length; i++)

To automatically submit a form
<BODY onLoad="FormName.submit();">
Probably that will be easier...

Reply With Quote
  #3  
Old April 19th, 2004, 11:41 AM
Ops400 Ops400 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: San Diego, CALIFORNIA
Posts: 3 Ops400 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Ops400
Hmmm..that's an interesting idea, and I am looking into using it. But I'm not sure it's going to work...I'm trying to do a "Post" from a VB6 program, and as far as I can tell, I need to reference that button...(also, the page doesn't have a specfic line stating the form name...who ever designed this page needs to work out some issues...but that's another story

Reply With Quote
  #4  
Old April 19th, 2004, 01:48 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 18 h 33 m 48 sec
Reputation Power: 180
Can you change to a FTP solution for uploading? It may be easier to implement.

There are security restrictions on file uploads via http that generally prevent you from programmatically selecting and uploading files without user intervention.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #5  
Old April 19th, 2004, 04:11 PM
Ops400 Ops400 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: San Diego, CALIFORNIA
Posts: 3 Ops400 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Ops400
I wish I could use FTP...it would make my life easier, but unfortunatly, I can't...

Reply With Quote
  #6  
Old June 16th, 2004, 06:09 PM
jgarrett4674 jgarrett4674 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 jgarrett4674 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Autosubmit help

You have access to all the elements of a form by the order they appear in the html document.

For Example

HTML CODE:

<Form>
<input type="text">
<input type="submit" value="Submit">
</Form>

VB6 Code:

m_oEXP.Document.Forms(0).element(0).Value = "c:\myfile.text"
m_oExp.Document.Forms(0).element(1).click

or

m_oEXP.Document.Forms(0).element(0).Value = "c:\myfile.text"
m_oExp.Document.Forms(0).submit

Hope this helps...-Jamie

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > VB and HTML buttons


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway