2016년 11월 18일 금요일

After Filling out a fields on a webpage... Is it possible to press Submit button


Reference this topic:   
How to automatically fill fields in a web page's form (when loaded in a webview)

Located here:

WOW!!! Taifun, You are awesome!!!!!!  I've been trying to do something like this for a long time but I was not even close.  This will also work for logging in to websites.  You can fill your LoginID and Password to the website using AppInventor.

Now I have a question....

Is it possible to press the Submit button for the form with a Button ID = "Submit"

I can do it if I place the script below in the form part of HTML, but I don't know how with AppInventor.  Is there a way to add this text (or similar) to the solution you have above.  

I would like to fill the form with the solution above and then press the submit button to AutoLogin to the website

Thanks 

<script type="text/javascript"> document.getElementById("Submit").click(); 
</script>

-- 
thank you, I'm glad that you like it...
well, somehow I already was waiting for that question...

-- 
You are Freaking AWESOME!!!

I don't know how you figure this out.

I hope you have time for one more question... :)

Once I'm logged in I would like to fill another form and press another Button, "Find".

The problem is the "Find" button doesn't have an ID...
Is there a way to run the "javascript:findCodes(); in the following text?

I'm able to fill the text input field "Location" but I don't know how to press the "Find" button.

<input type="text" id="Location"/>
<input type="button" value="Find" onclick="javascript:findCodes();" />


Thanks again for all of your help!!!

-- 
I hope you have time for one more question

well, I guess probably I will find some time next year to look at this...
but probably there is an JavaScript expert around, who can answer this...

Taifun

-- 

Thanks Taifun,  No need to worry about next year ,YET!   :)

Well I got lucky!!!

I was able to get a solution for my problem.

I was trying to figure out how to click this button without an ID.


<input type="text" id="Location"/>
<input type="button" value="Find" onclick="javascript:findCodes();" />



Instead I thought about not pushing the button but calling the function that the Button was calling on click...

Earlier in the HTML code I have this...  function findCodes()

I was able to call the Function with this...



Hope others may be able to use....


-- 
great! thank you for letting us know!
the simple solutions are the best! 

Taifun


-- 

댓글 없음:

댓글 쓰기