Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

36 Excellent

About gongpex

  • Rank

Previous Fields

  • Languages
    Currently I try to brush up my english so that I can communicate as well with all people i
  1. Hello, thanks for reply, Q : so in other word when client / user clicked on link and then jump to other page, it cause element inside the iframe changed also? actually my purpose is to make it able to fire the event, although inside iframe. please help me how to fix this Thanks
  2. Hello everyone, Alright, I think it's hard to write my trouble here, so, please visit : https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_element_iframe And then just replace those code with these : <!DOCTYPE html> <html> <body> <iframe id="myFrame" src="/default.asp" style="height:380px;width:100%"></iframe> <p>Click the on the iframe to change w3schools background color</p> <script> document.getElementById("myFrame").contentWindow.onclick = test; function test() { var iframe = document.getElementById("myFrame"); var elmnt = iframe.contentWindow; elmnt.document.body.style.backgroundColor = "yellow"; } </script> </body> </html> These code runs well when I clicked on iframe once, but after I clicked another link page eg : Learn HTML these code didn't work. it looks if iframe / browser unable to caught event (onclick). Q : How to fix so that event still able to catch by contentWidth , though user click another link page? please help me. Thanks
  3. gongpex

    free domain / subdomain name

    Hello everyone, Currently I looking for free domain / subdomain name and then I found http://aa.am/ , Q : does it spam ? if so, could you recommend me another free domain name provider? Note : please do not recommend me freenom, I had register so many domain name there, and I unable to register on it anymore. please help Thanks
  4. gongpex

    php put inside css file security

    Hello everyone, It safe or not put php code on css file like this : <?php header("Content-type: text/css; charset: UTF-8"); $db = new mysqli("host", "username", "password", "database"); if ($db->connect_error) { die("Connection failed: " . $db->connect_error); } ?> /* css code */ Q : if not safe please tell me how to use php inside css. Thanks
  5. gongpex

    mysql shutdown

    Hello everyone, In past I had experience like this : I have two tables on mysql db and these : shops shop_details the shops table contains orders from users like : order_id order_number id_item the shop_details table contains detail orders from users like : order_detail_id order_id item_price And to insert it I used some php code like this (this code just for mapping not actual code) : <?php if($validation == true){ /* THIS JUST LOGIC MAPPING NOT ACTUAL CODE */ $sql = new mysql(host,user,passw,db); $query = $sql->query("insert into shop"); /* LOGIC MAPPING FOR DETAIL */ if($query){ $sql->query("insert into shop_detail"); } } ?> All user's orders were able to inserted on table shop, but not all user's detail orders were inserted to table shop_detail. so in other word not all data inserted on table shop_detail due mysql shutdown (maybe i don't know) Note : I used bot to insert all data for test Q : how to avoid mysql shutdown if much users do order? please help me Thanks
  6. gongpex

    iframe custom scrollbar

    Hello, thanks for reply, I just tried but the result still same : <style> .scroll-pane { width: 100%; height: 200px; overflow-x: hidden; overflow-y: auto; } </style> <body> <!-- iframe --> <iframe class="scroll-pane" src="iframe_content1.html" frameborder="0"> <p>Your browser does not support iframes.</p> </iframe> <script> $(document).ready(function(){ $('.scroll-pane').jScrollPane({ contentWidth : 0 }); }); </script> </body> please help Thanks
  7. gongpex

    iframe custom scrollbar

    Hello, Thanks for reply, Today I used jscrollpane to made custom scrollbar on iframe, it's worked but unable to remove horizontal bar (always displayed both), this is my code : <style> .scroll-pane { width: 100%; height: 200px; overflow: auto; } </style> <body> <!-- iframe --> <iframe class="scroll-pane" src="iframe_content1.html" frameborder="0"> <p>Your browser does not support iframes.</p> </iframe> <script> $(document).ready(function(){ $('.scroll-pane').jScrollPane({ contentWidth: '0px' }); }); </script> </body> contentWidth was according on : https://stackoverflow.com/questions/4404944/how-do-i-disable-horizontal-scrollbar-in-jscrollpane-jquery I've tried horizontalDragMaxWidth: 0 also, but the result was same. please help me Thanks
  8. gongpex

    iframe custom scrollbar

    Hello everyone, I've search on google about iframe custom scrollbar tutorial but I didn't find it. Thing that I found only 'custom scrollbar tutorial' NOT iframe custom scrollbar. please see this link : https://stackoverflow.com/questions/22618452/custom-scrollbar-using-jquery-for-iframe-with-customer-url Q : Maybe y'all know where is the tutorial about custom iframe scrollbar? please tell me Thanks
  9. gongpex

    create own place holder

    Hello everyone, On modern browser commonly we put : <input type="text" placeholder="Your Value" /> To display placeholder's value. But how about in old browser such IE7? I've tried to made own code used jquery and these my code : HTML : <input type="text" class="form-control placeholder" watermark="Your Name" id="name" /> JQUERY function placeholder(){ var holder = $(".placeholder"); var content_holder = holder.attr("watermark"); holder.val(content_holder); holder.focus(function(){ $(this).selectRange(0,0); }); holder.keyup(function(){ if(holder.val().length == 0){ holder.val(content_holder); $(this).selectRange(0,0); } }); holder.keypress(function(){ if(holder.val() == content_holder) { holder.val(""); } }); } $.fn.selectRange = function(start, end) { if(!end) end = start; return this.each(function() { if (this.setSelectionRange) { this.focus(); this.setSelectionRange(start, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', start); range.select(); } }); }; my codes as far runs well but still have flaw (not like as properly placeholder). if you clicked on input, the cursor position still able go to last character from ("your name"), not at position 0,0 (first character). Q : how to make so that the cursor position at range 0,0 (first character) / same as properly placeholder? please help me Thanks
  10. gongpex

    unknown jquery code model

    Hello thanks for reply, How about $.Animation ? I didn't find it on google, could u give me documentation link please? Thanks
  11. gongpex

    unknown jquery code model

    Alright I will give you the full of code, tell me where is the method of JQuery according code on below : (function( $ ) { $.fn.animateBgPosition = function( x, y, speed ) { var pos = this.css( "background-position" ).split( " " ); this.x = parseInt( pos[0], 10 ) || 0; this.y = parseInt( pos[1], 10 ) || 0; $.Animation( this, { x: x, y: y }, { duration: speed }).progress( function( e ) { this.css( "background-position", e.tweens[0].now + "px " + e.tweens[1].now + "px" ); }); return this; }; })( jQuery ); please explain to me about : tweens and now Thanks
  12. gongpex

    unknown jquery code model

    Hello everyone, I found a piece of cake jquery code such this : $.Animation( this, { x: x, y: y }, { duration: speed }).progress( function( e ) { this.css( "background-position", e.tweens[0].now + "px " + e.tweens[1].now + "px" ); }); When I looked for $.Animation and progress reference on google I didn't find it. Q : Could y'all help me to find this reference? Many Thanks
  13. gongpex

    About font awesome

    Hello everyone, What happened with font-awesome actually? every times when I opened this site it always "server not found". I'm unable to access this site since last week. Q : maybe there is someone who knows what happened with fa (font-awesome)? please tell me. Thanks
  14. gongpex

    PHP ajax able to response on PC but not in mobile

    Yes, I didn't see alert on android device entirely .This why I asked you to test my code via smartphone (android device). I had debug (inspect element) it via network xhr in PC, everything were fine, Q : do you know how to debug on android device? please help Thanks
  15. gongpex

    PHP ajax able to response on PC but not in mobile

    @justsomeguy Hello thanks for reply, Well, in PC it would be display alert, but in mobile alert won't displayed. if you leave both of forms blank or either, it will shown alert with message "error", but if you fill both (whatever) it will shown "correct". My actual problem / block is only why it didn't work on android mobile browser. please help Thanks