tmh766 Posted February 11, 2007 Share Posted February 11, 2007 Is there a way to automatically call an html form submit? For example, instead of clicking a submit button on a web page can you create a link that goes to where the submit button links to? Quote Link to comment Share on other sites More sharing options...
linuxdream Posted February 11, 2007 Share Posted February 11, 2007 You can use JavaScript. Something like: form.submit Google "javascript form submit" Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 I dont understand the syntax on how to do that. What would be the link to "simulate the clicking" of a submit button in a form on the page, for example "page.html". I hope I am explaining this clear enough. So basically instead of going to a seperate page and clicking submit on a form, I want to directly link to the seperate page's form's submit button. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 You're saying you have two pages, one with a link and one with a form. You click on the link in the first, and it automatically submits the second? Why not just combine into one page. You'd need to do the javascript on the second page anyway, so I don't see how having two pages makes sense. Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 Yes, I am trying to make the link in the first page simulate the clicking of the submit button in the form on the second. The reason I cant make it in to one page, is because the second page is not mine. Basically I am trying to bypass a confirm page because its not needed. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 What is the action of the form? You could just direct the link to the action page of that, using a hidden form to post. Are you trying to hax0r Neopets? You are, you little rascal. Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 Lolol, no but i do love neo pets, that can be next week . I am trying to bypass the confirm add friend page on myspace. The only way to do this would be to simulate the clicking of the confirm button. Any ideas on how it is possible to automatically simulate this? Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 My orig idea was to use php to search for the confirm friend link and the hash code and put them together then redirect to that page but I dont know what the final link including the hash code should look like. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 When you're on the page where the confirm pops up, right click and view the source. find the action="" part of the form. Then find all the values in the form, the inputs, any hidden, etc. Then you make a similar form and make your action go there. Basically copy the form, minus the javascript confirm. Then we can go from there. Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 Here is the forms structure without the real links. <form name="addFriend" action="myspacelink" method="post" > <input type="hidden" name="hashcode" value="longhashvalue"> <input type="hidden" name="friendID" value="theirfriendid"> <input type="submit" value="Add to Friends"> <input type="button" value="Cancel" onclick="window.history.back()"> Here is the forms structure with the real links from a random user. <form name="addFriend" action="http://collect.myspace.com/index.cfm?fuseaction=invite.addFriendsProcess&Mytoken=909A2E2B-88B4-4E7D-8B2DA5A777A432F798631754" method="post" > <input type="hidden" name="hashcode" value="MIGVBgorBgEEAYI3WAOqoIGGMIGDBgorBgEEAYI3WAMBoHUwcwIDAgABAgJmAwICAMAECBvhIvr2wAuDBBAEjamhOiQZAiychlc+uNoYBEhFSu9EUbxzt7M9asVllXEX1SA6DQWcdHU/6lsjk8t3obM7jLhpO/icyWWiykS4RBBCnYUVL1j611S132EYCI5NFtJvfcYxBis="> <input type="hidden" name="friendID" value="156840420"> <input type="submit" value="Add to Friends"> <input type="button" value="Cancel" onclick="window.history.back()"> Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 So you'd need to know all the info to fill in those forms. Quote Link to comment Share on other sites More sharing options...
tmh766 Posted February 11, 2007 Author Share Posted February 11, 2007 so theres no way to automate the clicking of the submit button? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 Not as far as I know, as you don't have control over the page. What you're trying to do is likely against the TOS of MySpace anyway, so I've helped as much as I am willing to with this. Have fun. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.