Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by dsonesuk

  1. Code for a box in a post

    Not quite sure what 'box in post' really refers to, or even what plugins relate to either? plugins for what?
  2. Problem with my website form

    On the dropdown the name attribute value is applied to the select element only, NOT! the options. The $_POST['nnn'] key or index name represented by 'nnn' must match the value of the name attribute. <select class="form-control" name="Gender"> and $_POST['gender'] are treated as different. ALL form inputs, input select, textarea, radio, checkboxes must have a name attribute and value to be retrieved by $_POST[''].
  3. Dififcult to Find Element in Inspector - It Disappears

    YES! THE OPTION ELEMENTS LISTING DISAPPEARS, BUT! BEING PART OF THE VISIBLE ELEMENT IE FOR INSTANCE THE SELECT ELEMENT (ABOVE THE CIRCLED DROPDOWN) WITH TEXT ‘LENGTH' YOU CAN! ACCESS! THE! DROPDOWN! THROUGH! THAT! THEN BY EDITING HOW I HAVE MENTIONED SEVERAL TIMES NOW! YOU WILL SEE THE OPTIONS LISTING, AND BE ABLE TO USE THE INSPECTOR ON IT! If you can't find 'Edit' or 'DOM', I suggest you get a decent web development tools that provide this functionality or maybe look for tutorial on how to use web development tools in browsers. https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_HTML https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_HTML#Editing_HTML https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_HTML#Attribute/Add Attribute https://developer.mozilla.org/en-US/docs/Tools/DOM_Property_Viewer inspect select element->right click->Edit html (to edit select) OR Attributes -> Add Attribute -> enter size="5" in both cases PRESS ENTER, the dropdown list will, but considering the options list is within the select element, and the border around the options list IS the select element border itself its a bit pointless!
  4. Google Dropdown Border

  5. Google Dropdown Border

    Like I said the select dropdown and the dropdown list ((option elements) - which is much more clearer) are the same, you can't have one without the other, to say the ELEMENT disappears, means to me the whole select + option listing disappeared which don't make sense! So , the select element we have established that is visible with value 'length', has to be inspected, then you should have an option to 'Edit', click that! edit the select element so it has an attribute of size="5", click 'Edit' again to exit. You should now be able to see part of the menu displaying 5 of the options listing, now you can inspect. OR Where the listing of css styles are applied to inspected elements, there should also be a 'DOM' tab. Select this and from the options make sure 'Show DOM properties is ticked. When you are inspecting the 'select' element, it will show attributes available to that element. Look for 'size' and add 5 to column on the right of it. There is no one set way of showing hidden elements, it depends on what type of element, and how its hidden.
  6. Google Dropdown Border

    I'm using windows 10, and Firefox, your link shows select dropdown form elements for 'Length', 'Centimetre' and 'Inch', are you saying these are disappearing?
  7. Google Dropdown Border

    You should be more clearer, the element does not disappear, the option listing if that is what you are referring to? is part of the select element, so it does not disappear, that is why i thought you were referring to border changing on hover. To see the full option list, click the select element, then hit edit, add a attribute of size="20" for example, and the list will now show. Note: There is not much you can do with options from select dropdown. Usually these are converted to a customized dropdown using ul, li elements because this is easier to style, then JavaScript is used to gather the li selected content to insert into hidden select element OR just hidden input.
  8. Google Dropdown Border

    Select the element in question from developer console, then where the css is displayed there should be a dropdown style of :hover, :focus etc, select :hover and the border should appear as being hovered over, and the css should show as well for hover state.
  9. No access to CSS

    So you can't just strip out all the problem coding, to use your own cleaned version, with your own css. I mean you could have original as well, as a link.
  10. Nevertheless the way I explained to you on how it should be done, is the correct method, just because it didn't work, doesn't mean it is wrong. When the page is fully loaded and you view the source you should see singular <!doctype html>, <html><head>...</head><body>...</body></html> tags with content, usually duplicate of these are highlighted in red meaning it is a error. There maybe a issue with including html and the applying of events, before the html actually exists, especially for collapsible JavaScript code. you could try using setTimeout() to wait a second before applying the events.
  11. State/Country Form Fields

    Unless you are going to use the value of state from dropdown somewhere else, you can simply change the value from dropdown to the actual country that the text state of options is showing. You then wouldn't require any arrays just the retrieved value from selected state.
  12. The idea is to have one main page and include ONLY the specific relavent html code you wish to insert, no doctype, head, body, html tags, as all of these will be within the main document you are including into.
  13. State/Country Form Fields

    The trouble with input of state you are relying on the user to enter the name correctly, thats why dropdowns are used. <form> <p><label>State of Birth: </label> <select id="state" name="state" onchange="autoFill(this)"> <option value="Queensland">Queensland</option> <option value="Tasmania">Tasmania</option> <option value="Florida">Florida</option> <option value="Victoria">Victoria</option> </select> <p> <label>Country of Birth: </label> <input type="text" id="country" name="country"> </p> </form> <script type="text/javascript"> var stateArray = [[0, 'Queensland'], [0, 'Victoria'], [0, 'Tasmania'], [1, 'Florida']]; var countryArray = ['Australia', 'America']; //0 from above is index to Australia, 1 to USA //Arrays always start from 0 function autoFill(elem) { var countryIndex = ""; for (i = 0; i < stateArray.length; i++) { if (elem.value === stateArray[i][1])//if value from dropdown matches looped thro state array 2nd state values { //store index value to country countryIndex = stateArray[i][0]; document.getElementById('country').value = countryArray[countryIndex]; // use index value to get country array value and show in input break; //stop loop } } } </script>
  14. Action to Run JS Validation AND PHP Script

    No! never place onclick event to form button that is used for submission. The onsubmit event is always attached to form element, because it catches all submissions, whether from submit button/s or clicking enter/return button on keyboard while in form input element.
  15. Apply logo link to multiple pages on site

    Better option would be to use a server language like PHP. The image logo would be placed on a blank PHP page with only the image logo and link applied to it, then you can use PHP include to place that singe page on multiple pages with image and link in the the location you require. You amend that specific logo/header page, and the other pages will update to that amendment instantly. The same can be done with text headings, PHP can identify what page you are on, gather link , category data stored in array, and add required text, link to that specific page. You can also use JavaScript also, but requires enabled on all browsers, and maybe not as SEO friendly as using PHP. https://www.w3schools.com/php/php_includes.asp
  16. I'm not getting reply notifications

    The older version was better that way, as it sent a notification whenever someone replied to a topic you was following, with or without quoting.
  17. I'm not getting reply notifications

    It only sends me email notification, when someone actually uses a quote from me in their reply post.
  18. Howto add tables to my website in javascript help please

    You have no doctype <!DOCTYPE html> For every opening '<div' there must be equally a closing </div>, same with '<p>.........</p>' paragraphs. Each of these are like box containers, a box within a box <div id="nav"> is a box container for '<ul>...........</ul>'which is a box container for 'li' box container elements and so on. You have a div opening box container but no, or misplaced closing div outside closing div for id="nav", this breaks the box structure, causing more problems as the browser attempts to correct this broken structure as well as others within your code. IF you validate at https://validator.w3.org/ You will also find it says "document type does not allow element "DIV" here; assuming missing "LI" start-tag" which is referring to <div class="row form-group form-inline" id="rowDiv"> not being allowed as child of '<ul>' elements, only 'li' elements are allowed child elements, so you need to add the div INSIDE a li element. Go through validation and fix remaining errors/warnings, then come back to us if problem still exists.
  19. Howto add tables to my website in javascript help please

    Then that suggests there's not enough room available in the parent element to allow another child element to show as a single row.
  20. You must have this function declared twice somewhere, it can't be declared multiple times, even it is on a external php page that is included into another that declares it also, it will treat it as being previously declared.
  21. I suppose the field that stores the phone number is text string type field also? IF it is all numeric only then use a numeric type! Anything else should use a text type field instead.
  22. You can't show/hide anything with PHP on its own once a page is fully loaded. PHP is sent to server, processed and returned as html and content. JavaScript works client-side through the browser as long as JavaScript is enabled on the browser. You can however access a PHP page through JavaScript using AJAX, you can then display the returned html + content produced by the PHP file and place it where you require. ALL without the reloading of the page.
  23. Hmmm, I think I wasn't clear in my statement before.... if you click either one and it outputs 'yes' or 'no', and it shows up as 'yes' or 'no' by echo $join_mailing_list; This has already passed the database insertion, so it can't be '0' when it is processed, it only maybe reverts to '0' if it does not receive the value, and by default is to show '0' because of table field name mistake, OR the field is not a 'char' or 'varchar' type that accepts text values, join_mailing_list char(4) but a number type join_mailing_list int(4) which only accepts numbers, which will return '0' instead of these text values 'yes' or 'no'. you could change values of inputs to value 0 for 'no', 1 for 'yes'
  24. It would only add a '0' if the field was of a similar type to integer, as it requires a numerical value not text 'yes' or 'no'.
  25. How to style webform date picker?

    You are floating the wrong elements, you need to float the div container elements they are within, as by default div elements stretch to the total available width of there parent element.