Jump to content

iwato

Members
  • Content count

    1,105
  • Joined

  • Last visited

Community Reputation

11 Good

1 Follower

About iwato

  • Rank
    Dedicated Member

Contact Methods

  • AIM
    moogoonghwa
  • Website URL
    http://www.grammarcaptive.com
  • Yahoo
    iddor
  • Skype
    kiusau

Profile Information

  • Gender
    Male
  • Location
    Seattle, Washington USA 98104

Previous Fields

  • Languages
    HTML, CSS, Javascript, PHP, MySQL and Spoken Language

Recent Profile Visitors

14,751 profile views
  1. OK, Team, your confusion helped me to unravel my own confusion, and I was able to achieve the task with overwhelming success. SUCCESS: The following code replaces the current content of <div id='main'> with the content of another called <div id='legal_div'>. It also propels the user to the top of the hosting div -- namely, <div id='main'> after the new content is in place. This task is achieved with a Javascript file that was imported when the old content was set. My confusion was three-fold: 1) how to select the #main div 2) where to place the Javascript, and 3) how to select the <h2> element called #data_analysis $("#make_invisible").click(function() { var replacement = $("#legal_div").html(); $("#main").html(replacement); $('body, html').animate({scrollTop: $('#main').find('#data_analysis').offset().top},800); }); In any case, the problem is now resolved. Roddy
  2. OK. Let us assume that how the content was inserted and the content itself do not matter. How does one go about replacing the content of a div from inside the div whose content is to be replaced? This should be a much easier question to understand. Roddy
  3. DILEMMA: Visitors to the mainpage of my website can fill the middle section of the page from the page's navigation bar in either of two ways. Both ways employ Javascript: one, copy a div already on the page into another div on the same page; and two, copy the contents of a div on a another page into same. What I would like to do now is to copy the contents of a div already on the page with a call from the contents of a div that was previously on another page. QUESTION: How does one get a div to replace its own content when the div whose contents needs to be replaced has been filled with content from another page? Roddy
  4. iwato

    Disable $.colorbox for Mobile Devices

    With the exception of the American public, not everyone is intentionally stupid. I try not to punish people for their ignorance. Nature will do that on its own accord. In any case, it appears that I have resolved the need for zoom by setting the minimum width of the acceptable viewport to wider than the height of the viewport of the smallest smartphone. This pretty much insures that enough of the splash panel will be made visible so that it can be easily eliminated, if it gets in the way. Roddy
  5. iwato

    Improperly Displayed Submit Button

    I still have not discovered a solution for my submit buttons. By way of example, go to the Grammar Captive mainpage, find the phrase Weekly Podcasts in the navigation bar on your left, and click. When the panel opens scroll down to the bottom of the page. Only when my phone is turned horizontal will the button at the bottom of the form appear as it should. Roddy
  6. This is cool. I did not know that you could do this. I will surely keep it in mind, as it could prove very useful down the line. I am much better at mannipulating data with PHP than I am with Javascript even when it is written in JSON. I do not know how to send POST data via a link. Is it even possible? I recall Dsonesuk teaching me how to format POST data within an AJAX call, but this is all that I can remember. Roddy
  7. iwato

    Improperly Displayed Submit Button

    Nope. I tried the following three things and refreshed the browser page of iPhone each time. 1) Placed the -webkit setting before the rule. 2) Eliminated the -webkit setting altogether. 3) With the setting eliminated introduced the suggest CSS script. All of these failed. I do believe you are correct about it having something to do with the OS's button styles. As other buttons on other filler pages are also distorted. Any suggestions about where to go to obtain more insight into the resolution of the problem. A Google search for the problem suggested the same as you.
  8. iwato

    Improperly Displayed Submit Button

    BACKGROUND: Now that I have finally got my responsive design to function properly. I did a little exploration of my site from my new iPhone 5 that a colleague gave me.to replace my broken "obsolete" iPhone 4. What I discovered was the unusual appearance of one of my form input controls. Although the submit button appears correctly on my still functioning "obsolete" MacBook, it does not appear correct on my new, not yet "obsolete" iPhone. When I investigate the matter with Firebug I am told that there is event bubbling. Now, I am not at all sure that this is the source of the problem. Neither, am I clear about how the bubbling is being created. This is the first time that I have encountered such an issue. TROUBLED DOCUMENT: 1) Open the Grammar Captive mainpage in your smartphone. 2) Find the text Weekly Podcasts under the Products subtitle in the navigation bar on your left and click on it. 3) Scroll to the bottom of the form located toward the bottom of the page and discover that the value of the button -- namely, Discover! -- is partially hidden. The width of the button is clearly not wide enough to display the entire value of the value attribute. QUESTION ONE: Why does the value attribute display correctly in my browser window on my "obsolete" MacBook, but not on my not yet "obsolete" iPhone? QUESTION TWO: If bubbling is the source of the problem, what must I do to fix it? Roddy
  9. I have found another way to achieve my task. I copied the file, changed the POST variable to GET and accessed the copied file with query statement thus circumventing AJAX. I am asking myself, however, your suggested method works. For, if I assign the contents of the curl_exec() statement to a variable. How will AJAX no where to get the variable's contents? Roddy
  10. iwato

    Disable $.colorbox for Mobile Devices

    Yes, I will do it with jQuery. I found these two rather simple jQuery methods: $(window).width() and $(window).height(). According to the jQuery manual, however these methods do not account for zoom effects. This suggests that the user could made the window much larger than the viewport and deceive my code into believing that the viewport is bigger than it is. Do you have a suggestion to get around this problem? Roddy
  11. No, I already tried that. It does not work according to the manual. AJAX likes both of the following, but neither satisfies my desire the entire outcome en gros. curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 0); curl_exec($curl_request); curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1); echo curl_exec($curl_request); In order to iterate through the complex JSON object that results I must be able to see the whole thing JSON string! Roddy
  12. GREETING: One more quick question before the weekend begins. BACKGROUND: Until now, it has been easy to see the results of AJAX calls in the files that produce them. Until now, cURL was never an explicit part of my web-application. I am now making a dual call, however, and am unable to see the final result. The first call stipulates no method as nothing is sent. The second call is based on the result of the first call and uses the POST method to make the request. Although I can see the contents of the first request, I cannot see the contents of the second. Both files use identical cURL routines and both perform exactly as expected, as AJAX returns everything that is requested. Only the query statements of the URL are different. Even the specified AJAX dataType is the same for both calls -- namely, JSON. Please find below the code that produces the output that I wish to see, but cannot. The PHP for the 2ND AJAX CALL ini_set('log_errors', 1); ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log'); ini_set('html_errors', 0); ini_set('display_errors', 0); error_reporting(E_ALL); if (!empty($_POST['ip_addr'])) { $ip_addr = filter_var($_POST['ip_addr'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); $url = 'https://.../matomo/index.php?module=API&action=index&visitIp=' . $ip_addr . '&idSite=1&period=week&date=today&method=Live.getVisitorProfile&format=json&expanded=0&token_auth=...'; $curl_request = curl_init(); curl_setopt($curl_request, CURLOPT_URL, $url); curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, false); curl_exec($curl_request); curl_close($curl_request); } QUESTION; What must I do to make the output of the cURL call visible in the file that produces it without disrupting the AJAX call that retrieves the output that I cannot see. Or, am I missing the whole point of cURL and the data is tranferred directly to the AJAX? But, why would I be able to see it in the first request, but not the second. Roddy
  13. iwato

    Disable $.colorbox for Mobile Devices

    OK. I do not worry about the nature of the device, only the screen resolution, but how do I obtain the screen resolution? From the $_SERVER variable. I could surely obtain it from Matomo, but I do not wish to make the actual functioning of my site dependent on Matomo for anything that is not directly related to Matomo. Mind you, Colorbox is Javascript, and the contents of my splash panels are spread across many webpages. It is a complex design that is repeated many times. Unless Javascript can be triggered by an @media rule I have no idea how I would go from CSS to disabling Colorbox. Roddy
  14. The DILEMMA: Recently I discovered how to enable responsive design on my website's main page. Although the page itself is now responsive, the splash panels that are associated with it are largely dysfunctional. Having experimented in various ways to make these latter responsive as well, I have decided to simply eliminate them on mobile devices. What is the best way to do this? Already I have combined PHP and Javascript to suppress the splash panels in the same session. So, my question is what is the best way to recognize any mobile device? Roddy
  15. iwato

    Responsive Design Dysfunction

    Problem resolved. Hooray! Hooray! Hooray! Roddy
×