Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello Experts,

I have a textbox, on Keypress event of Text box, is the JavaScript function like below with Jquery Modal pop up.

C#
function getfoc() {
            debugger;
            $("#modal_PrdCddialog").load('ProductCode.aspx', function () {
                $(this).dialog({
                    title: "Select the Product Code to fill the Tire size",
                    autoOpen: true,
                    modal: true,
                    height: 350,
                    width: 450,
                    buttons: {
                        Close: function () {
                            $(this).dialog('close');
                        }
                    }
                }).prev(".ui-dialog-titlebar").css("background", "blue");
                //window.open('ProductCode.aspx', 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=Yes,scrollbars=Yes,toolbar=no,menubar=no,location=no,directories=no, status=No')

            });
        }



Meaning, it is showing as modal pop up but it is not staying like modal pop up instead my ProductCode.ASPX is opening as page in the website.

Am I missing something here.
Could you please help me with this?
Posted
Updated 7-Aug-15 7:27am
v2

1 solution

CSS does work, period. You never wrote the property background-color (http://www.w3schools.com/cssref/pr_background-color.asp[^]), that's it. If some other styles are missing, this is because you did not define it, too.

Note that such use of CSS is not very fruitful; you can define the styles for only one HTML element. But more typically, such an element with so rich content has inner HTML which also need styling, so the only constructive approach would be using the <style> HTTP element with CSS defining styles for several target, HTML elements and/or classes.

—SA
 
Share this answer
 
Comments
sudevsu 7-Aug-15 13:32pm    
Can you please see my updated question and help me with that
Sergey Alexandrovich Kryukov 7-Aug-15 15:22pm    
I already recommended you to use CSS via <style> HTTP element; this is what should really help you.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900