seadynamic8 1 Posted May 28, 2010 Report Share Posted May 28, 2010 I'm having trouble trying to save certain fields in a form. It has checkboxes inside a form, which I can select and set into the right position with Ubot, but when I click the submit button (Save >>), it doesn't save the values. I think Ubot correctly clicks the button because, the form posts to a html anchor link, which just gets redirected back to same spot on the page. But that really doesn't do anything to save the values. There is some hidden inputs which might be working somehow in the background to save the values which Ubot might not be picking up on. I'm not very good with HTML and Javascript, so that could be the problem. Heres the form code:<a name="rejectpages"></a> <p>Do not cache the following page types. See the <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a> documentation for a complete discussion on each type.</p> <form name="wp_edit_rejected_pages" action="#rejectpages" method="post"> <input type="hidden" name="wp_edit_rejected_pages" value="1" /> <label><input type="checkbox" value="1" name="wp_cache_pages[single]" /> Single Posts (is_single)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[pages]" /> Pages (is_page)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[frontpage]" /> Front Page (is_front_page)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[home]" /> Home (is_home)</label><br /><label><input type="checkbox" value="1" name="wp_cache_pages[archives]" /> Archives (is_archive)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[tag]" /> Tags (is_tag)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[category]" /> Category (is_category)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[feed]" /> Feeds (is_feed)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[search]" /> Search Pages (is_search)</label><br /> <div class="submit"><input type="submit" value="Save »" /></div> <input type="hidden" id="_wpnonce" name="_wpnonce" value="cab68a80f4" /> <input type="hidden" name="_wp_http_referer" value="/wp-admin/options-general.php?page=wpsupercache" /> </form> By the way, the submit button is labeled "Save >>", but I think Ubot correctly picks up on this. This is a Wordpress plugin called WP Super Cache, which if you have it installed, maybe able to help me. Theres no direct link to the page. Any ideas how to save the checkbox values? Thanks. Quote Link to post Share on other sites
The_Brit 13 Posted May 28, 2010 Report Share Posted May 28, 2010 I'm having trouble trying to save certain fields in a form. It has checkboxes inside a form, which I can select and set into the right position with Ubot, but when I click the submit button (Save >>), it doesn't save the values. I think Ubot correctly clicks the button because, the form posts to a html anchor link, which just gets redirected back to same spot on the page. But that really doesn't do anything to save the values. There is some hidden inputs which might be working somehow in the background to save the values which Ubot might not be picking up on. I'm not very good with HTML and Javascript, so that could be the problem. Heres the form code:<a name="rejectpages"></a> <p>Do not cache the following page types. See the <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a> documentation for a complete discussion on each type.</p> <form name="wp_edit_rejected_pages" action="#rejectpages" method="post"> <input type="hidden" name="wp_edit_rejected_pages" value="1" /> <label><input type="checkbox" value="1" name="wp_cache_pages[single]" /> Single Posts (is_single)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[pages]" /> Pages (is_page)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[frontpage]" /> Front Page (is_front_page)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[home]" /> Home (is_home)</label><br /><label><input type="checkbox" value="1" name="wp_cache_pages[archives]" /> Archives (is_archive)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[tag]" /> Tags (is_tag)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[category]" /> Category (is_category)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[feed]" /> Feeds (is_feed)</label><br /> <label><input type="checkbox" value="1" name="wp_cache_pages[search]" /> Search Pages (is_search)</label><br /> <div class="submit"><input type="submit" value="Save »" /></div> <input type="hidden" id="_wpnonce" name="_wpnonce" value="cab68a80f4" /> <input type="hidden" name="_wp_http_referer" value="/wp-admin/options-general.php?page=wpsupercache" /> </form> By the way, the submit button is labeled "Save >>", but I think Ubot correctly picks up on this. This is a Wordpress plugin called WP Super Cache, which if you have it installed, maybe able to help me. Theres no direct link to the page. Any ideas how to save the checkbox values? Thanks.nDo you have a URL to another blog that uses WP Super cache to look at instead? Dave Quote Link to post Share on other sites
seadynamic8 1 Posted May 28, 2010 Author Report Share Posted May 28, 2010 nDo you have a URL to another blog that uses WP Super cache to look at instead? Dave I can PM you or anyone else a sample Wordpress blog I just setup with the plugin installed if you want. Quote Link to post Share on other sites
The_Brit 13 Posted May 28, 2010 Report Share Posted May 28, 2010 I can PM you or anyone else a sample Wordpress blog I just setup with the plugin installed if you want.That would be perfect. Quote Link to post Share on other sites
seadynamic8 1 Posted May 28, 2010 Author Report Share Posted May 28, 2010 That would be perfect. I emailed you, I can't seem to private message you. Quote Link to post Share on other sites
The_Brit 13 Posted May 29, 2010 Report Share Posted May 29, 2010 I emailed you, I can't seem to private message you. Here you go. I did it for 3 of the checkboxes so you should be able to do the others if you need to. Dave Quote Link to post Share on other sites
The_Brit 13 Posted May 29, 2010 Report Share Posted May 29, 2010 Sorry forgot the bot BoxClicker.ubot Quote Link to post Share on other sites
seadynamic8 1 Posted May 29, 2010 Author Report Share Posted May 29, 2010 I've tried the bot, but it doesn't save the values. When you do a refresh on the page, the values disappear. I have the same problem. I'll upload my bot, but it essentially does the same thing.temp.ubot I could use navigate instead of clicking the button, but it still doesn't save the values, i.e. input into the database as stored values. Quote Link to post Share on other sites
The_Brit 13 Posted May 29, 2010 Report Share Posted May 29, 2010 I've tried the bot, but it doesn't save the values. When you do a refresh on the page, the values disappear. I have the same problem. I'll upload my bot, but it essentially does the same thing.temp.ubot I could use navigate instead of clicking the button, but it still doesn't save the values, i.e. input into the database as stored values. Thats very strange as one of the things I did was to refresh the page about 6 or so times to make sure they stuck. I'll take another look. Quote Link to post Share on other sites
The_Brit 13 Posted May 29, 2010 Report Share Posted May 29, 2010 I've tried the bot, but it doesn't save the values. When you do a refresh on the page, the values disappear. I have the same problem. I'll upload my bot, but it essentially does the same thing.temp.ubot I could use navigate instead of clicking the button, but it still doesn't save the values, i.e. input into the database as stored values. Try this version. BoxClicker.ubot 1 Quote Link to post Share on other sites
seadynamic8 1 Posted May 29, 2010 Author Report Share Posted May 29, 2010 Try this version. BoxClicker.ubot Thanks so much. It finally works. So all I needed was this line of javascript code:document.wp_edit_rejected_pages.submit(); Guess I should go learn javascript. Thanks again. Quote Link to post Share on other sites
The_Brit 13 Posted May 29, 2010 Report Share Posted May 29, 2010 Thanks so much. It finally works. So all I needed was this line of javascript code:document.wp_edit_rejected_pages.submit(); Guess I should go learn javascript. Thanks again. You're welcome. It can be tricky sometimes as you have to find the correct "Form" to submit. So, for the other sections of the page the part after document. would change. Dave Quote Link to post Share on other sites
seadynamic8 1 Posted May 29, 2010 Author Report Share Posted May 29, 2010 You're welcome. It can be tricky sometimes as you have to find the correct "Form" to submit. So, for the other sections of the page the part after document. would change. Dave Yea, this one was really tricky. I really like your javascript code. I might have to rewrite a significant portion of my bot to use javascript, its so much cleaner and less selecting and clicking. My bot is getting kinda large and bloated now, I'm using about 700MB of RAM too, good thing this is just for personal use. Maybe I should go back to just straight programming, but I have no idea how to do most of the things Ubot does in the browser, I guess its mostly Javascript. I really got to learn some Javascript. Quote Link to post Share on other sites
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.