Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AlexShamber

Members
  • Joined

  • Last visited

  1. Yes, we obtain corrupted images in result, but actually base64 encoded string ,returned from Base64.encode() method (link to js library above), is corrupted. I have compared string, returned from php function base64_encode, and string, returned from Base64.encode() method. They are not the same.
  2. I found the solution using PHP. Here it is. Using this javascript we send the AJAX request to the php script that returns base64 encoded image binary data: var xmlhttp = getXmlHttp(); xmlhttp.open('GET', 'http://example.com/script.php', true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { //Here we embed base64 encoded data into html document.getElementById('content').innerHTML = '<img src="data:image/jpeg; base64,' + xmlhttp.responseText + '" />'; } } }; xmlhttp.send(null); Here script.php is: <?php echo base64_encode(file_get_contents('image.jpeg')); ?> I also tried to use only JS, but it seems that functions that I had found, for example here http://www.webtoolkit.info/javascript-base64.html , don't encode correctly. Although may be I missed something.
  3. Yeah...embed data into html. It seems to me that i can't exaclty find out the way to encode loaded data. Can you post some code example?
  4. Hi to all! I need some help with putting image binary data into html. var xmlhttp = getXmlHttp(); xmlhttp.open('GET', 'http://example.com/image.jpeg', true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { //Here, when AJAX request will be completed, i would like to put data conrained in xmlhttp.responseText into html and make browser correctly render it. } } }; xmlhttp.send(null); Any help is appreciated.
  5. You defined id "menu" for div tag and ul tag in your html. This causes the problem. Html validator could help you to find out it.
  6. It seems to me there is no way to do this in PS. You could use Corel Draw or another vector graphics editor for this purpose.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.