views:

44

answers:

2

Hi,

I am using Uploadify Plugin to upload images, the parameter response of the uploadify function will hold the value 1 if something goes wrong.

i did something like this and works perfectly fine.

if(response != 1) {
     $('#t_fileUploadName').append('<p>'+response+'<p/>');
     $("#t_fileUploadField").append("<input type='hidden' name='nstitle' value='" + response + "' />"); 
     $("#t_fileUploadBtn").remove();
      }

now i want to specify one more javascript condition, if the response is equal to one then it should print the following html div

 <div id="dialog" title="Incorrect File Dimension" style=" display:none;">
            <p>Please enter the correct file dimension!</p>
        </div>

i tried using this code and it is not working.

if(response == 1) {
      $("#divmsg").append("<div id='dialog' title='Incorrect File Dimension' style=' display:none;'><p>Please Enter The Correct File Dimension, or Refer the Document</p></div>"); 
     }

what is wrong with the above syntax???

A: 

Get rid of display:none?

CyberDude
yes i got rid of it. it works . i am facing another problem now.
Ibrahim Azhar Armar
So the initial problem was the escaping or the display style?
CyberDude
A: 

Nothing wrong with your code,But still If you can escape it

     $("#divmsg").append("<div id='dialog' title='Incorrect File Dimension' style=\"display:none;\"><p>Please Enter The Correct File Dimension, or Refer the Document</p></div>");
Hulk