This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Problem with Dynamic File element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem with Dynamic File element" Watch "Problem with Dynamic File element" New topic
Author

Problem with Dynamic File element

S Subbu
Ranch Hand

Joined: Mar 20, 2012
Posts: 87

Hi all,

I have a Problem with dynamically creating file element using javascript , My Code is





When i click on Upload Button ,My Form did not submitted instead that clears the value in the browse text field.

Please execute above code and clear my Problem.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Of course it doesn't submit. Your form has no action to submit to.


GenRocket - Experts at Building Test Data
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
or method.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

or enctype


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
S Subbu
Ranch Hand

Joined: Mar 20, 2012
Posts: 87


With them also i am getting same problem. Please execute this code and observe what happends.

i think this is because i am calling

inputElement.click();

dynamically instead of click on browse.

Please Help Me.


 
Don't get me started about those stupid light bulbs.
 
subject: Problem with Dynamic File element