Jump to content

dustcomposer

Members
  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

1 Neutral

About dustcomposer

  • Rank
    Newbie

Profile Information

  • Interests
    Fun Online learning

Previous Fields

  • Languages
    HTML, JS, XHTML, XML, Actionscript
  1. dustcomposer

    WePro - My (w3schools) TryIt

    Update: Save button added. You can save the code as HTML file to your desktop.
  2. dustcomposer

    Drag and drog sortable list question

    Hi, on the CSS, use dot (.) selector for 'sortable' instead of (#) because it's a class.
  3. dustcomposer

    WePro - My (w3schools) TryIt

    I've just created a really simple online editor for HTML, Javasacript and CSS in "w3schools tryit" style. I call it WePro. The title stands for Web Programming, so, it doesn't mean I'm a pro developer. Feedback are welcome as this is one of my lesson in learning web programming. Please visit: WePro Hit "Run" to execute. The Code area is draggable and you can toggle it by clicking the "WePro title above the page. Is this any good?
  4. dustcomposer

    how to solve header and footer

    what is in the header?
  5. dustcomposer

    get HTMLcodeAsString from json

    hi, thanks dsonesuk. It would work for me, I have to run some test first; in my case, the svg images are created by users with their own numbers of dimension and style, and what makes it little bit more complicated is that users have a chance to create more than one 1 image to be appended on vary div as holder, my job is to get those svg image to a json file where other inputs also stored there too. I thought it would be easier if I can just get innerHTML of divs to stored svg images in a json, but then I found this info: create an SVG DOM tree from JSON, SVG 2 DOM/JSON Constructors; I think this is exactly what I need, but as the page says, there is no easy way to achieve this, json is a bad option to construct svg image. however, I will try your solution, I have created this new structure to try: [[{"parentId":"", "class":"svg", "id":"svg1", "width":"", "height":"", "border":"", "xmlns:xlink":""},{"class":"path", "id":"path1", "d":"", "stroke":"", "stroke-width":"", "fill":""}],[{"parentId":"", "class":"svg", "id":"svg2", "width":"", "height":"", "border":"", "xmlns:xlink":""},{"class":"path", "id":"path2", "d":"", "stroke":"", "stroke-width":"", "fill":""}],[{"parentId":"", "class":"svg", "id":"svg3", "width":"", "height":"", "border":"", "xmlns:xlink":""},{"class":"path", "id":"path3", "d":"", "stroke":"", "stroke-width":"", "fill":""}]] Have a look at this nice free online json editor. but it would take some time for me. Thanks again.
  6. dustcomposer

    get HTMLcodeAsString from json

    Hi, I'm using fileReader to load .txt file contains json. It works, apparently, when I parsed it, the <svg> tag doesn't show a svg image, it appears as text. Here's the json: [["24/11/2014 - 4:32", "blah", "blah blah", "blah blah blah"],[ "<svg class="dyHolder" id="dyHolder" style="1px solid red" width="140" height="10" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 5 L 140 0 M 0 5 L 140 10" style="stroke-width: 1; stroke: black; fill:none;"></path></svg>", "", ""]] and the result: This is text Lorem Ipsum blah blah <svg class="dyHolder" id="dyHolder" style="border:1px solid red" width="50" height="50" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 0 L 50 25 M 0 50 L 50 25" style="stroke-width: 1; stroke: black; fill:none;"></path></svg>. Another text..
  7. dustcomposer

    get HTMLcodeAsString from json

    Hi, I have this following code: http://jsfiddle.net/dustcomposer/bapwnhy0/ var cresc_path = '<path class="dyna_line" id="dyna_line" d="M ' + 0 + ' ' + 0 + ' L ' + 50 + ' ' + 25 + ' M ' + 0 + ' ' + 50 + ' L ' + 50 + ' ' + 25 + '" style="stroke-width: 1; stroke: red; fill:none;" />';var dl = document.createElementNS("http://www.w3.org/2000/svg", "svg");dl.setAttribute('class', 'dyHolder');dl.setAttribute('id', 'dyHolder');dl.setAttribute('style', 'border:1px solid red');dl.setAttribute('width', '50');dl.setAttribute('height', '50');dl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");dl.innerHTML = cresc_path;document.getElementById('a').appendChild(dl);var str = '<svg class="dyHolder" id="dyHolder" style="border:1px solid red" width="50" height="50" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 0 L 50 25 M 0 50 L 50 25" style="stroke-width: 1; stroke: red; fill:none;"></path></svg>';document.getElementById('b').innerHTML = str; both dl and str does result a svg image in html page. but when I grab similar string with str from json file, it appears as text like: <svg class="dyHolder" id="dyHolder" style="border:1px solid red" width="50" height="50" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 0 L 50 25 M 0 50 L 50 25" style="stroke-width: 1; stroke: black; fill:none;"></path></svg> can anyone explain what the problem is? UPDATE: I've found the problem! the saved json structure must be typed neat. If the json structure made like this: [[ "28/11/2014 - 7:7", "", "", ""],[ "", "", "", ""],["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "<svg class="dyHolder" id="dyHolder" style="border:none" width="140" height="10" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 0 L 140 5 M 0 10 L 140 5" stroke-width="1" stroke="black" fill="none"></path></svg>"]] the svg (as string) won't appears as svg but a paragraph/text. therefore it should written like this: [[ "28/11/2014 - 7:7", "", "", ""],[ "", "", "", ""],[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],[ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "<svg class="dyHolder" id="dyHolder" style="border:none" width="140" height="10" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="dyna_line" id="dyna_line" d="M 0 0 L 140 5 M 0 10 L 140 5" stroke-width="1" stroke="black" fill="none"></path></svg>"]] Everything works well now.
  8. dustcomposer

    scrolling datalist

    Select option with css will work. <select name="mycountry"> <option value="Afghanistan">Afghanistan</option> <option value="Afrique du Sud">Afrique du Sud</option> <option value="Albanie">Albanie</option> <option value="Algérie">Algérie</option> <option value="Allemagne">Allemagne</option> <option value="Andorre">Andorre</option> <option value="Angola">Angola</option> <option value="Antigua et Barbuda">Antigua et Barbuda</option> <option value="Arabie saoudite">Arabie saoudite</option> <option value="Argentine">Argentine</option> <option value="Arménie">Arménie</option> <option value="Australie">Australie</option> <option value="Autriche">Autriche</option> <option value="Azerbaïdjan">Azerbaïdjan</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option></select> CSS select option { height: 50px; background-color: lavender;} Or simply size the select input: <select size='5' name="mycountry"> <option value="Afghanistan">Afghanistan</option> <option value="Afrique du Sud">Afrique du Sud</option> <option value="Albanie">Albanie</option> <option value="Algérie">Algérie</option> <option value="Allemagne">Allemagne</option> <option value="Andorre">Andorre</option> <option value="Angola">Angola</option> <option value="Antigua et Barbuda">Antigua et Barbuda</option> <option value="Arabie saoudite">Arabie saoudite</option> <option value="Argentine">Argentine</option> <option value="Arménie">Arménie</option> <option value="Australie">Australie</option> <option value="Autriche">Autriche</option> <option value="Azerbaïdjan">Azerbaïdjan</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option> <option value="Hors Canada">Hors Canada</option></select>
  9. dustcomposer

    Moving a paypal button

    as far as I know, when I still use html 4, the align attribute is only for left/right only. Try following code: <div style='text-align: center'><p><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input type="hidden" name="cmd" value="_s-xclick"><input type="hidden" name="hosted_button_id" value="QGF5P9TN7L74U"><input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online."><img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"></form></p></div> Insert the image to a div and align the div to center.
  10. dustcomposer

    How to center part of a text with CSS?

    The <center> tag is not supported in HTML5. You need to add Style attribute to align an element, just like dsonesuk has told or using external CSS.
  11. dustcomposer

    How to center part of a text with CSS?

    what do you mean 'dynamic formatting' (sorry, I don't speak English well).
  12. dustcomposer

    Would someone please explain what this code does.

    the first one is XHTML declaration and you can read about the script here (CDATA).
  13. dustcomposer

    html5 canvas or svg

    You want to make something like these?: http://corehtml5canvas.com/# http://corehtml5canvas.com/code-live/ch02/example-2.7/example.html my choice would be Canvas; it could be so complicated but could be fun too, just follow the links.
  14. My website is wp-based too, usually I ask a friend to modify it's codes (appearance-editor), but in your case, Ingolme's right, you shouldn't modify your wp-themes codes, contact woocommerce instead to see their documentations. For example: it seems to me that the page above (the one with the coupon button) controls with wc-cart-functions.php. Ask woocommerce to see if you can modify their script.
  15. dustcomposer

    PHP get data value from ajax

    I am. I will need it.
×