jamesjames Posted May 7, 2010 Share Posted May 7, 2010 I am trying to make my own script using my little knowledge of what I used to know in Visual Basic and reading / copying tutorials. Basically, I need to put in some text to an element in a form but the form does not have a name. The form does not have a NAME assigned to it. Is there a different way to call to the form instead of using the form name? The only piece I see about the form name looks like this: <form method="post" action="/index.php?nid=640" enctype="multipart/form-data" /> <input type="hidden" name="nid" value="640" /> <input type="hidden" name="sid" value="4516794" /> <input type="hidden" name="fid" value="966750" /> <div class="gBox"> <img src="/resources/form/graphics/bTop.gif" border="0" style="margin: 0px; padding: 0px; width: 620px; height: 7px;" /><br /> <div id=""> <div class="gTitle"></div> <div id="" class="gBody"> <div class="element"> <div style="font-size: 12px; color: #911;"> Link to comment Share on other sites More sharing options...
exodius Posted May 7, 2010 Share Posted May 7, 2010 I am trying to make my own script using my little knowledge of what I used to know in Visual Basic and reading / copying tutorials. Basically, I need to put in some text to an element in a form but the form does not have a name. The form does not have a NAME assigned to it. Is there a different way to call to the form instead of using the form name? The only piece I see about the form name looks like this:Welcome to the forums!If you're trying to automate Internet Explorer, I'd first and foremost go install DebugBar - your life will be a lot easier.As for your question, you've got two options:You could use _IEFormGetCollection to specify which form you want to reference (this way does leave potential for trouble if they add a form before the one you reference since you reference it by it's 0-based index on the page)OrEven though the Form doesn't have a name, just use _IEGetObjByName for the individual controls on the form (you don't have to reference the form first) then use the _IEFormElement* functions to modify them. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now