Jump to content

Javascrit equivalient?


frank_solo

Recommended Posts

Is there a javascript equivalent to this php script? I have these ugly boxes that apear after a user deletes his or her images in a edit form. It appears in IE I have no clue why they appear even using this in php. Maybe a client script can work?
Thanks guys
 

 <?PHP $image04 = !empty($rows['image04']) ? "<img src=\"http://www.mydomain.co/user/{$rows['image04']}\" width='100'>" : "<img src=\"http://www.mydomain.co/user/images/classified/no-image.png\" width='100'>";?>
Link to comment
https://forums.phpfreaks.com/topic/278082-javascrit-equivalient/
Share on other sites

What do you expect to achieve with JavaScript? Looks like this is the ugly image you're talking about:

"<img src=\"http://www.mydomain.co/user/images/classified/no-image.png\" width='100'>"

Just change the PHP so it doesn't show that when the image column is empty:

<?php

$image04 = !empty($rows['image04']) ? "<img src=\"http://www.mydomain.co/user/{$rows['image04']}\" width='100'>" : "";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.