G'day All,
I'm new to Bookmarklets but have been able to get radio buttons, checkboxes, text fields and form submission working on a number of sites.
However I've hit a brick wall with the Optus (Australian telecommunications provider) service status website (https://www.optus.com.au/living-network/service-status) where you can put in a location, such as 'Terrigal NSW' and it will show the service status at that location.
I can see from the inspector that the field is: <input id="sbuzz_search_input" placeholder="Search for a street address here..." type="text" class="MuiInputBase-input-300 jss286" value="">.
I would like to use a bookmarklet to populate the location and submit the page.
Some of my attempts have been as follows. The last two are trying to fill every text field when I couldn't get anything else to work.
javascript: document.getElementByID('sbuzz_search_input').value = 'Terrigal NSW';
javascript: document.forms[1].elements[0].value='Terrigal NSW'; [various iterations of this]
javascript:(function(s){for(var n=document.getElementsByTagName('input'), L=n.length; L--; n[L].type.toLowerCase()==='text' && (n[L].value=s));})('Terrigal NSW');
javascript:(function(s){for(var n=document.querySelectorAll('input[type=text]'), L=n.length; L--; n[L].value=s);})('Terrigal NSW');
I can't get it working and am hoping someone can show me how to do it.
Thanks