Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

another webbrowser question

Posted on 2001-06-03
10
Medium Priority
?
188 Views
Last Modified: 2012-06-22
I hope someone out there is as twisted as me.

I know the webbrowser control pretty well. or so I thought until now.

<html>
<body>
<INPUT name=PICTURE1_SOURCE size=50 type=file accept="image/jpeg,image/jpg">
</body>
</html>

how do I programtically(from VB) set the value of this box. No .value does not work.
0
Comment
Question by:brookman
[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
  • 3
  • 2
10 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6151438
Hi, create a html editor?
0
 
LVL 2

Author Comment

by:brookman
ID: 6151440
I have written an application in VB to fill in a web page and submit it.  I can't figure out this file object
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6152248
the file type of the input object does not allow for you to set a default value for security reasons.  you cant set this even if you wrote the html yourself.  you can mimic this behavior with an IE only solution (at least i only ever got it working in IE).  i can post if you are interested, but it is a workaround in which you actually hide the file input object and show a regular text and button object in its place.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:brookman
ID: 6152661
I would like that.  I have tried extensive coding to take apart the html and input the value= string but it gets rid of it.

Let me see what you have.

I tried modifying the html code to change it to a text box instead of a file box to no avail.
0
 
LVL 2

Author Comment

by:brookman
ID: 6152717
Is there a way to do a setfocus of an object in the html document?
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6152729
Sure!
0
 
LVL 2

Author Comment

by:brookman
ID: 6152783
can you be a little more descriptive - I tried the obvious.
web1.document.all("PICTURE1_SOURCE").setfocus does not work.
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 800 total points
ID: 6153166
just try:

web1.document.all("PICTURE1_SOURCE").focus
0
 
LVL 2

Author Comment

by:brookman
ID: 6153203
why the hell can't they stick with a standard - what happened to setfocus? By the way that does it.  I can focus and sendkeys!!!!!Thanks
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6153214
just if youre interested, here is the html (IE only)


<html>
<script language="javascript">
  function getFile() {
      document.frm.fileChoose.click();
      document.frm.txtFile.value = document.frm.fileChoose.value;
  }
</script>

<body>
<form name="frm">
  <input type="text" name="txtFile" size="25" value="">
  <input type="button" value="Choose a File" onclick="getFile()">
  <layer>
      <input type="file" name="fileChoose" style="visibility:hidden"><br>
  </layer>
</form>
</body>
</html>
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

618 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