attempting to create a drop-down menu the place the gadgets are the youngsters pages of a given father or mother web page.
The record has an autosubmit script.
I might like so as to add some css rule however unable to take action.
Furthermore, I see the next warning showing briefly everytime I do edit the web page the place I check the code:
Can’t modify header data – headers already despatched by (output began at /and many others and many others)
Many thanks prematurely
Here is the code, not mine actually: supply
perform dropdownbox_autosubmit() {
wp_dropdown_pages(array('child_of' => 42,'show_option_none=Choose Web page')); ?>
<script kind="textual content/javascript">
var pageDropdown = doc.getElementById("page_id");
pageDropdown.onchange = onPageSelect;
perform onPageSelect() {
if ( pageDropdown.choices[pageDropdown.selectedIndex].worth > 0 ) {
location.href = "<?php echo get_option('house');?>/put up.php?page_id="+pageDropdown.choices[pageDropdown.selectedIndex].worth;
}
}
</script>
<?php
}
add_shortcode( 'call_dropdownbox_autosubmit', 'dropdownbox_autosubmit' );