C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

how to popup using java script code ?


Posted Date: 13 Oct 2008      Posted By: Vinod Krishna      Member Level: Gold     Points: 1   Responses: 6



code




Responses

Author: Varun Bansal    13 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 4

create javasrcipt :
function openwin()
{
window.open('contact.aspx','popuppage','scrollbars=no,width=400,height=400,resizable=no,left=500,top=260,toolbar=no,titlebar=no')
}

<asp:LinkButton ID="lbtn_contact" runat="server" CausesValidation="False" OnClientClick="openwin(); return false;"

regards
varun bansal

Regards
Varun bansal
Do ot forget to Rate the post.....
Click here for visiting in my blogs



Author: Miss Meetu Choudhary    13 Oct 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 5

You can use this code

myWindow = window.open("", "tinyWindow", 'toolbar,width=150,height=100')
myWindow.document.write("Welcome to this new window!")
myWindow.document.bgColor="lightblue"
myWindow.document.close()


or


window.opener.document.getElementByID('ct100_ContentPlaceHolder1_HID').innerText=document.getElementById('<%=txtDesc.ClientID %>').value;





==
Thanks and Regards
Meetu Choudhary
-
please rate the post if it helps you

Thanks and Regards
Miss Meetu Choudhary (Site Coordinator)
Go Green Save Green
My Profile on Google



Author: Pavan Ravi    13 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 1

make use of alert('test') for message popup.

for forms, put the target as blank.

Regards,
Pavan Ravi Kumar.

"Complex problems have simple, easy to understand wrong answers."
Ravi's Blog



Author: Varun Bansal    13 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 4

Another method is
use on button click even:

string popupScript = "<script language='javascript'>" +
"window.open('" + "Product.aspx" , 'CustomPopUp', " +
"'width=400, height=400, menubar=yes, resizable=no')" +
"</script>";
Page.RegisterStartupScript("popupScript", popupScript);

regards
varun bansal

Regards
Varun bansal
Do ot forget to Rate the post.....
Click here for visiting in my blogs



Author: Abhi    13 Oct 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

call that function onclick of a button

<input type="button" id="btnPastSurghx" runat="server" value="Past Surgical History " class="classButton" onclick="openPopup();" />

//javascript funcion

<script language="javascript" type="text/javascript">

function openPopup()
{
window.open("histroy.aspx",'open','width=500px,height=250px,top=200,left=250');
}

</script>

Thanks and Regards,
Abhay



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : dropdownlist pblm (autopostback pblm) in asp.net
Previous : System id
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use