Submit form with iMacros - imacros

I know this might seem a lazy question, but I did not find a straight to the point answer yet.
When I type "submit form with imacros" on Google, nothing is clear to me.
And the official iMacros documentation talks about filling forms, but not about submitting them.
I saw that some examples use javascript:
URL GOTO=javascript:window.document.form.submit();
Other examples use CLICK with coordinates.
So, how do you submit forms with iMacros?

The most basic way to submit a form is via the submit button supplied at the page.
The easiest way to do so is to record clicking on it (FireFox iMacro addon -> Record tab -> Record , play with record options only if needed). The output will be saved under #Current.iim and will look like this:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=http://demo.imacros.net/Automate/TestForm1
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Automate/FormSubmitConfirm ATTR=TXT:Click<SP>to<SP>order<SP>now
iMacro will use attributes like html type, form action and the text on the button to identify it against others. Once recorded you can start messing around with attributes if you have additional needs.
Solutions like CLICK or javascript have a tendency to almost never work (for me personally) and are used in more extreme cases where the buttons change names/ids/locations in an unpredictable way.

If you want to press enter to submit then you can do this this works in CHROME imacros for me ..
EVENT TYPE=KEYPRESS SELECTOR="#react-root>SECTION>MAIN>DIV>DIV>ARTICLE>DIV:nth-of-type(2)>SECTION:nth-of-type(3)>FORM>TEXTAREA" CHAR="\r"

Related

URL link defined in a column, APEX 18.2 IG

I have an interactive grid where one of the columns is a url link to a picture.
Now I want some way to click on that link and open up that link.
Except the URL links in APEX demand a static link. Also, they open up over the open window, instead of another window or another tab.
I have gone through my options, googled for a couple hours, tried to perhaps find a solution that used a DA after clicking on the field and then a JS to redirect to the URL. But my google-fu is apparently not strong enough, and so I turn to you, good people of Stackoverflow.
What I want is a link inside an interactive grid which when clicked, redirects to a URL that it gets from a column in the IG.
Set you link column like this.
"ENAME" is a column.
Example: https://apex.oracle.com/pls/apex/f?p=150297:30:::NO:::

django - how to make clickable html text that sends data to model?

I want to display users around 10 clickable html "tags" (just text with some css that changes when clicked) on my form page. I want them to be able to select a maximum of 3 tags but no minimum requirement. I then want to take the sum of all clicks for each individual tag and do some calculations with them as a model method, like return the 3 most clicked tags.
It's important that my tags are on the form page and are submitted at the same time as the form. So I guess they have to be part of my form.
How would I go about doing this? An actual example would be tremendously helpful as I'm still very new to django and find the documentation (which I've looked at) somewhat hard to understand.
If you know the tags ahead of time, I'd recommend this setup:
Use a multiple select widget in your form (see the favorite_colors field in this Django widgets example)
Use Select2 or another JavaScript library that converts <select multiple> inputs into a tags-like UI
If you go that route, this widget from django-select2 looks like it should get you off to the races.

iMacros TAG CONTENT doesn't works

I want to put text into the input on the page, but it doesn't belong to any valid form. How I can do it?
I tried:
TAG SELECTOR='<selector>' CONTENT='<content>'
and
EVENT TYPE=KEYPRESS SELECTOR="selector" KEYS=[keycodes]
But it doesn't seem to work
First of all,
CSS Selectors are only available in EVENT command with imacros add-on for firefox. But one need iMacros pro v11 to use CSS Selectors in TAG command.
So why cant you just do this
First, use imacros plugin in firefox for this, then go to Record -> Record Options -> Enable Experimental Event Recording Mode.
Then click record button and click the input box where you want to paste, the selector for the input tag will be recorded like so.
EVENT TYPE=MOUSEDOWN SELECTOR="html>body>div:nth-of-type(2)>div:nth-of-type(2)>input" BUTTON=0
Now what you actually need is only the selector address, this will be the path of the input tag where you want to place your text. So next you will paste the selector from the previous step into the below code.
SET !CLIPBOARD "text that is going to be placed in the input tag"
EVENT TYPE=KEYPRESS SELECTOR="html>body>div:nth-of-type(2)>div:nth-of-type(2)>input" CHAR="v" MODIFIERS="ctrl"
So lets check the above code on what is going on.
Line1: We set the clipboard variable of imacros to whatever text you want to insert.
Line2: Then the event tag is going to select the input tag will the selector that we manually inserted, Then we trigger a Ctrl + v through Imacros and the text is gonna get pasted.
I hope my explanation was clear and consise and hope it helped with your issue.
References:
How to select all copy and paste in imacros
How to extract text using CSS Selectors
imacros selector discussion

save disabled on sitecore page editor

I'm been working with Sitecore for a while, but this is my first time on the page editor.
So, I go to my sublayout and I place a sitecore tag instead a .net tag
<sc:Text ID="txtContent" Field="Content" runat="server"/>
Content is the normal content field on the sitecore page.
When I go to the page editor, I'm able to see the correct content and do some editing but the save button is disabled and my changes are not saved at all
I'm I missing something very basic here?
this is a screen cast on what I'm doing
http://screencast.com/t/0itqgjGVQx8
Update: After including jquery.noconflict constructs, the execution moves to the handler function in the ribbon correctly. BUT it seems that the button itself is disabled. Is it possible to enable/disable the button? is it disable on specific situations? if so how can I enable it.
There might be invalid html appearing. Check you hints for buttons, etc. There might be non-escaped texts on the page.
I've resolve this some time ago... in the sublayout definition on sitecore there was a redundant/wrong compatible rendering definition. Once I removed that, the save button appeared and the sublayout started to work as expected

Adding buttons for HTML elements to the Sitecore rich text editor

I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.