Control Panel
Forum
Hosting Help
ASP.NET 4 & SQL 2008 R2 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
AdSense revenue sharing sites
|
Exam 70-680 Practice Tests
|
Silverlight games
Total
members
:
210364
Average new registrations per day (in last 7 days):
16
New Registration:
Open
Register Now
Home
»
Questions & Answers
»
Javascript is not working
Javascript is not working
3/24/2010
Author:
academia
I'm woking with asp.net c#, and I'm using javascript for my buttons. It's working in my localhost but not in aspspider web site. Is there any reason?
This is my asp code: Thanks for your support
<%@ Page Title= Language=C# MasterPageFile=~/MasterPage.master AutoEventWireup=true CodeFile=personal.aspx.cs Inherits=personal %>
<asp:Content ID=Content2 ContentPlaceHolderID=cphBody Runat=Server>
<script type=text/javascript language=JavaScript>
function f_show( lv_id , lv_det)
{
lvCmd = personal.aspx?p_det= + lv_det + &p_id=+lv_id ;
window.location = lvCmd;
}
</script>
<asp:Label ID=lblDetalle runat=server></asp:Label>
<center>
<asp:Button ID=btnBack Text =Regresar runat=server Visible=False />
</center>
<center >
<asp:Label ID=lblErrMsg runat=server Font-Bold =true ForeColor=Red></asp:Label>
</center>
</asp:Content>
Answers .............
Author:
Joshua Cramer
ImageVision.Net
Posted Date: 3/27/2010
In your code I don't see a call the the javascript function.
OnClientClick = f_show(lv_id, lv_det) in your asp page.
Author:
academia
Posted Date: 3/28/2010
Thanks Joshua for answer. I didn't included because I thought is a lot of code. This is the call from c# ( .cs )
I'm creating a detail for each row in a loop:
lblDetalle.Text = lblDetalle.Text + <table border=1><tr><td width=140px> +
<center><img src=' + Data.GetMyField(foto, lv_i) + ' +
width=100px style='border: 5px outset #CCCCCC'/></center></td> +
<td width=500> +
<center><table ><tr><td><h2> + Data.GetMyField(titulo, lv_i) + </h2></td> +
</tr><tr><td> +
<button id='btnDetalle' +
onClick='f_show( + Data.GetMyField(codigo, lv_i) + ,\ + lv_det + \)' >Detalles + </button> +
</td></tr></table> +
</tr><tr><td> + Data.GetMyField(nombre, lv_i) + </td> +
<td>E-Mail: + Data.GetMyField(email, lv_i) + </tr></table>;
Author:
Mandalika V Harish
Posted Date: 4/5/2010
are you getting a javascript error?
i am not sure but maybe you are missing some quotes.
check your syntax.
You must
login
to post answer for this question.
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.